Learn R Programming

cosso (version 2.1-0)

tune.cosso: Compute K-fold cross-validated error or BIC score for COSSO

Description

Compute the K-fold cross-validated mean squared prediction error or BIC score for COSSO.

Usage

tune.cosso(object,type=c("BIC","CV"),folds=5,plot.it=TRUE)

Arguments

object
a cosso object
type
type of tuning method
folds
number of folds for corss-validation. Arguement required when type="CV". Default is 5
plot.it
if TRUE, plot the cross-validated error or the BIC score curve

Value

  • OptMthe optimal smoothing parameter for M
  • OptLamthe optimal smoothing parameter for $\lambda_0$
  • Mgrida grid points for smoothing parameter M at which CV/BIC is computed
  • ICa list containing either cross-validated error or BIC score
  • L2normfunctional $L_2$-norm computed at each grid point

References

Lin, Y and Zhang, H. H. (2006). "Component Selection and Smoothing in Smoothing Spline Analysis of Variance Models", Annals of Statistics, 34, 2272--2297. Storlie, C. B., Bondell, H. D., Reich, B. J. and Zhang, H. H. (2011). "Surface estimation, variable selection, and the nonparametric oracle property", Statistica Sinica, 21, 679--705.

See Also

cosso, predict.cosso

Examples

Run this code
data(ozone)
cossoObj <- cosso(x=ozone[,2:5],y=ozone[,1],nbasis=30)
tune.cosso(cossoObj,type="BIC")

## Tune by 5-fold CV
tune.cosso(cossoObj,type="CV")

Run the code above in your browser using DataLab