LEC 8 Categorical Data Analysis Flashcards
Statistical test for
- nominal data
- 2 groups
- independent
Chi-square test
or
Fisher’s exact test
To test the null hypothesis that the population proportions corresponding to the random samples are equal
OR
To test the null hypothesis that there is no association between the ‘exposure’ and the ‘outcome’
Statistical test for
- nominal data
- 2 groups
- paired
McNemar’s test
To test the null hypothesis that the population proportions of ‘outcome’ corresponding to the paired random samples are equal
OR
To test the null hypothesis that there is no association between the ‘exposure’ and ‘outcome’
Statistical test for
- nominal data
- > = 2 groups
- independent
Chi-square test
or
Fisher-Freeman-Halton test (extension of Fisher’s exact test)
Arrangement of the data for nominal data (Chi-square and Fisher’s exact test)
RxC contingency table
Rows (horizontal) : exposure
Column (vertical) : outcome
Chi-square test & Fisher’s exact test assumptions (4)
- The samples are random samples of their populations
- All observations are independent
- For 2x2 contingency table, the expected count for each cell has to be at least 5
- For larger contingency table,
- the expected count for each cell has to be at least 1
- no more than 20% of the cells have <5
3&4, if not fulfilled then do Fisher’s exact test
Observed count for Chi-square
= (row total x column total)/grand total
Chi-square test & Fisher’s exact test hypothesis types (2)
- Association
2. Proportion
Chi-square test & Fisher’s exact test hypothesis (Association)
Ho :
- There is no association between __ and __
H1 :
- There is an association between __ and ‘__
Chi-square test & Fisher’s exact test hypothesis (Proportion)
Ho :
- There is no significant difference in proportion of __ and __
H1 :
- There is significant difference in proportion of __ and __
McNemar’s test assumptions (2)
- The samples are random samples of their populations
2. Each observation in the first sample has a corresponding observation in the second sample (paired samples)
Concordant pairs
Outcome is the same for each member of the pairs
- provide no information about differences in __ and __
- ignored and not used in the analysis
eg test A +ve and test B +ve
Discordant pairs
Outcome is different for each member of the pairs
eg test A +ve and test B -ve
Arrangement of the data for nominal data in table (McNemar’s test)
Need to take into account the paired nature of the data
Row :
- exposure 1
- split into 2 outcomes
Columns :
- exposure 2
- split into 2 outcomes
McNemar’s test hypothesis types (3)
- Proportion
- Association
- Discordant pairs
McNemar’s test hypothesis (Proportion)
Ho :
- There is no difference between the proportions of subjects with __ and __
eg There is no difference between the proportions of subjects with test A positive results and test B positive results
H1 :
- There is a difference between the proportions of subjects with __ and __
McNemar’s test hypothesis (Association)
Ho :
- There is no association between __ and __
eg There is no association between the test used and the reaction observed
H1 :
- There is an association between __ and __
McNemar’s test hypothesis (Discordant pairs)
Ho :
- There is no difference between the number of pairs in __ and the number of pairs in __
eg There is no difference between the number of pairs in which reaction to test A is positive and the matched reaction to test B is negative (n1) and the number of pairs in which reaction to test B is positive and the matched reaction to test A is negative (n2)
H1 :
- There is a difference between the number of pairs in __ and the number of pairs in __
Criteria to use McNemar’s test
Total discordant pairs >=20
but if using software, it is ok to use if <20
If >2 independent groups with nominal data
Use Chi-square test or Fisher’s Freeman Halton test
Usually no need to do post-hoc test cos only want to check for association
McNemar’s test
To test the null hypothesis that the population proportions of “outcome” corresponding to the paired random samples are equal
eg Testing Ho that there is no difference between the proportion of persons with positive reaction to test A and proportion of persons with positive reaction to test B
OR
To test the null hypothesis that there is no association between “exposure” and “outcome”