# NOT RUN {
## Use splmm on the Kenya school cognitive data set
data(cognitive)
x <- model.matrix(ravens ~ schoolid+treatment+relyear+sex+age_at_time0+height+weight+head_circ+ses1
+readtest+writetest+yrsofsch, cognitive)
z <- model.matrix(ravens ~ schoolid+treatment+relyear, cognitive)
fit <- splmm(x=x,y=cognitive$ravens,z=z,grp=cognitive$id,lam1=0.01,
lam2=0.01,penalty.b="scad", penalty.L="scad")
summary(fit)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace