1 / 38

The analysis of cross-tabulations

The analysis of cross-tabulations. Today. Chi-square test Fisher’s exact test Odds and odds ratios McNemars test. Where are we?. Cross-tabulations. Tables of countable entities Made to analyze the association, relationship, or connection between two variables

daisy
Download Presentation

The analysis of cross-tabulations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The analysis of cross-tabulations

  2. Today • Chi-square test • Fisher’s exact test • Odds and odds ratios • McNemars test

  3. Where are we?

  4. Cross-tabulations • Tables of countable entities • Made to analyze the association, relationship, or connection between two variables • This association is difficult to describe statistically • Null- Hypothesis: “There is no association between the two variables” can be tested • Analysis of cross-tabulations with larges samples

  5. Delivery and housing tenure

  6. Delivery and housing tenure • Expected number without any association between delivery and housing tenure

  7. Delivery and housing tenureIf the null-hypothesis is true • 899/1443 = 62.3% are house owners. • 62.3% of the Pre-terms should be house owners: 99*899/1443 = 61.7

  8. Delivery and housing tenureIf the null-hypothesis is true • 899/1443 = 62.3% are house owners. • 62.3% of the ‘Term’s should be house owners: 1344*899/1443 = 837.3

  9. Delivery and housing tenureIf the null-hypothesis is true • 258/1443 = 17.9% are council tenant. • 17.9% of the ‘preterm’s should be council tenant: 99*258/1443 = 17.7

  10. Delivery and housing tenureIf the null-hypothesis is true • In general

  11. Delivery and housing tenureIf the null-hypothesis is true • In general

  12. Delivery and housing tenureIf the null-hypothesis is true

  13. Delivery and housing tenuretest for association • If the numbers are large this will be chi-square distributed. • The degree of freedom is (r-1)(c-1) = 4 • From Table 13.3 there is a 1 - 5% probability that delivery and housing tenure is not associated

  14. Chi Squared Table

  15. Delivery and housing tenureIf the null-hypothesis is true • It is difficult to say anything about the nature of the association.

  16. SPSS

  17. 2 by 2 tables

  18. 2 by 2 tables

  19. Chi Squared Table

  20. Break and Exercise • http://www.smi.hst.aau.dk/~cdahl/statM7/opgaver1.pdf • A group of researchers wanted to predict the death from ventilator associated pneumonia in patients admitted to an intensive care unit. The authors measures the blood concentration of proANP on day 0 (D0) and day 4 (D4) after diagnosed ventilator associated pneumonia. They also recorded the age and gender of the patients. They used this data to predict non-survivors. In the study-group 71 patients were enrolled of which 26 died.  • The percent of males and females distributed between survivors and non-survivors are shown below. • Use the 2-test to test for association between gender and survival. Is there a significant association? • Is the 2-test valid in this case?

  21. Chi-square to compare populations

  22. Chi-squared test for small samples • Expected valued • > 80% >5 • All >1

  23. Chi-squared test for small samples • Expected valued • > 80% >5 • All >1

  24. Fisher’s exact test • An example

  25. Fisher’s exact test • Survivers: • a, b, c, d, e • Deaths: • f, g, h • Table 1 can be made in 5 ways • Table 2: 30 • Table 3: 30 • Table 4: 5 • 70 ways in total

  26. The properties of finding table 2 or a more extreme is: Fisher’s exact test • Survivers: • a, b, c, d, e • Deaths: • f, g, h • Table 1 can be made in 5 ways • Table 2: 30 • Table 3: 30 • Table 4: 5 • 70 ways in total

  27. Fisher’s exact test

  28. Chi Squared Table

  29. Odds and odds ratios • Odds, p is the probability of an event • Log odds / logit

  30. Odds • The probability of coughs in kids with history of bronchitis. p = 26/273 = 0.095 o = 26/247 = 0.105 The probability of coughs in kids with history without bronchitis. p = 44/1046 = 0.042 o = 44/1002 = 0.044

  31. Odds ratio • The odds ratio; the ratio of odds for experiencing coughs in kids with and kids without a history of bronchitis.

  32. Is the odds ratio different form 1? • We could take ln to the odds ratio. Is ln(or) different from zero? • 95% confidence (assumuing normailty)

  33. Confidence interval of the Odds ratio • ln (or) ± 1.96*SE(ln(or)) = 0.37 to 1.38 • Returning to the odds ratio itself: • e0.370 to e1.379 = 1.45 to 3.97 • The interval does not contain 1, indicating a statistically significant difference

  34. Odds ratios in SPSS (Risk) • SPSS uses binomial distributions not normal as shown here

  35. McNemar table 13-13

  36. McNemar in SPSS table 13-13

  37. Exercises • http://person.hst.aau.dk/cdahl/statM7/

More Related