# \donttest{
library(regsem)
# put variables on same scale for regsem
HS <- data.frame(scale(HolzingerSwineford1939[,7:15]))
mod <- '
f =~ 1*x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9
x1 ~~ r1*x2;x1 ~~ r2*x3;x1 ~~ r3*x4;x1 ~~ r4*x5
'
outt = cfa(mod, HS)
stabsel.out = stabsel(data=HS,model=mod,det.range=TRUE,detr.nlambda=20,n.lambda=5,
n.boot=10,p=0.9,type="alasso", p.method="aic",
pars_pen=c("r1","r2","r3","r4"))
stabsel.out$selection_results
# }
Run the code above in your browser using DataLab