[R] GLMM in lme4 and Tweedie dist.

lists at eva.mpg.de lists at eva.mpg.de
Fri Mar 9 10:00:43 CET 2007


Hi there,
I've been wanting to fit a GLMM and I'm not completely sure I'm doing 
things right. As I said in a previous message my response variable is 
continuous with many zeros, so I was having a hard time finding an 
appropriate error distribution. I read some previous help mails given to 
other people advising them to use the Tweedie distribution. I'm still 
not sure if this would be appropriate for my data set, for I'm a 
beginner and really don't follow all the details. So I ran a GLMM using 
this distribution. I ran it for several models to do later model 
selection with AIC. I used the following script, where the file 
"GLMM_tweedie" (line 2) has a list of all the models I want to run, each 
one in the form [ x=lmer(GGgiv ~ Rank_1 + Rank_diff + DAI + 
Gen_dy*Rank_diff + Gen_dy*DAI + Gen_dy + (1| D_1) + (1| D_2), family = 
tweedie(var.power=1,link.power=0), offset=log(Dt), data=data) ]

  data=read.csv(file="GLMM_data.csv")
 > models<-read.table("GLMM_tweedie.txt", sep="\t")
 > data$Ggrec_Dtlog = log(data$Ggrec_Dt+1)
 > models<-as.vector(models[,1])
 > totres=c()
 > for (i in 1:79) {model=models[i]
+ res=eval(parse(text=model))
+ res=AIC(logLik(x))
+ res=as.vector(res)
+ totres=rbind(totres,res)}

The output would then be just a list of all the AIC of each model. For 1 
of the models (the one in the [] above) I'm getting the following error 
message, which I don't know what it means:

CHOLMOD warning: matrix not positive definite
Error in objective(.par, ...) : Cholmod error `matrix not positive 
definite' at file:../Supernodal/t_cholmod_super_numeric.c, line 614

Could anybody give me some advice on using Tweedie distributions and 
does anybody have an idea what this error message means.
Thanks a lot in advance,
Cheers,
Cristina.



More information about the R-help mailing list