L10: Categorical Data Analysis Flashcards
What test to use when comparing data between two independent groups with nominal data?
chi-square test or fisher’s exact test
What are the assumptions for the chi-square test?
- all observations are independent (each subject contributes data to only one cell)
- for 2x2 contingency table, expected count of each cell must be at least 5
- for larger contingency tables, expected count of each cell must be at least 1 and no more than 20% of the cells be less than 5
When do we use fisher’s exact test?
When the expected count assumption for chi square test are not met.
How to construct a contingency table?
Exposure in rows and outcome in columns
How to calculate expected count?
( row total x column total ) / grand total
How to formulate hypotheses for chi square test/fisher’s exact test?
Based on association:
H0: There is no association between exposure and outcome
H1: There is an association between exposure and outcome
OR based on proportions:
H0: There is no difference in the proportion of outcome in the two exposure groups
H1: There is a difference in the proportion of outcome in the two exposure groups
if >2 independent groups,
H0: All the proportions of outcome in the exposure groups are the same
H1: Not all the proportions of outcome among the exposure groups are the same.
What test to use when comparing data between >2 independent groups with nominal data?
Chi square or fisher-freeman halton test
If not all the proportions in the >2 independent groups are the same, what do we do?
Do different pairwise comparisons (2x2 contingency table) and do bonferroni adjustment
What test do we use to compare data between two paired groups with nominal data?
McNemar’s test
How do we arrange data for the McNemar’s test
- must take into account the paired nature of the data
- e.g. drug x (with and without outcome) and drug y (with and without outcome) `
What are concordant and discordant pairs?
Concordant pairs: outcome is the same for each member of the pair
Discordant pair: outcomes differ for members of the pair
How to formulate hypotheses for McNemar’s Test?
Based on association:
H0: There is no association between outcome and exposure
H1: There is an association between outcome and exposure
Based on proportions:
H0: There is no difference in the proportion of outcome for the groups
H1: There is a difference in the proportion of outcome for the groups
Based on no of discordant pairs:
H0: n1 = n2
H1: n1 not equal to n2
What is a requirement for McNemar’s test?
n1 + n2 should be at least 20