[R-sig-ME] lmer model and mcmcsamp
Dennis Murphy
djmuser at gmail.com
Thu Aug 11 21:42:50 CEST 2011
Hi:
See
http://glmm.wikidot.com/faq
and pay particular attention to the sections labeled
* Why doesn't lme4 provide p values/denominator degrees of freedom?
What other options do I have?
* Implementations of MCMC and parametric bootstrap
That will give you a fairly broad view of the state of affairs at the
present time.
HTH,
Dennis
On Thu, Aug 11, 2011 at 9:36 AM, Emma Jones <stp08emj at sheffield.ac.uk> wrote:
> I posted this message back in February and got no response....but am still puzzled. Can anyone help?
>
> Thanks Emma
>
>
> Hi,
>
> I am new to using the package lme4 and wondered if anyone can help me? I
> have fitted a model (note the data is unbalanced)- see below with the
> results:
>
>>/ a=lmer(RW~1+(1|Year),chron,na.action=na.omit)
> />/ a
> /Linear mixed model fit by REML
> Formula: RW ~ 1 + (1 | Year)
> Data: chron
> AIC BIC logLik deviance REMLdev
> 8771 8790 -4383 8761 8765
> Random effects:
> Groups Name Variance Std.Dev.
> Year (Intercept) 0.48050 0.69318
> Residual 0.52704 0.72598
> Number of obs: 3719, groups: Year, 239
>
> Fixed effects:
> Estimate Std. Error t value
> (Intercept) -0.02793 0.04803 -0.5815
>
>
> This I am happy with and I know is correctly fitted- my problems don't
> lie here.
>
> What I would ideally like now is to produce 95% credible intervals on
> the variance components. I have found some code on a help sheet online
> and followed this...
>
> samp=mcmcsamp(a,n=10000)
> #gives a credible interval for mcmc
> HPDinterval(VarCorr(samp,type="varcov"),prob=0.95)
> lower upper
> [1,] 0.1958900 0.2678522
> [2,] 0.5317379 0.5853902
> attr(,"Probability")
> 0.95
>
> As it can be seen, both of my point estimates lie outside the credible
> interval.
>
> I am confused by this, can anyone advise??
>
> Many thanks in advance,
> Emma
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at 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