Hello, I need to fit a "Nested Random Effects ANOVA model" with the lmer function in the lme4 package. I read through the documentation http://lme4.r-forge.r-project.org/book/Ch2.pdf and the data structure of the "Pastes" data set looks almost exactly like mine. The only difference is that I have another factor which distinguishes controls from diseased patients. For the "Pastes" data set they fittet their "Nested Random Effects model" as follows: lmer(strength ~ 1 + (1|sample) + (1|batch), Pastes, REML=FALSE) My data strucute looks like as follows: http://www.pic-upload.de/view-12130948/data.png.html I am not sure of how to fit my model now. Would it be as simple as only adding the third factor? lmer(Protein_1 ~?1 + (1|Group) + (1|Sub_Disease) + (1|Disease)) ? Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Fitting-a-linear-model-with-lmer-in-the-lme4-package-tp4115455p4115455.html Sent from the R help mailing list archive at Nabble.com.
Bert Gunter
2011-Nov-28 15:51 UTC
[R] Fitting a linear model with lmer in the lme4 package
This should be posted on the r-sig-mixed-models list, not here. -- Bert On Mon, Nov 28, 2011 at 6:50 AM, syrvn <mentor_ at gmx.net> wrote:> Hello, > > > I need to fit a "Nested Random Effects ANOVA model" with the lmer function > in the lme4 package. > > I read through the documentation > > http://lme4.r-forge.r-project.org/book/Ch2.pdf > > and the data structure of the "Pastes" data set looks almost > > exactly like mine. The only difference is that I have another factor which > distinguishes controls > > from diseased patients. > > For the "Pastes" data set they fittet their "Nested Random Effects model" as > follows: > > lmer(strength ~ 1 + (1|sample) + (1|batch), Pastes, REML=FALSE) > > My data strucute looks like as follows: > > http://www.pic-upload.de/view-12130948/data.png.html > > I am not sure of how to fit my model now. Would it be as simple as only > adding the third factor? > > lmer(Protein_1 ~?1 + (1|Group) + (1|Sub_Disease) + (1|Disease)) ? > > > Cheers, > > Syrvn > > -- > View this message in context: http://r.789695.n4.nabble.com/Fitting-a-linear-model-with-lmer-in-the-lme4-package-tp4115455p4115455.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. >-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm