Description Usage Arguments Value Author(s) References See Also Examples
View source: R/predict.gamsel.R
Make predictions from a gamsel
object.
1 2 3 4 5 6 7 8 |
object |
Fitted |
newdata |
|
index |
Index of model in the sequence for which plotting is desired. Note, this is NOT a lambda value. |
type |
Type of prediction desired. Type |
... |
Not used |
Either a vector aor a matrix is returned, depending on type
.
Alexandra Chouldechova and Trevor Hastie
Maintainer: Trevor
Hastie hastie@stanford.edu
Chouldechova, A. and Hastie, T. (2015) Generalized Additive Model Selection
gamsel
, cv.gamsel
,
summary.gamsel
, basis.gen
1 2 3 4 5 6 7 | ##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)
preds=predict(gamsel.out,X,index=20,type="terms")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.