[R] tweedie and lmer

Simon Wood s.wood at bath.ac.uk
Thu Aug 27 15:33:25 CEST 2009


If you don't have too many groups then you could get mgcv:gam to fit this 
using the Tweedie family from mgcv. It's a bit fiddly, but there's an example 
at the end of ?gam.models with exactly your RE structure. 

On Wednesday 26 August 2009 17:30, Mohammad AlMarzouq wrote:
> Hello all,
>
> I have count data with about 36% of observations being zeros. I found
> in some of the examples of the r-help mail archives that a tweedie
> family of distributions could be used to fit a model with random
> effects. Upon installing the tweedie package and attempting to fit the
> following model:
>
> lmer(SUS ~ 1 + (1|
> GRP),REML=FALSE,data=mydata,family=tweedie(var.power=1.55,link.power=0))
>
> I get the following error:
>
> Error in famType(glmFit$family) : unknown GLM family: ‘Tweedie’
>
> If it helps, im on a mac with R V 2.9.1, lme4 V.0.999375-31, Tweedie
> V2.0.
>
> Thanks,
>
> Mohammad AlMarzouq
>
> ______________________________________________
> 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.

-- 
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603  www.maths.bath.ac.uk/~sw283 




More information about the R-help mailing list