Description Usage Arguments Details Examples
Plot the fitted data set and decision boundary.
1 2 |
x |
object of class |
fitdb |
logical. If |
initdb |
logical. If |
xlim |
the x limits of the plot |
ylim |
the y limits of the plot |
bg |
the background color to be used for points. Default is |
pch |
the symbols to be used as points. Default is |
... |
further arguments. |
This function produces a scatter plot of data matrix in the x
and (optionally) decision boundary specified within (i.e., x$par
and/or x$initpar
).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | m <- list(c(100,200),c(100,100),c(200,100),c(200,200))
covs <- diag(30^2, ncol=2, nrow=2)
set.seed(1)
CJ <- grtrnorm(n=c(50,20,10,20), np=4, means=m, covs=covs)
CJ$category <- c(1,2,2,2)[CJ$category]
#create ramdom responses with 80% accuracy
CJ$response <- CJ$category
set.seed(1)
incorrect <- sample(1:100, size=20)
CJ$response[incorrect] <- abs(CJ$response[incorrect] - 3)
#now fit the model
m.cj <- gcjc(response ~ x1 + x2, data=CJ, config=2, category=CJ$category, zlimit=7)
plot(m.cj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.