[R-sig-ME] glmmADMB error messages with percentage cover data (Elwyn Sharps)

Ben Bolker bbolker at gmail.com
Thu Nov 20 22:35:09 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14-11-20 01:45 PM, Elwyn Sharps wrote:
> Hi Ben, Thank you very much for your reply. The plant cover data
> was assessed by eye so I should probably be trying a
> (zero-inflated) beta distribution as you suggested. Do you have any
> tips for which R package to use? I've seen that this is possible 
> using gamlss. However, I was wondering if it is straightforward to
> add a random effect when using these models? Thanks again
> 
> Elwyn

  I think you're going to have some difficulty finding an approach
that will easily handle this combination (beta regression,
zero-inflation, random effects).  Alain Zuur is correct that you can
learn how to do this in JAGS/WinBUGS; you could also try Richard
McElreath's "rethinking" package
(https://github.com/rmcelreath/rethinking), which is the same sort of
front end for the Stan package. Or you could use AD Model Builder or
Template Model Builder.  All of these approaches will have some
startup cost, though.  Another possibility would be to use a
zero-inflated beta regression approach and try to find a way to get
robust standard error estimates for the parameters.


> 
> 
> 
>> Date: Wed, 19 Nov 2014 16:04:03 -0500 From: bbolker at gmail.com To:
>> r-sig-mixed-models at r-project.org Subject: Re: [R-sig-ME] glmmADMB
>> error messages with percentage cover data (Elwyn Sharps)
>> 
>> On 14-11-19 12:16 PM, Elwyn Sharps wrote:
>>> Hi Alain, Thanks for your reply. Sorry I hadn't noticed this
>>> section of the glmmADMB help file and as some of the models
>>> were running fine, I assumed there wasn't a problem with the
>>> family. Have you got any other ideas on how I can deal with the
>>> very large number of zeros in the data? As it's percentage
>>> cover rather than count data, I don't think I can use Poisson
>>> or Neg Binomial. Thanks again Elwyn
>> 
>> A couple of thoughts:
>> 
>> + I believe glmmADMB *can* handle zero-inflated binomials (I
>> would try testing with a simple made-up data set to check that
>> the results are sensible).
>> 
>> + does your plant cover variable have a meaningful denominator?
>> (e.g., if you had point-count data with 100 points, or with a
>> known number of points)  If you're just taking a percentage
>> that's assessed from a visual impression, or e.g. a measure of
>> area from remote sensing, then you probably don't have a variable
>> that's actually binomial (or zero-inflated binomial).  A beta
>> distribution might be more appropriate, but it too would have to
>> be zero-inflated.
>> 
>> + errors of the sort you're seeing are due to some sort of an 
>> instability in the model -- might be fixable with a more recent
>> version of the glmmADMB binary files, which are available but I
>> haven't gotten around to packaging in a new version yet.
>> 
>> 
>>> 
>>>> Date: Wed, 19 Nov 2014 17:38:40 +0100 From:
>>>> highstat at highstat.com To: r-sig-mixed-models at r-project.org
>>>> Subject: Re: [R-sig-ME] glmmADMB error messages with
>>>> percentage cover data	(Elwyn Sharps)
>>>> 
>>>> 
>>>> 
>>>>> 
>>>>> I have collected data on % cover of a variety of plant
>>>>> species on heathland (in relation to nesting birds) and am
>>>>> interested in testing the effect of density of grazing
>>>>> ponies, the proximity to nest site (%cover measured at 1
>>>>> and 10m from the nest) and the age of the nest (as a
>>>>> control for vegetation being measured at nests of different
>>>>> ages). The response is percentage cover and contains many
>>>>> zeros (see attached data for an example).
>>>>> 
>>>>> 
>>>>> I have tried using glmmADMB, with family= binomial and
>>>>> zero inflation=T. The response was created using cbind e.g.
>>>>>  y<-(cbind(Data$Plant_cover, Data$Plant_empty)), where
>>>>> Plant cover = % cover and Plant empty = 100-Plant cover.
>>>>> 
>>>>> 
>>>>> Example model:
>>>>> 
>>>>> Fit1<-glmmadmb(y~Grazing*proximity+Age+(1|site),data=Heath,zeroInflation=TRUE,family="binomial")
>>>>>
>>>>
>>>>
>>>>
>>>>>
>>
>>>>> 
See the help file of glmmadmb:
>>>> 
>>>> zeroInflation:   whether a zero-inflated model should be
>>>> fitted (only "poisson" and "nbinom" families).
>>>> 
>>>> With emphasis on the last part in this sentence.
>>>> 
>>>> Kind regards,
>>>> 
>>>> 
>>>> Alain
>>>> 
>>>> 
>>>>> The majority of the models for Species 1 have been running
>>>>> fine, however I have been getting the occasional error
>>>>> message and for Species 2, all models give an error
>>>>> message.
>>>>> 
>>>>> 
>>>>> Example error messages:
>>>>> 
>>>>> Parameters were estimated, but not standard errors were
>>>>> not: the most likely problem is that the curvature at MLE
>>>>> was zero or negative
>>>>> 
>>>>> Error in glmmadmb(w ~ Grazing * proximity + Age + (1 |
>>>>> site), data = heathland,  :
>>>>> 
>>>>> The function maximizer failed (couldn't find STD file) 
>>>>> Troubleshooting steps include (1) run with 'save.dir' set
>>>>> and inspect output files; (2) change run parameters: see 
>>>>> '?admbControl'
>>>>> 
>>>>> Warning message:
>>>>> 
>>>>> In glmmadmb(w ~ 1 + (1 | site), data = heathland,
>>>>> zeroInflation = T,  :
>>>>> 
>>>>> Convergence failed:log-likelihood of gradient= -0.269018
>>>>> 
>>>>> 
>>>>> 
>>>>> I just wanted to check that this is a sensible way to deal
>>>>> with these data and if there is anything that I should be
>>>>> doing to remedy the error messages? I've tried some other
>>>>> options, e.g. Arc sine transformation couldn't deal with
>>>>> the excess zeros. I've also considered quasibinomial in
>>>>> lme4, but have seen Doug Bates comments on the
>>>>> unreliability of the model output.
>>>>> 
>>>>> 
>>>>> 
>>>>> Any advice would be very much appreciated. All the best
>>>>> Elwyn
>>>>> 
>>>>> 
>>>>> ------------------------------
>>>>> 
>>>>> _______________________________________________ 
>>>>> R-sig-mixed-models mailing list
>>>>> R-sig-mixed-models at r-project.org 
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>>> 
>>>>> 
>>>>> End of R-sig-mixed-models Digest, Vol 95, Issue 24 
>>>>> **************************************************
>>>>> 
>>>> 
>>>> -- Dr. Alain F. Zuur
>>>> 
>>>> First author of: 1. Beginner's Guide to GAMM with R (2014).
>>>> 2. Beginner's Guide to GLM and GLMM with R (2013). 3.
>>>> Beginner's Guide to GAM with R (2012). 4. Zero Inflated
>>>> Models and GLMM with R (2012). 5. A Beginner's Guide to R
>>>> (2009). 6. Mixed effects models and extensions in ecology
>>>> with R (2009). 7. Analysing Ecological Data (2007).
>>>> 
>>>> Highland Statistics Ltd. 9 St Clair Wynd UK - AB41 6DZ
>>>> Newburgh Tel:   0044 1358 788177 Email: highstat at highstat.com
>>>> URL: www.highstat.com
>>>> 
>>>> _______________________________________________ 
>>>> 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
>>> 
>> 
>> _______________________________________________ 
>> R-sig-mixed-models at r-project.org mailing list 
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJUbl6NAAoJEOCV5YRblxUHA+AH/RtYzua6i3nq5MdmhoLp6D9a
5S574wdgl/OrTeEUrGv0zgIe8OT2TQJWl3ahHWxhHhjpt1mfJ+vIAINlFlJtwooA
XUxK6aFzGXbS3Xi25hJWug+Bf3q7oTZ2DA9SwmCA6OQ7L74i3FGaUn2xT5tbTaJU
Qv2GSkg77Qs39AHfIrjiWiBOKc6FrtMv95cLsqcpHShcWs4gUfZrHFhl6N8g7JSx
5W6oV8JeZYVRNhRnIJpftOPxb7c7pq+OG6OYTj3XDTRE/EoNT22KCUSQ4A2A3tif
d4laFsjOGA4C8hSRXAurKX9Z9O7RKPBVP77uMFQaq6bWAsE6870Bl6zxAbtkH6c=
=Q5AC
-----END PGP SIGNATURE-----



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