plot.splmm | R Documentation |
splmm.tuning
objectThis function inputs an splmm.tuning
object and plot the model selection criterion values over the tuning parameters grid.
## S3 method for class 'splmm'
plot(x, ...)
x |
a |
... |
not used |
A line plot of BIC, AIC, BICC, EBIC values against lam1 or lam2 depending on the inout.
plot.splmm
data(cognitive)
x <- model.matrix(ravens ~schoolid+treatment+year+sex+age_at_time0
+height+weight+head_circ+ses+mom_read+mom_write
+mom_edu, cognitive)
z <- x
## Tuning over lambda1 grid
lam1 = seq(0.1,0.5,0.1)
lam2 = 0.1
fit1 <-splmmTuning(x=x,y=cognitive$ravens,z=z,grp=cognitive$id,lam1=lam1,
lam2=lam2,penalty.b="scad", penalty.L="scad")
plot.splmm(fit1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.