Sorry, you estimated it to be very close to zero, I see.
Peter
On Wed, Aug 1, 2018 at 11:08 PM, Peter Paprzycki <
peter.paprzycki at gmail.com> wrote:
Perfect. Thank you. It is good to know that we can specify the
random-effects variance
equal to zero. Thanks.
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>
<#m_3076315220315282584_m_981606773260833816_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Wed, Aug 1, 2018 at 10:57 PM, Ben Bolker <bbolker at gmail.com> wrote:
(please keep r-sig-mixed-models in the Cc:)
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)
On 2018-08-01 11:41 PM, Peter Paprzycki wrote:
Thank you. Oh, was just trying to compare my random-effects model to
one where my grouping variable (schools) is treated as fixed.
Peter
<
Virus-free. www.avg.com
<
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Wed, Aug 1, 2018 at 10:32 PM, Ben Bolker <bbolker at gmail.com
<mailto:bbolker at gmail.com>> wrote:
I'm not 100% sure I understand the question, but I think the
"no": lmer cannot fit a model that doesn't contain any random
Perhaps you can give more context as to why it won't work for you
revert to lm() or plm() in these cases?
On 2018-08-01 11:30 PM, Peter Paprzycki wrote:
> This is very basic, is there a way to specify in lmer function
> like to run my grouping variable as a fixed factor only, without
> to lm or plm functions. If one does not specify a random
> the error message with lmer function; something that is
> statement, "index = "grouping variable", model = "within"" with
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org
<mailto:R-sig-mixed-models at r-project.org> mailing list
--
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 at usm.edu <mailto:Peter.Paprzycki at usm.edu>
Sidere mens eadum mutato
--
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 at usm.edu
Sidere mens eadum mutato
--
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 at usm.edu
Sidere mens eadum mutato