Description Usage Arguments Value Examples
Prediction Function for MixRF
1 2 |
object |
The fitted MixRF object. |
newdata |
A data frame contains the predictors for prediction. |
id |
The group variable in the new data. |
EstimateRE |
To use the estimated random effects in the prediction or not. The default is TRUE. |
A matrix (now for balanced data) contains the predicted values.
1 2 3 4 5 6 7 8 | library(lme4)
library(randomForest)
data(sleepstudy)
tmp = MixRF(Y=sleepstudy$Reaction, x=as.data.frame(sleepstudy$Days), random='(Days|Subject)',
data=sleepstudy, initialRandomEffects=0, ErrorTolerance=0.01, MaxIterations=100)
pred = predict.MixRF(object=tmp, newdata=sleepstudy, EstimateRE=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.