plot.gamsel | R Documentation |
gamsel
ObjectProduces plots of the estimated functions for specified variables at a given
value of lambda
.
## S3 method for class 'gamsel'
plot(x, newx, index, which = 1:p, rugplot = TRUE, ylims, ...)
x |
Fitted |
newx |
|
index |
Index of lambda value (i.e., model) for which plotting is desired. |
which |
Which values to plot. Default is all variables, i.e.
|
rugplot |
If |
ylims |
|
... |
Optional graphical parameters to plot. |
A plot of the specified fitted functions is produced. Nothing is returned.
Alexandra Chouldechova and Trevor Hastie
Maintainer: Trevor
Hastie hastie@stanford.edu
Chouldechova, A. and Hastie, T. (2015) Generalized Additive Model Selection
gamsel
, and print.gamsel
, summary.gamsel
##set.seed(1211)
##data=gamsel:::gendata(n=500,p=12,k.lin=3,k.nonlin=3,deg=8,sigma=0.5)
data = readRDS(system.file("extdata/gamsel_example.RDS", package = "gamsel"))
attach(data)
bases=pseudo.bases(X,degree=10,df=6)
# Gaussian gam
gamsel.out=gamsel(X,y,bases=bases)
par(mfrow=c(3,4))
plot(gamsel.out,newx=X,index=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.