[R-sig-ME] glmm.admb {glmmADMB} vs glmer {lme4}
dave fournier
otter at otter-rsch.com
Sun Nov 1 00:13:08 CET 2009
> > My questions are:
> >
> > 1) How can I extract the AIC values from m1?
> >
> > 2) Are the AIC values comparable between the two models (i.e. can I
> compare
> > them for model selection)?
> >
> > 3) For m2, the true estimates for the fixed effects can be calculated by
> > exp(returned estimate). Is this true for m1 too, or does the negative
> > binomial distribution require a different conversion?
> >
The simplest way is to use the save.dir option as in
if(nchar(pkg)) library(pkg, character.only=TRUE)})
ex1m <-read.table("C:\\....\\ex1m.txt", header=TRUE, sep="\t")
m1a<-glmm.admb(Counts~T+T:Year2+T:Year3+B+B:Year2+B:Year3+P+P:Year2+P:Year3+Year2+Year3,
random=~Site, group="Year", data=ex1m,
family="nbinom",zeroInflation=TRUE,save.dir="c:/dir1")
m1b<-glmm.admb(Counts~T:Year2+T:Year3+B+B:Year2+B:Year3+P+P:Year2+P:Year3+Year2+Year3,
random=~Site, group="Year", data=ex1m,
family="nbinom",zeroInflation=TRUE,dir="c:/dir2")
The parameters together with estimated standard deviations will be found
in c:/dir1 and c:/dir2 in the file nbmm.std. the -log-likelihood is in
the file nbmm.par. that can be used for a likelihood ratio test on the
significance of adding the parameter T to the model.
The file nbmm.rep contains the predicted mean for each observation in
the second column of the list. I believe this is what you mean by
"exp(returned estimate)".
The standard glmmADMB parameterizes the variance as mu*(1+mu/alpha)
However for you data it turns out that parameterizing the variance as
mu*tau produces a much better fit to the data. The log-likelihoods are
about -1530 and -1465 so you should use this formulation.
Interestingly it turns out that adding T signficantly improves the fit
for the former parametrization of the variance but not for the latter
parametrization.
I think this illustrates the importance of estimating the overdispersion
within the model rather than by ad hoc quasi-likelihood hacks. It also
illustrates the utility of employing tools like AD Model Builder
which make it easy to modify the form of your model rather than being
trapped in the glmm paradigm.
--
David A. Fournier
P.O. Box 2040,
Sidney, B.C. V8l 3S3
Canada
Phone/FAX 250-655-3364
http://otter-rsch.com
More information about the R-sig-mixed-models
mailing list