[R-sig-eco] Continuous distribution for zero or positive values (inGLM or GLMM)

Fred Takahashi fredtaka at gmail.com
Fri May 20 22:11:40 CEST 2011

> You can actually fit a glmm with the 'tweedie' family in glmmPQL:

In fact I had tried this yesterday with my data, but as my residual
plot had similar pattern that produced by a glmmPQL family=gaussian
(despite of different scale) I assumed that the implementation of
tweedie was incomplete. But now I seen that is only a peculiarity of
my data (so, I will look for other options than Tweedie distribution).

> gg <-
> glmmPQL(y~x,random=~1|f,data=d,family=tweedie(var.power=1,link.power=0))
> ====
>  However, you would probably want to do this in a loop if you want to
> estimate var.power as well.

For an analysis of real data, I will need to include the var.power in
the minimization algorithm (or select the best model with different
options of var.power)? I tried just to use tweedie.profile before
analysis... it is not OK? Ex:

out<-tweedie.profile(d$y~d$x,p.vec=seq(1.1, 1.9,
length=9),method="saddlepoint")#just for speed up the test...
gg <-glmmPQL(y~x,random=~1|f,data=d,family=tweedie(var.power=out$p.max,link.power=0))

Thank you again Ben

More information about the R-sig-ecology mailing list