Roberto Patuelli
2009-Jan-30 18:57 UTC
[R] Fitted values and residuals from glmmPQL (MASS package)
Dear All, I would like to analyse the residuals from a generalized linear mixed model (GLMM) that I estimated, with random effects, by means of the command glmmPQL, from the MASS package. It is not very clear to me what the actual residuals to analyse are (Y - Yhat): I obtain two columns of residuals, of which the first are population residuals, and the second refer to the grouping used in the random effects. Which of the two (or which combination of the two) are my actual errors? Working the problem through the fitted values creates the same confusion to me, as I also have two columns of fitted values. There's probably something about the way mixed models are treated in R that I'm not catching here... Can someone help me? Thanks and best regards, Roberto Patuelli ******************** Roberto Patuelli, Ph.D. Post-doc researcher Institute for Economic Research (IRE) University of Lugano via Maderno 24, CP 4361 CH-6904 Lugano Switzerland Phone: +41-(0)58-666-4166 Fax: +39-02-700419665 Email: roberto.patuelli@lu.unisi.ch Homepage: http://www.people.lu.unisi.ch/patuellr ******************** [[alternative HTML version deleted]]
Prof Brian Ripley
2009-Jan-30 19:44 UTC
[R] Fitted values and residuals from glmmPQL (MASS package)
glmmPQL is a wrapper for lme, so look at its documentation (and the especially the Pinheiro-Bates book). On Fri, 30 Jan 2009, Roberto Patuelli wrote:> Dear All, > > I would like to analyse the residuals from a generalized linear mixed model (GLMM) that I estimated, with random effects, by means of the command glmmPQL, from the MASS package. > > It is not very clear to me what the actual residuals to analyse are (Y - Yhat): I obtain two columns of residuals, of which the first are population residuals, and the second refer to the grouping used in the random effects. Which of the two (or which combination of the two) are my actual errors? > Working the problem through the fitted values creates the same confusion to me, as I also have two columns of fitted values. > > There's probably something about the way mixed models are treated in R that I'm not catching here... > Can someone help me? > > Thanks and best regards, > Roberto Patuelli > > ******************** > Roberto Patuelli, Ph.D. > Post-doc researcher > Institute for Economic Research (IRE) > University of Lugano > via Maderno 24, CP 4361 > CH-6904 Lugano > Switzerland > Phone: +41-(0)58-666-4166 > Fax: +39-02-700419665 > Email: roberto.patuelli at lu.unisi.ch > Homepage: http://www.people.lu.unisi.ch/patuellr > ******************** > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595