[R-sig-ME] Back-transformation of Poisson model

Jarrod Hadfield j.hadfield at ed.ac.uk
Tue Jan 12 19:41:52 CET 2010



----- Forwarded message from j.hadfield at ed.ac.uk -----
     Date: Tue, 12 Jan 2010 18:38:06 +0000
     From: Jarrod Hadfield <j.hadfield at ed.ac.uk>
Reply-To: Jarrod Hadfield <j.hadfield at ed.ac.uk>
  Subject: Re: [R-sig-ME] Back-transformation of Poisson model
       To: "Kardynal,Kevin [Yel]" <Kevin.Kardynal at EC.gc.ca>

Dear Kevin,

You will have to exponentiate the output from predict.

It is worth noting there are three types of prediction (on the
data-scale) you could make:

a) exp(Xb)
b) exp(Xb+Zu)
c) int exp(Xb)du assuming the u's are iid.

X - fixed effect design matrix  b - fixed effects
Z - random effect design matrix  u - fixed effects

You have done the first, but this can be very different from c, which
is what I expect you want: the predictions averaged over possible
realisations of the random effects.

To obtain c use exp(Xb+0.5*v)

where v is the sum of the variance components. If you use additive
over-dispersed models you want to include the "residual" variance in
v, also.

Cheers,

Jarrod

Quoting "Kardynal,Kevin [Yel]" <Kevin.Kardynal at EC.gc.ca>:

> Hello,
>
> I'd like to know if predicted values from  a Poisson mixed model require
> back-transformation to get the 'real' predicted values or if this is
> done automatically? I assume that the predicted values are already
> back-transformed since my results are similar to the annual means.
>
> My model for estimating bird trends in lme4 is as such:
>
> lme3<-lmer(Abundance ~ Year +  (1|Observer) + (1|Site/Station),
> data=SWTH, family = poisson(link=log))
>
> I then took the coefficients from the mixed model and used them in a GLM
> to derive the predicted values.
> dd <-fixef(lme3) # gives coefficients
>
> lme_glmDEY <- glm(Abundance ~ Year, data=SWTH, family = poisson(link =
> log)) # for poisson distribution
> lme_glmDEY$coefficients <- dd
>
> # create a data set of predicted values
> pred <- as.data.frame(predict(lme_glmDEY, SWTH , "response", se.fit=T))
> pred_val <- as.data.frame(cbind(SWTH,pred))
>
> So, do I have to perform a back-transformation on the predicted values
> (ie., using exp())?
>
> Thanks,
>
> Kevin
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



----- End forwarded message -----


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the R-sig-mixed-models mailing list