[R-sig-ME] NaN output from mcse on a glmm model
David Duffy
D@v|d@Du||y @end|ng |rom q|mrbergho|er@edu@@u
Sat Feb 2 00:41:41 CET 2019
I ran it as a single instance ie no makeCluster(), with m=100, and it seems OK
Fixed Effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.48177 0.02022 172.180 <2e-16 ***
StatusConstruction 0.01733 0.02357 0.735 0.4621
StatusReady 0.04639 0.02258 2.054 0.0399 *
StatusTrafic 0.02267 0.02192 1.034 0.3010
Variance Components for Random Effects (P-values are one-tailed):
Estimate Std. Error z value Pr(>|z|)/2
Site 0.06095 0.02419 2.52 0.00587 **
With glmer VC is 0.06088, and with another MCMC package, 0.066, SE=0.028
So maybe the clustering code?
Cheers, David Duffy.
________________________________________
From: R-sig-mixed-models [r-sig-mixed-models-bounces using r-project.org] on behalf of Ben Bolker [bbolker using gmail.com]
Sent: Saturday, 2 February 2019 3:26 AM
To: Adriaan De Jong
Cc: R-sig-mixed-models using r-project.org
Subject: Re: [R-sig-ME] NaN output from mcse on a glmm model
I can confirm this on my system. I looked and nothing obviously
fishy pops out about the model or the data. Inside the mcvcov()
function, after calling the C-code guts of the computation, stuff[[4]]
(the "numsum" component of the list passed to the C code) is full of
Inf and NaN values. If I were you I'd (1) try a couple of very simple
examples, one with bernoulli and one with poisson data, to support
your idea that there's something wrong with the Poisson case; (2) look
around for examples of people using the package, e.g.
<https://scholar.google.ca/scholar?hl=en&as_sdt=0%2C5&q=knudson+glmm&btnG=>,
and see if there are Poisson examples; (3) contact the maintainer ...
On Fri, Feb 1, 2019 at 8:49 AM Adriaan De Jong <Adriaan.de.Jong using slu.se> wrote:
>
> Dear list members,
> I ran the following glmm on the attached data file, guided by Christina Knudson's "An introduction to Model-Fitting with the R package glmm, 11th of December 2018. (Fresh R download and all packages recently updated. I'm aware of the fact that the cluster part of the script I redundant)
> Everything appears to work fine, but when I try to extract the Monte Carlo standard errors with mcse I only receive NaN's for each of the parameters in the model.
> The example in Christina Knudson's text uses Bernoulli data, while I use count data (Poisson). Is that the cause of the NaN's?
> Grateful for any explanation or suggestion. Thanks in advance.
> Have a nice weekend,
> Adjan
>
> Adriaan "Adjan" de Jong
> Senior researcher
> Dept. of Wildlife, Fish, and Environmental Studies
> Swedish University of Agricultural Sciences
>
> set.seed(2019)
> clust<-makeCluster(2)
> mm01<-glmm(Arter ~ Status, random=list(~0+Site), varcomps.names=c("Site"), data=ArterVis, family.glmm=poisson.glmm, m=10000, cluster=clust)
> stopCluster(clust)
> summary(mm01)
> coef(mm01)
> confint(mm01)
> mcse(mm01)
> se(mm01)
>
>
> ---
> N?r du skickar e-post till SLU s? inneb?r detta att SLU behandlar dina personuppgifter. F?r att l?sa mer om hur detta g?r till, klicka h?r <https://www.slu.se/om-slu/kontakta-slu/personuppgifter/>
> E-mailing SLU will result in SLU processing your personal data. For more information on how this is done, click here <https://www.slu.se/en/about-slu/contact-slu/personal-data/>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________
R-sig-mixed-models using r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list