plot.msgps | R Documentation |
This functions predicts fitted values from a "msgps" object.
## S3 method for class 'msgps' plot(x, criterion="cp", xvar="norm", yvar="coef", yvar.dflasso=TRUE, stand.coef=TRUE, plot.step = 1000, col=TRUE,...)
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 |
The object returned depends on type.
Kei Hirose
mail@keihirose.com
coef.msgps
, predict.msgps
and summary.msgps
objects.
#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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.