Learn R Programming

cosso (version 2.1-0)

plot.cosso: Plot method for COSSO object

Description

Plot $L_2$ norm solution path or main effects of selected functional components

Usage

## S3 method for class 'cosso':
plot(x,M,plottype =c("Path","Functionals"),eps=1e-7,...)

Arguments

x
a cosso object
M
a smoothing parameter value. M should be taken between 0 and p. Arguement required when plottype="Functionals"
plottype
either Path (default) or Functionals. The Path plot shows the $L_2$ norm path for each functional component as a function of smoothing parameter M. The Functional plot shows the estimated functional components f
eps
an effective zero, default is 1e-7
...
additional arguments for plot generic

Value

  • NULL

See Also

predict.cosso

Examples

Run this code
data(ozone)
## Use half of the observations for demonstration
set.seed(27695)
train.id <- sort(sample(1:nrow(ozone),ceiling(nrow(ozone)/2)))
cossoObj <- cosso(x=ozone[train.id,2:5],y=ozone[train.id,1],nbasis=50)
plot.cosso(cossoObj,plottype="Path")
plot.cosso(cossoObj,M=2,plottype="Functionals")

Run the code above in your browser using DataLab