scatter3dPETER            package:StatDA            R Documentation

_3_D _p_l_o_t _o_f _a _R_e_g_r_e_s_s_i_o_n _M_o_d_e_l

_D_e_s_c_r_i_p_t_i_o_n:

     This function makes a 3D plot of the data and the regression
     function. The user has the choice between different methods to
     calculate the coefficients for the regression model.

_U_s_a_g_e:

     scatter3dPETER(x, y, z, xlab = deparse(substitute(x)),
     ylab = deparse(substitute(y)), zlab = deparse(substitute(z)),
     revolutions = 0, bg.col = c("white", "black"),
     axis.col = if (bg.col == "white") "black" else "white",
     surface.col = c("blue", "green", "orange", "magenta", "cyan", "red",
     "yellow", "gray"), neg.res.col = "red",
     pos.res.col = "green", point.col = "yellow", text.col = axis.col,
     grid.col = if (bg.col == "white") "black" else "gray",
     fogtype = c("exp2", "linear", "exp", "none"),
     residuals = (length(fit) == 1), surface = TRUE, grid = TRUE,
     grid.lines = 26, df.smooth = NULL, df.additive = NULL, sphere.size = 1,
     threshold = 0.01, speed = 1, fov = 60, fit = "linear", groups = NULL,
     parallel = TRUE, model.summary = FALSE)

_A_r_g_u_m_e_n_t_s:

 x, y, z: the coordinates for the points 

xlab, ylab, zlab: the labels for the axis 

revolutions: if the plot should be viewed from different angles 

bg.col, axis.col, surface.col, point.col, text.col, grid.col: define
          the colour for the background, axis,... 

pos.res.col, neg.res.col: colour for positive and negativ residuals

 fogtype: describes the fogtype, see rgl.bg 

residuals: if the residuals should be plotted 

 surface: if the regression function should be plotted or just the
          points

    grid: if TRUE, the grid is plotted 

grid.lines: number of lines in the grid 

df.smooth: if fit=smooth, the number of degrees of freedom  

df.additive: if fit=additive, the number of degrees of freedom 

sphere.size: a value for calibrating the size of the sphere 

threshold: the minimum size of the sphere, if the size is smaller than
          the threshold a point is plotted 

   speed: if revolutions>0, how fast you make a 360 degree turn

     fov: field-of-view angle, see rgl.viewpoint 

     fit: which method should be used for the model; "linear",
          "quadratic", "smooth" or "additive" 

  groups: define groups for the points 

parallel: if groups is not NULL, a parallel shift in the model is made 

model.summary: if the summary should be returned 

_D_e_t_a_i_l_s:

     The user can choose between a linear, quadratic, smoothed or
     additve model to calculate the coefficients.

_A_u_t_h_o_r(_s):

     Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

_R_e_f_e_r_e_n_c_e_s:

     C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical
     Data Analysis Explained. Applied Environmental Statistics with R.
     John Wiley and Sons Inc. To appear.

_E_x_a_m_p_l_e_s:

     #required library
     #require(IPSUR)
     data(chorizon)
     lit=1
     # This example needs additional libraries:
     #scatter3dPETER(x=log10(chorizon[chorizon$LITO==lit,"Cr"]), 
     #               z=log10(chorizon[chorizon$LITO==lit,"Cr_INAA"]),
     #               y=log10(chorizon[chorizon$LITO==lit,"Co"]),
     #               xlab="",ylab="",zlab="",
     #               neg.res.col=gray(0.6), pos.res.col=gray(0.1), point.col=1, fov=30,
     #               surface.col="black",grid.col="gray",sphere.size=0.8)

