grt (version 0.2.1)

lines.gqcStruct: lines Method for class 'gqc'

Description

Add a quadratic decision boundary line through the current plot.

Usage

# S3 method for gqcStruct
lines(x, 
    xlim = c(0,1), ylim = c(0,1), 
    npoints = 100, col = "black", 
    …)

Arguments

x

object of class gqcStruct

xlim

the x limits of the plot. Default to c(0,1)

ylim

the y limits of the plot. Default to c(0,1)

npoints

numeric. number of points per dimension used to plot the decision bound. Default is 100.

col

the color to be used for the line

further arguments.

Value

an invisible list of x- and y-coordinates of the line:

x

a vector of x-coordinates of the line

y

a vector of y-coordinates of the line

See Also

plot.gqc, {plot3d.gqc}

Examples

Run this code
# NOT RUN {
data(subjdemo_2d)
fit.2dq <- gqc(response ~ x + y, data=subjdemo_2d, 
     category=subjdemo_2d$category, zlimit=7)
plot(fit.2dq, fitdb=FALSE, initdb=FALSE)
lines(fit.2dq$par, xlim=c(0,400), ylim=c(0,400), col="red")
lines(fit.2dq$initpar, xlim=c(0,400), ylim=c(0,400), col="blue")
# }

Run the code above in your browser using DataLab