Hi everyone,
I would like to make predictions with a mixed effect aster model, using a "newdata" like what one can do with the fixed effect aster model. My mixed effect model has a continuous fixed effect which is a covariate, i.e. it affects fitness but I am not interested in its effect, so I would like to predict fitness based on the other predictors that I am interested in while holding this one constant.
I created a newdata (with the covariate being a constant) and tried to make predictions as with a fixed effect aster model, using codes like this:
pred.newdata<-predict(mixed_aster_model$obj, newdata = renewdata, varvar = varb, idvar = id, root = root, se.fit = TRUE)
The codes got run by R without warnings but the predictions were made based on the original data, instead of the newdata. Is there a way to make prediction based on the newdata using the mixed effect model?
Thanks a lot in advance!
Xiaojing