[R-sig-ME] 2 x 2 x 10 x 2 binomial setup

Suresh Krishna madzientist at gmail.com
Tue Jul 14 16:03:00 CEST 2009


Hello,

I posted the query below on r-help and Marc Schwartz graciously pointed me  
to this list.... he said I would likely have to use glmer(), but that I  
should check with the people on this list.

I would be really grateful if you could help me !!

Thanks much, Suresh

===================================================================================================

Hello,

I have a hierarchical dataset of this form and am trying to analyze it in  
R.

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.

I looked through Agresti and Pinheiro/Bates and couldn't find an example  
covering this situation. I would be really grateful if you could suggest a  
way to go about this analysis in R, or a place where I could read about  
this.

I considered:

Pool data from all the sessions for a given condition and test together,  
thus getting 2000 repetitions of Test1 and Test 2 in each condition. Now I  
have a 2x2x2 setup, which maps on to something in Agresti, but then I am  
ignoring within-session correlation information.

I could simply get a difference between Test1 and Test2 percentages for  
each session, and then compare the distribution of these differences in  
conditions A and B (with something like a t-test), but then I only have 10  
points (one for each session) and so I guess I am throwing away a lot of  
information.

Very best,

Suresh




More information about the R-sig-mixed-models mailing list