[R-sig-ME] Error with glmmADMB and beta distribution
Heather Kharouba
kharouba at zoology.ubc.ca
Wed Jun 13 18:44:32 CEST 2012
You're right, I have 116 AUC values of 1 (out of 4318 observations). I
tried running the model without these values and I still got the same
error. When I also excluded the random effect (in addition to removing AUC
values of 1) I got this error:
Estimated covariance matrix may not be positive definite
6.27097e-06 0.201327 0.239814 0.244739 0.260651 0.264242 0.277349
0.314547 0.325412 0.327576 0.33569 0.379634 0.410961 0.425718 0.433164
0.455047 0.466607 0.539125 0.578641 0.6752 0.712861 0.726921 0.970862
1.15373 1.64282
I have 20 studies but the data is very unbalanced ranging from 1 to 1778
observations/study. Before learning about glmmadmb, the only other
distribution that I found to work with this data is the quasi-binomial
distribution but then I have to rely on marginal tests of parameters which
I understand is not appropriate for unbalanced data and the variable I'm
interested in is categorical with more than 2 levels. I can't calculate
quasi-AIC as you suggest here:
http://cran.r-project.org/web/packages/bbmle/vignettes/quasi.pdf
because the binomial model won't converge. I realize I won't find a
perfect solution to this problem but I'm not sure which solution is the
least problematic!
Thanks,
Heather
> Heather Kharouba <kharouba at ...> writes:
>
>> I am new to glmmADMB and would like to use the beta distribution with
>> glmmadmb. However, I keep running into the same error. The response
>> variable is AUC (area under the curve data) from species distribution
>> models which is continuous and ranges from 0 to 1. The fixed variables
>> are
>> the number of variables used to build the model (continuous), spatial
>> extent of the distribution model (continuous), model type (factor) and
>> taxonomic group (categorical) and the random effect is study.
>>
>> Here's the model:
>>
>> model1<-glmmadmb(AUC~variables+log_area+model+taxa+(1|study),
>> family="beta", verbose=TRUE, data=auc);
>>
>> A snapshot of the data:
>>
>> study taxa AUC model variables log_area
>> Araujo et al. 2005 BIRD 0.9156878 GAM 7 16.21771
>> Araujo et al. 2005 BIRD 0.9288596 GAM 7 16.21771
>> Araujo et al. 2005 BIRD 0.9254065 GAM 7 16.21771
>> Araujo et al. 2005 BIRD 0.8825593 GAM 7 16.21771
>> Araujo et al. 2005 BIRD 0.9388894 GAM 7 16.21771
>> Araujo et al. 2005 BIRD 0.9061483 GAM 7 16.21771
>>
>> When I run the model I get this error:
>> Error in glmmadmb(AUC ~ variables + log_area + model + taxa + (1 |
>> study),
>> :
>> The function maximizer failed (couldn't find STD file)
>>
>
> [snip]
>>
>> I'm using glmm ADMB version 0.7.2.2 with R version 2.14.2 on a Mac OS X
>> Version 10.6.8. I've tried including
>> admb.opts=admbControl(shess=FALSE,noinit=FALSE) and still get the same
>> error. I'm guessing there's something wrong with either the response
>> variable or with the overall data structure?
>
> My first guess would be that you have AUC values that are
> exactly equal to 0 or 1; they will give infinite/NaN log-likelihoods
> in the beta model. Beyond that, I'm not sure. It would be useful
> to know a little bit more about your data -- how many total observations?
> How many studies?
>
> Does fitting the model without the random effect work, i.e.
>
> model2 <- glmmadmb(AUC~variables+log_area+model+taxa,
> family="beta", verbose=TRUE, data=auc)
>
> ?
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
------
Heather Kharouba
PhD candidate
Department of Zoology & Beaty Biodiversity Centre
University of British Columbia
4200-6270 University Blvd., Vancouver, B.C. V6T 1Z4
http://www.zoology.ubc.ca/~kharouba
More information about the R-sig-mixed-models
mailing list