[R-sig-ME] response variable distribution-MCMCglmm

Mollie Brooks mollieebrooks at gmail.com
Thu Jun 22 11:01:44 CEST 2017


Hi Walid,

If you do end up needing a Tweedie GLMM (with or without zero-inflation), it can be done with the Github version of glmmTMB (installation instructions here https://github.com/glmmTMB/glmmTMB <https://github.com/glmmTMB/glmmTMB>). 

Here is a simple example with data simulated from the tweedie package. We haven’t added the Tweedie’s power parameter to the summary output yet, but it’s possible to get it from the guts of the model.

> library(tweedie)
> library(glmmTMB)
> nobs <- 2000; mu <- 4; phi <- 2; p <- 1.7
> set.seed(101)
>   y <- rtweedie(nobs, mu=mu, phi=phi, power=p)
>   twm <- glmmTMB(y ~ 1, family=tweedie())
> unname( exp(fixef(twm)$cond))
[1] 4.074143
> exp(fixef(twm)$disp)
(Intercept) 
   2.041696 
> unname( plogis(twm$fit$par["thetaf"]) + 1)
[1] 1.70192
> summary(twm)
 Family: tweedie  ( log )
Formula:          y ~ 1

     AIC      BIC   logLik deviance df.resid 
 10064.2  10081.0  -5029.1  10058.2     1997 


Overdispersion parameter for tweedie family (): 2.04 

Conditional model:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  1.40466    0.02592    54.2   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

cheers,
Mollie

> On 21Jun 2017, at 20:10, Paul Buerkner <paul.buerkner at gmail.com> wrote:
> 
> Hi Walid,
> 
> I am also not aware of any such distribution in MCMCglmm, but you may want
> to try out the "hurdle_gamma" or "hurdle_lognormal" family in the brms R
> package, to model positive real responses with zero-inflation.
> 
> Best,
> Paul
> 
> 2017-06-21 19:57 GMT+02:00 Walid <walidmawass10 at gmail.com>:
> 
>> Hello everyone,
>> 
>> I have a question regarding appropriately choosing the distribution for a
>> response variable in MCMCglmm in R. My variable is a fitness trait
>> calculated from the total lifetime reproductive success of the individual,
>> the rate of growth of the population and individual survival (Following
>> Method in Moorad(2014)).
>> 
>> The variable we arrived at is inflated at zero and the rest of the values
>> (non-integer and non-negative) fall into an almost gaussian distribution
>> (descriptively somewhat of a zero inflated Poisson distribution). After
>> doing lots of research regarding extended distributions, the best result I
>> found was that this variable may follow a Tweedie distribution, more
>> specifically a compound Poisson-gamma distribution (through descriptively
>> comparing the distributions).
>> 
>> The problem here is that I don't know how to include this in my MCMCglmm
>> model, I do not recall if the families of distributions supported in
>> MCMCglmm include Tweedie distributions. And if not, I do not know if there
>> is a convenient approximation method to accommodate this.
>> 
>> I hope my question fits the general requirement of this list that the
>> subject be related to mixed models.
>> 
>> Thank you in advance
>> 
>> --
>> Walid Mawass
>> Maitrise en Biologie Cellulaire et Moléculaire
>> Laboratoire de Génétique des Populations
>> Département de Chimie, Biochimie et Physique
>> Université du Quebec à Trois-Rivières
>> 3351, Boul. des Forges, C.P.500
>> Tel. (819)-376-5011 poste 3384
>> 
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


	[[alternative HTML version deleted]]



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