Message-ID: <A4E5A0B016B8CB41A485FC629B633CED4ACBD76A6E@GOLD.corp.lgc-group.com>
Date: 2013-08-05T11:54:49Z
From: S Ellison
Subject: Creating a model with fixed and random variables
In-Reply-To: <1375456685398-4672905.post@n4.nabble.com>
> Code I have used thus far without being able to replicate the
> data includes:
>
> Fm<-lmer(Score~(1|Line%in%Set)+Set+(1|Block))
> (I figured out how to get a p-value, but it didn't yield the
> same results as those obtained in SAS)
%in% doesn't generally mean 'nested in' in R. It is a set membership test and will return TRUE for those labels in Line that are also in Set and FALSE otherwise.
Did you mean Score~(1|Set/Line)...?
If you did, bear in mind that , combined with the fixed Set term, (1|Set/Line) implies a random Set grouping effect as well as a fixed effect - not sure that makes sense in your circumstance unless Set is a continuous predictor. May be safer to define SetLine<-interaction(Set, Line) and do
Score~Set + (1|SetLine) + (1|Block)
S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}