[R] lmm WITHOUT random factor (lme4)

From: Baugh <alex.baugh_at_gmail.com>
Date: Thu, 17 Mar 2011 02:43:09 -0700 (PDT)


LMM without Random effect:

I want to run an LMM both with and without the random factor (ID). And then extract the log-lik values from the two models in order to generate a p-value.

with random factor as: lmer(y~x+(1|ID),data)

Question: can I simply substitute a dummy var (e.g. populated by zeros) for "ID" to run the model without the random factor? when I try this R returns values that seem reasonable, but I want to be sure this is appropriate.

>From other inquires in the forum it seems that substituting ("ID-1") or some
variant like that, does not work.

Thanks for your thoughts.
Baugh

--
View this message in context: http://r.789695.n4.nabble.com/lmm-WITHOUT-random-factor-lme4-tp3384054p3384054.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Mar 2011 - 14:06:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Mar 2011 - 14:20:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive