[R-sig-ME] 2 x 2 x 10 x 2 binomial setup
Suresh Krishna
madzientist at gmail.com
Wed Jul 15 12:15:26 CEST 2009
On Tue, 14 Jul 2009 17:02:45 +0200, Daniel Ezra Johnson
<danielezrajohnson at gmail.com> wrote:
>> 1 subject
>> Tested under 2 conditions: A and B
>> 10 sesssions in each condition
>> In each session, 2 kinds of tests: Test 1 and Test 2
>> 200 independent repetitions of each test-type, with 200 Yes/No answers
>>
>> So I think this is a 2 x 2 x 10 x 2 setup
>>
>> What I want to know is whether the difference in percentage of yes
>> answers
>> between Test1 and Test2 is different for the 2 conditions A and B. I
>> guess I
>> could also state this as looking for an effect at the highest stratum,
>> after
>> correctly pooling over all the lower strata... i.e. Is there an
>> "interaction" between the Effect of Condition and the Effect of Test.
>
> yes, that sounds exactly right, you're testing for the interaction, so
>
> mod1 <- glmer(Response ~ Test*Condition + (1|Session),binomial,data)
> mod0 <- glmer(Response ~ Test+Condition + (1|Session),binomial,data)
>
> as far as getting a p-value, that's a debate but you can use
> anova(mod0,mod1) as a first approximation?
Dan, Thank you very much !!
Just to finish the picture, how would the call to glmer look if I had 2
subjects instead of one, and wanted to pool everything together, taking
into account the subject factor (instead of doing separate tests for each
subject) ?
Very best, Suresh
More information about the R-sig-mixed-models
mailing list