plot.msgps {msgps} | R Documentation |
plot the solution path from a "msgps" object.
Description
This functions predicts fitted values from a "msgps" object.
Usage
## S3 method for class 'msgps'
plot(x, criterion="cp", xvar="norm", yvar="coef", yvar.dflasso=TRUE,
stand.coef=TRUE, plot.step = 1000, col=TRUE,...)
Arguments
x |
Fitted |
criterion |
The code |
xvar |
The type of x variable. |
yvar |
The type of y variable. |
yvar.dflasso |
For lasso penalty, the degrees of freedom of the lasso (the number of non-zero parameters) is given when |
stand.coef |
The standardized coefficients and tuning parameters are dipicted if "stand.coef=TRUE". |
plot.step |
The number of steps to plot the solution of df. As |
col |
The color option. |
... |
Other graphical parameters to plot |
Value
The object returned depends on type.
Author(s)
Kei Hirose
mail@keihirose.com
See Also
coef.msgps
, predict.msgps
and summary.msgps
objects.
Examples
#data
X <- matrix(rnorm(100*8),100,8)
beta0 <- c(3,1.5,0,0,2,0,0,0)
epsilon <- rnorm(100,sd=3)
y <- X %*% beta0 + epsilon
y <- c(y)
#fit
fit <- msgps(X,y)
plot(fit,criterion="cp") #plot the solution path with a model selected by Cp criterion