[R-sig-ME] (no subject)
Peter Paprzycki
peter@p@przycki @ending from gm@il@com
Thu Aug 2 23:47:08 CEST 2018
Thank you, Martin.
Peter
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Thu, Aug 2, 2018 at 1:53 AM, Martin Maechler <maechler using stat.math.ethz.ch>
wrote:
> >>> On Wed, Aug 1, 2018 at 10:57 PM, Ben Bolker <bbolker using gmail.com> wrote:
> >>>
>
> >>>> I'm pretty sure that lmer and lm models are commensurate, in case that
> >>>> helps. Here's an example rigged to make the random-effects variance
> >>>> equal to zero, so we can check that the log-likelihoods etc. are
> >>>> identical.
> >>>>
> >>>> set.seed(101)
> >>>> dd <- data.frame(y=rnorm(20),x=rnorm(20),f=factor(rep(1:2,10)))
> >>>> library(lme4)
> >>>> m1 <- lmer(y~x+(1|f),data=dd,REML=FALSE) ## estimated sigma^2_f=0
> >>>> m2 <- lm(y~x,data=dd)
> >>>> all.equal(c(logLik(m1)),c(logLik(m2))) ## TRUE
> >>>> all.equal(fixef(m1),coef(m2))
> >>>> anova(m1,m2)
> >>>>
>
> Then, Peter replied
>
> >> Sorry, you estimated it to be very close to zero, I see.
> >> Peter
>
> and Ben, again, (Thu, 2 Aug 2018 01:26:27 -0400):
>
> > Yes. I think you can specify a fixed residual variance in
> blme::blmer, but
> > not to exactly zero.
>
> Peter: it is estimated to be *exactly* zero, not just close to
> zero with the lmer example above:
>
> > VarCorr(m1)$f == 0
> (Intercept)
> (Intercept) TRUE
> >
>
> (yes, these are always matrices, here of dimension 1x1)
>
> This has been one of the major features of lme4::lmer() wrt to nlme::lme()
> that \hat{\sigma_j^2} = 0 is naturally possible
> because of the parametrization used.
>
> Martin
>
--
Peter Paprzycki, Ph.D.
Visiting Assistant Professor
Research Support Center Manager
Educational Research and Administration
College of Education and Psychology
The University of Southern Mississippi
USM Box 5093; 118 College Drive
Hattiesburg, Mississippi 39406-0001
tel. (601)-266-4708
email: Peter.Paprzycki using usm.edu
Sidere mens eadum mutato
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list