[R-sig-ME] Help with MCMC fitting in R

Janelle Sylvester jsylves92 at gmail.com
Tue May 10 01:16:02 CEST 2016


Hi,

I found this email address from the R-Forge website and was hoping you
could help me with a problem I am having.  I keep getting an error message
every time I try to preform a *post hoc* Markov chain on my zero-inflated,
neg. binomial mixed model.  Below is my code and the error message I keep
getting.  If I can't make this work, can you recommend any other ways of
validating my model? I really can't find anything on this topic.

glmmNB<- glmmadmb(CON_XAL~Treatment+(1|Site), data = SR.year.raw,
> zeroInflation = TRUE, family = "nbinom")
>


summary(glmmNB) #Summary output is attached to this email as a picture


> fit_glmmNB <- glmmadmb(CON_XAL~Treatment+(1|Site),

                       data=SR.year.raw,
>                        zeroInflation=TRUE, save.dir = "TMP",
>                        family="nbinom",
>                        mcmc=TRUE,
>                        mcmc.opts=mcmcControl(mcmc=5000))


And the error message I get:

Error in R2admb::read_psv(file_name) : no PSV file found
> In addition: Warning messages:
> 1: In glmmadmb(CON_XAL ~ Treatment + (1 | Site), data = SR.year.raw,  :
>   file glmmadmb.std exists: overwriting
> 2: running command 'C:\Windows\system32\cmd.exe /c glmmadmb -maxfn 500
> -maxph 5 -noinit -shess -mcmc 1000 -mcsave 1 -mcmult 1' had status 42


I tried running this:

mcmc.control <- function(mcmc=50000,
>                          mcmc2=0,
>                          mcsave,
>                          mcnoscale=FALSE,
>                          mcgrope=FALSE,
>                          mcmult=1,
>                          mcmcpars=NULL) {
>   if (missing(mcsave)) mcsave <- pmax(1,floor(mcmc/5000))
>   if (mcmc2>0) {
>     if (missing(mcmc)) {
>       mcmc <- 0
>     }
>     if (mcmc>0) stop("may not specify both mcmc and mcmc2>0")
>   }
>   r <-
> list(mcsave=mcsave,mcnoscale=mcnoscale,mcgrope=mcgrope,mcmult=mcmult,mcmcpars=mcmcpars)
>   if (mcmc>0) c(list(mcmc=mcmc),r) else c(list(mcmc2=mcmc2),r)
> }:


But then when I run my model again, I get this error message:

Parameters were estimated, but standard errors were not: the most likely
> problem is that the curvature at MLE was zero or negative
> Error in glmmadmb(CON_XAL ~ Treatment + (1 | Site), data = SR.year.raw,  :
>   The function maximizer failed (couldn't find parameter file)
> Troubleshooting steps include (1) run with 'save.dir' set and inspect
> output files; (2) change run parameters: see '?admbControl';(3) re-run with
> debug=TRUE for more information on failure mode
> In addition: Warning message:
> running command 'C:\Windows\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph
> 5 -noinit -shess -mcmc 50000 -mcsave 50 -mcmult 1' had status 1


I've tried for weeks to fix this problem and I just don't know what to do.
If my data is just not suitable enough for this *post hoc* procedure, can
you please recommend another way to validate my model so I can ensure that
it fits well?

I attached my data and would be happy to send any other information that
may help figure out a solution.  I am looking at the "Treatment" effect on
seed abundances of 11 species (ignore ALL_PSI).  Site is my random factor.
I am looking at species separately.

I really hope you can provide some help. Thank you so much for your time!

Sincerely,

Janelle Sylvester


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