I have a dataset (structure explained below) for which I want to perform some tests on 2x2-tables.
The data is generated from a (randomized) experiment, and structured as follows:
I have n subjects, split into 2 treatment groups of equal size (each group has n/2 members; I observe each subject only within one of the treatments).
Each of the subjects faces m trials, in each of which I get a response that can be coded as success/failure. (Note: in my case 2 < m << n
.)
I am interested in testing whether there is a significant difference in success rate between groups.
If I had nm unrelated observations, I'd be happy performing a Fisher's exact test on the resulting 2x2 table (I am aware of the fact that Fisher's exact conditions on the margins, which is not actually appropriate in the given case - but this is not my issue here. The principal problem - as far as I understand - would apply to the basic versions of the common alternatives as well (including, e.g. a chi-sq., insofar they assume independence of observations.)
But the crux is that it seems unreasonable to assume that the repeated responses (by individual subjects) are independent: An uncorrected test should thus yield too low p-values.
Are there extensions to the typical non-parametric tests that allow to account for this "clustered" structure of my data?
(I found some references that mention the problem, but not a straightforward suggestion I which seems to aplly to my case - which might well be due to the fact that I am not sure exactly what to search for.
If possible, I'd like to retain individual trials as unit of observation, rather than per-subject frequency, as m is still small.
A test that is applicable to equal group sizes, and m constant across subjects would be a great start. Since I might go deeper in the analysis eventually, I'd also be grateful for any pointers how any suggested solution would be affected if these did not hold.)
cltest
). $\endgroup$