plot.gqc {grt} | R Documentation |
plot Method for Class 'gqc'
Description
Plot the fitted data set and quadratic decision boundary.
Usage
## S3 method for class 'gqc'
plot(x, fitdb = TRUE, initdb = FALSE,
xlim = NULL, ylim = NULL, bg, pch, npoints = 100, ...)
Arguments
x |
object of class |
fitdb |
logical. If |
initdb |
logical. If |
xlim |
the x limits of the plot. If |
ylim |
the y limits of the plot. If |
bg |
the background color to be used for points in 2D scatter plot.
Default is |
pch |
the symbols to be used as points in 2D scatter plot. Default is |
npoints |
number of points per dimension used to plot the decision bound. Default is 100. |
... |
further arguments. |
Details
This function produces a scatter plot of data matrix in the x
and (optionally) decision boundary (i.e., x$par
and/or x$initpar
).
The look of the plot differs depending on the dimension of the model. If the dimension is 2, scatter plot of the model matrix is plotted. If the dimension is 3, plot3d.gqc
is called to create a 3D scatter plot. In all other cases, an error message will be returned.
See Also
Examples
data(subjdemo_2d)
fit.2dq <- gqc(response ~ x + y, data=subjdemo_2d,
category=subjdemo_2d$category, zlimit=7)
plot(fit.2dq)