Learn R Programming

grt (version 0.1.0)

plot3d.gqc: plot3d Method for Class 'gqc'

Description

plot the fitted 3D data set and quadratic decision boundaries.

Usage

## S3 method for class 'gqc':
plot3d(x, fitdb = TRUE, initdb = FALSE, 
    lims = NULL, npoints = 100, alpha = .5, 
    fill = TRUE, smooth = FALSE, \dots)

Arguments

x
object of class gqc
fitdb
logical. If TRUE, the fitted decision bound will be plotted. Default to TRUE
initdb
logical. If TRUE, the decision bound specified by the initial parameters will be plotted. Default to FALSE
lims
column matrix of the x, y, and z limits of the plot. If NULL, limits are calculated from the model matrix of x. Default to NULL.
npoints
number of points per dimention (i.e., x, y, and z) used to plot the decision bound surface. Default is 100.
alpha
alpha value for the descision bound surface(s) ranging form 0 (fully transparent) to 1 (opaque). Default is .5
fill
logical. If TRUE, descision bounds (if fitdb or initdb is set to TRUE) should be drawn with filled surfaces. If FALSE, a wire frame should be used. Default to TRUE.
smooth
logical. If TRUE, smooth shading should be used. Default to FALSE.
...
further arguments.

Details

This function produces a 3D scatter plot of data matrix of x and (optionally) quadratic descision boundaries specified within (i.e., x$par and/or x$initpar), using points3d function in the rgl package and contour3d function in the misc3d package respectively.

References

Daniel Adler, Oleg Nenadic and Walter Zucchini (2003) RGL: A R-library for 3D visualization with OpenGL

See Also

plot.gqc, {plot3d.gqc}

Examples

Run this code
data(subjdemo_3d)
fit.3dq <- gqc(response ~ x + y + z, data=subjdemo_3d, 
    category=subjdemo_3d$category, zlimit=7)
plot3d(fit.3dq)

Run the code above in your browser using DataLab