[R] help with glmmADMB ZI; function maximizer failed
Ben Bolker
bbolker at gmail.com
Thu Oct 20 05:10:21 CEST 2011
emmarosenfeld <emmarosenfeld <at> hotmail.co.uk> writes:
>
> Dear all,
>
> I am having some problems trying to run a GLMM model with zero-inflation
> using the alpha version of glmmADMB (0.6.4) using R (2.13.1) in Windows and
> I would greatly appreciate some help.
> My count response variable (number of birds: count) fits a negative binomial
> distribution and the explanatory variables are both continuous and
> categorical (species= 17). The three random effects are site (68 of them),
> season (1 or 2) and land class (1 to 6).
You mean species is a factor with 17 levels?
What are the results of str(srp12) ?
You are going to have a lot of difficulty fitting a random effect
to a factor with two levels (see http://glmm.wikidot.com/faq for
discussion). Try it as a fixed effect instead.
> Ideally I would also like to build
> in a variance structure to allow a different spread per land class.
I don't know of a way to do this in glmmADMB. **Maybe** doable
in MCMCglmm but I wouldn't count on it.
> This is
> the model I'm trying to run:
> (fm<-glmmadmb(count~species*btrees+species*built+species*btrees*built+
(1|season)+(1|landclass)+(1|site),
data=srp12, famil="nbinom", zeroInflation=TRUE))
Are you aware that species*btrees*built expands to include
all main effects, two- and three-way interactions, i.e. the
species*btrees and species*built terms are redundant.
> I have read most of the supporting documents to glmmADMB and studied the
> examples but am still struggling to make headway.
>
> This is the error message I get;
>
> Memory allocation error -- Perhaps you are trying to allocate too much
> memory in your program
> Warning: running command 'C:\Windows\system32\cmd.exe /c
> "C:/R-2.13.1/library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500' had
> status 1
> Warning in shell(cmd, invisible = TRUE) :
> '"C:/R-2.13.1/library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500'
> execution failed with error code 1
> Error in glmmadmb(count ~ species * btrees + species * built + species * :
> The function maximizer failed
>
> I have also run:
>
> > summary(fm)
>
> Which results in:
>
> Error in summary(fm) : object 'fm' not found
Well, that's not surprising since the command failed.
>
> This has happened however the equation is labelled.
>
> Perhaps there is a more appropriate package that I should be using
> (MCMCglmm)?
> I am quite new to R, so it is quite possible that I am missing something, so
> any help would be most appreciated.
>
More information about the R-help
mailing list