[R] Marginal Predicitions from nlme and lme4

Thomas Lumley tlumley at u.washington.edu
Wed Aug 23 00:50:41 CEST 2006

On Tue, 22 Aug 2006, Rick Bilonick wrote:

> On Wed, 2006-08-23 at 06:43 +1000, Andrew Robinson wrote:
>> Rick,
>> if by marginal prediction, you mean the prediction without random
>> effects, then use the "level" argument.  See ?predict.lme or ?fitted.lme
>> If not then I don't know :)
>> Cheers
>> Andrew
> Thanks. I'm familiar with level in predict and fitted for lme. These
> allow you to select the fixed effects and/or the random effects. The
> marginal prediction integrates out the random effects and is what a GEE
> marginal model produces. From what I've read, the marginal effects seem
> to be less desirable than the fixed effects from an lme or a generalized
> lme. But I would still like to compute them for comparison.

I don't agree that they are less useful, but they are not in general easy 
to obtain from a GLMM.  For any linear link model or a log link model that 
has only random intercepts the marginal and conditional effects are the 
same.  For the probit model there is a conversion formula, but for other 
models they typically require high-dimensional integration to compute.

It's easy just to fit a marginal glm if you want marginal coefficients and 
a mixed model if you want conditional coefficients.


More information about the R-help mailing list