# NOT RUN {
data(mscm)
mscm=na.omit(mscm)
# -- random forest model (predicting illness, with stress and illness as historical predictors)
ff=hrf(x=as.matrix(mscm),id=mscm$id,time=mscm$day,yindx=4,vh=c(3,4),vc=c(1,2,5:14))
vi=varimp_hrf(ff,nperm=20)
vi=vi[vi>0]
vi=vi[order(vi,decreasing=TRUE)]
barplot(vi,main="Importance z-scores")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab