plot.gqc: plot Method for Class 'gqc'

Description Usage Arguments Details See Also Examples

View source: R/plot.gqc.R

Description

Plot the fitted data set and quadratic decision boundary.

Usage

1
2
3
## S3 method for class 'gqc'
plot(x, fitdb = TRUE, initdb = FALSE, 
    xlim = NULL, ylim = NULL, bg, pch, npoints = 100, ...) 

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.

xlim

the x limits of the plot. If NULL, limits are calculated from the model matrix. Default to NULL.

ylim

the y limits of the plot. If NULL, limits are calculated from the model matrix. Default to NULL.

bg

the background color to be used for points in 2D scatter plot. Default is c("white", "gray")[response] where response represents the response vector of the model

pch

the symbols to be used as points in 2D scatter plot. Default is c(21,24)[x$category]

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

lines.gqcStruct, {plot3d.gqc}

Examples

1
2
3
4
data(subjdemo_2d)
fit.2dq <- gqc(response ~ x + y, data=subjdemo_2d, 
    category=subjdemo_2d$category, zlimit=7)
plot(fit.2dq)

matsukik/grt documentation built on May 21, 2019, 12:57 p.m.