[R] GLMMs & LMEs: dispersion parameters, fixed variances, design matrices

Mark.Bravington@csiro.au Mark.Bravington at csiro.au
Thu May 13 10:08:01 CEST 2004


Three related questions on LMEs and GLMMs in R:

(1) Is there a way to fix the dispersion parameter (at 1) in either glmmPQL (MASS) or GLMM (lme4)? 

Note: lme does not let you fix any variances in advance (presumably because it wants to "profile out" an overall sigma^2 parameter) and glmmPQL repeatedly calls lme, so I couldn't see how glmmPQL would be able to fix the dispersion parameter. The section on glmmPQL in V&R4 says that the default is to estimate the dispersion parameter, but didn't seem to say how to change the default.

(2) Is there a way to tell lme (either in nlme or lme4) to just use a specified design matrix Z for the random effects, rather than constructing one itself from factors? Sometimes I would really like to use my own funny-looking Z matrix (e.g. with non-integer coefficients), and even with contrasts() I haven't managed to do this.

(3) Are there any plans to allow some variances to be fixed in lme? It would be useful e.g. for meta-analysis (and indeed for glmms with fixed dispersion).

Note: it has occurred to me that lme can possibly be tricked into fixing the measurement error variance (i.e. var[y|b] where b is the random effects and y the observed data) at some specified value e.g. 1 by adding two pseudo-observations at +/-1, with all zeros in the corresponding rows of the X and Z matrices, and with huge weights. Then sum( w*(y-E[y|b,params])^2) / sum(w) will be approximately 1, and any attempt to change the estimate of sigma^2 away from 1 will be "deterred" by a large penalty. Similar tricks might be possible for fixing other variances. However this approach is not nice and perhaps might cause computational problems-- and I haven't actually tried it yet.

Thanks for any help

Mark

*******************************

Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001

phone (61) 3 6232 5118
fax (61) 3 6232 5012
Mark.Bravington at csiro.au




More information about the R-help mailing list