0

My aim is to test the independence of two categorical variables, however the independence assumption of the chi-square test is violated and both the Cochran Q and McNemar tests are not suited to my experimental design. I am looking for an alternative test that might suit my data. The data is as follows:

variable 1: condition (3 levels [A,B,C])

variable 2: effect (10 levels [A1:A10])

n subjects = 60

Each subject was only tested under one level of condition, and provided a dichotomous (1/0) value for each level of effect.

Example data (truncated and 0's omitted for readability):

A1  A2  A3  A4  A5  A6  A7  A8  A9  A10 Participant Condition
    1                                   1           A
                1                       1           A
                        1               1           A
                1                       2           C
                        1               2           C
1                                       2           C
1                                       3           A
                                    1   3           A
                        1               3           A
                                    1   4           B
                        1               4           B
                                    1   4           B
                                1       4           B
                1                       4           B
                        1               4           B
                           ...
                           ...
                            1           60          C

continues to final participant and resulting in a frequency table as follows:

     A   B   C
A1   9   3   4
A2  11   3   8
A3   1   6   5
A4   1  11   8
A5   0   3   1
A6   2  10   8
A7   0   1   2
A8   7   2   8
A9   5   6   2
A10  1  14   9
kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
  • The correct word is effect not affect. Is the problem with the chi square test due to low cell frequencies? – Michael R. Chernick May 31 '17 at 18:50
  • Thanks for asking @MichaelChernick, the problem is due to the 'dependence' of a/effects within a participants and independence between participants. Afaik the former is violating the independence assumption for the chi-square test. The reason I wrote affect for effect is probably due to the background of the experiment, but effect might be a more standard to word it. – raumkundschafter Jun 01 '17 at 08:30
  • 1
    Affect is a verb and effect is a noun. – Michael R. Chernick Jun 01 '17 at 14:14
  • A test to determine independence does not assume independence. – Michael R. Chernick Jun 01 '17 at 14:16
  • I changed affect to effect to provide proper English. – Michael R. Chernick Jun 01 '17 at 14:19
  • @MichaelChernick, in response to your corrections, I think affect is correct here, because each level of the variable is a categorical 'influence' factor. I did not mention this in my description because I deemed it superfluous to the description of the problem. In any case, it's just a variable name. – raumkundschafter Jun 01 '17 at 16:05
  • 1
    The chi squared test is for the independence of 2 variables, and it does assume independence of the observations (naturally, the variables may or may not be dependent, hence the test). In this case I have multiple observations per participant, hence the assumption is violated. – raumkundschafter Jun 01 '17 at 16:06
  • See https://stats.stackexchange.com/questions/197977/analyzing-nested-categorical-data, https://stats.stackexchange.com/questions/386132/chi-square-test-with-replicate-nested – kjetil b halvorsen Jul 26 '19 at 08:19

0 Answers0