R: plot the solution path from a "msgps" object.

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 `"msgps"` model object.

`criterion` | The code `criterion` plots the value of tuning parameter of each criterion (`"cp"`, `"aicc"`, `"gcv"`, `"bic"`). The code `"none"` does not depict the tuning parameter.
`xvar` | The type of x variable. `"xvar=norm"` is max|beta|/|beta|, `"xvar=sum"` is max|beta|, `"xvar=step"` is the number of steps, and `"xvar=t"` is tuning parameter.
`yvar` | The type of y variable. `"yvar=coef"` is the standardized coefficients, and `"tvar=df"` is the degrees of freedom.
`yvar.dflasso` | For lasso penalty, the degrees of freedom of the lasso (the number of non-zero parameters) is given when `"yvar=df"` and `"yvar.dflasso=TRUE"`.
`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 `plot.step` increases, the picture will be well-looking whereas the file size of the picture will increase.
`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

[Package msgps version 1.3 Index]