Can I make predictions with mixed effect aster model using newdata?

112 views
Skip to first unread message

Xiaojing Wei

unread,
May 1, 2015, 12:40:19 AM5/1/15
to aster-analys...@googlegroups.com
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

 

geyer

unread,
May 3, 2015, 6:17:25 AM5/3/15
to aster-analys...@googlegroups.com
I am not sure what you mean by "mixed effect aster model".  If you mean an R object of class "reaster" which is the result produced by the R function reaster, then there is no function predict.reaster.  So no wonder predict(foo, other options) does not work when foo is a reaster object.

The reason is that it is very unclear what prediction means for generalized linear mixed models and random effects aster models.  There are quite a few different things it could mean, but no one obvious default choice.  It is still an open research question as to what such a function should do.  So you are on your own (but if you can describe exactly what you want, we can tell you how to do it).  Before you try to describe what you want, see slides 154 ff. of deck 6 of the course slides for my course on aster models http://www.stat.umn.edu/geyer/8931aster/slides/s6.pdf#page=154.

If you weren't using reaster, then it is even less clear what problem you encountered.

JSG

unread,
May 3, 2015, 9:19:48 PM5/3/15
to aster-analys...@googlegroups.com
To emphasize what Charlie said, the issue of prediction for generalized linear mixed models is messy to say the least - I recently encountered this wiki-page that you may find informative (not in regards to aster though):

Reply all
Reply to author
Forward
0 new messages