Hi Pablo,
My instructions were, indeed, faulty. Use
summary(model) @ sigma
Hank
On Aug 21, 2008, at 8:07 AM, logodall wrote:
> Hi Hank,
> Thanks for the prompt reply. In retrospect, your answers are both
> evident (Pearson residuals for Poisson; variance of Poisson
> model=1) and reassuring (I should have thought about them). I just
> wanted to avoid making silly mistakes in the absence of more
> detailed information. My needing of the residual variance was to
> calculate the % of variation explained at different levels of the
> hierarchy of random effects.
> The instructions sigma(model) or sigma( summary (model)) do not
> work in lme4, but I can calculate var(resid(model))=0.86.
> Thanks again.
> Pablo
>
>
> ----- Message d'origine ----
> De : Martin Henry H. Stevens
> À : logodall
> Envoyé le : Jeudi, 21 Août 2008, 12h03mn 12s
> Objet : Re: [R-sig-ME] residual variance in nested mixed model with
> family=Poisson?
>
> Hi Pablo,
> By definition, the residual variance of the Poisson model is 1. The
> quasi-Poisson model has a dispersion factor (aka scale factor) that
> is called sigma, in lmer -- get it with sigma(model) or sigma
> ( summary (model)), I forget. The residuals (get them with resid
> (model) ) are
> Pearson residuals
> (y[i] - ybar) / sqrt( Var(y) ), where Var(y) is ybar for Poisson
> data, and ybar *sigma for quasi-Poisson data.
>
> Hank
>
> On Aug 21, 2008, at 5:50 AM, logodall wrote:
>
> > Hello,
> > I would like to ask if it is possible (and if so how) to
> obtain an estimate of the residual variance of a mixed model
> > having a set of nested random factors when using family=Poisson.
> I have searched in the help files and in the forum and I found no
> > information in this regard. When using family=Gaussian, one
> obtains by default this variance but not when using Poisson. In the
> latest
> > verion of lme4, one can now obtain the residuals of a fitted
> model when family=Poisson, and one can of course calculated the
> variance
> > of these residuals. However, not being sure of how these
> residuals are calculated (are they standardised?, raw?, etc), I am
> unsure of
> > using their variance as an estimate of the residual variance in
> a nested mixed model.
> > Many thanks in advance,
> > Regards,
> > Pablo
> >
> >
> >
> >
> >
> ______________________________________________________________________
> > _______
> >
> > o.fr
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> Dr. Hank Stevens, Associate Professor
> 338 Pearson Hall
> Botany Department
> Miami University
> Oxford, OH 45056
>
> Office: (513) 529-4206
> Lab: (513) 529-4262
> FAX: (513) 529-4243
> http://www.cas.muohio.edu/~stevenmh/
> http://www.users.muohio.edu/harkesae/
> http://www.cas.muohio.edu/ecology
> http://www.muohio.edu/botany/
> "E Pluribus Unum"
>
> "I love deadlines. I love the whooshing noise they make as they go
> by."
> (Douglas Adams)
>
>
> If you send an attachment, please try to send it in a format anyone
> can read, such as PDF, text, Open Document Format, HTML, or RTF.
> Why? See: http://www.gnu.org/philosophy/no-word-attachments.html
>
>
>
>
>
>
> Envoyé avec Yahoo! Mail.
> Une boite mail plus intelligente.
Dr. Hank Stevens, Associate Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056
Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.users.muohio.edu/harkesae/
http://www.cas.muohio.edu/ecology
http://www.muohio.edu/botany/
"E Pluribus Unum"
"I love deadlines. I love the whooshing noise they make as they go by."
(Douglas Adams)
If you send an attachment, please try to send it in a format anyone
can read, such as PDF, text, Open Document Format, HTML, or RTF.
Why? See: http://www.gnu.org/philosophy/no-word-attachments.html
[[alternative HTML version deleted]]