Præsentation er lastning. Vent venligst

Præsentation er lastning. Vent venligst

Analyse af krydstabeller (cross-tabulations)

Lignende præsentationer


Præsentationer af emnet: "Analyse af krydstabeller (cross-tabulations)"— Præsentationens transcript:

1 Analyse af krydstabeller (cross-tabulations)
Lecture 2 Analyse af krydstabeller (cross-tabulations) Biostatistik ST8 2007

2 Krydstabeller Tabeller af tællelige enheder eller frekvenser
Krydstabel analyse er lavet til at analysere association, relation, sammenhæng mellem to variable Denne sammenhæng er vanskelig at beskrive statistisk Nul- hypotesen: ”Der er ingen sammenhæng mellem de to variable” Biostatistik ST8 2007

3 Chi- kvadrat testen χ2 - test
Bruges til krydstabel analyse af tabeller med store samples Nul- Hypotesen er at der ikke er nogen sammenhæng mellem de to variable. Biostatistik ST8 2007

4 Fødsel og bopælstype Bopælstype Før termin Til termin I alt Ejerbolig
50 849 899 Offentlig leje 29 229 258 Privat leje 11 164 175 Bor hos forældre 6 66 72 Andet 3 36 39 99 1344 1443 Biostatistik ST8 2007

5 Fødsel og bopælstype Forventede antal hvis der ikke er nogen sammenhæng mellem fødsel og bopælstype Bopælstype Før termin Til termin I alt Ejerbolig 899 Offentlig leje 258 Privat leje 175 Bor hos forældre 72 Andet 39 99 1344 1443 Biostatistik ST8 2007

6 Fødsel og bopælstype hvis nul-hypotesen er sand
899/1443 = 62.3% er husejere. 62.3% af dem, der fødte før termin, skulle være husejere: 99*62.3% = 99*899/1443 = 61.7 Bopælstype Før termin Til termin I alt Ejerbolig 61.7 899 Offentlig leje 258 Privat leje 175 Bor hos forældre 72 Andet 39 99 1344 1443 Biostatistik ST8 2007

7 Fødsel og bopælstype hvis nul-hypotesen er sand
899/1443 = 62.3% er husejere. 62.3% af dem, der fødte til terminen, skulle være husejere : 1344*899/1443 = 837.3 Bopælstype Før termin Til termin I alt Ejerbolig 61.7 837.3 899 Offentlig leje 258 Privat leje 175 Bor hos forældre 72 Andet 39 99 1344 1443 Biostatistik ST8 2007

8 Fødsel og bopælstype hvis nul-hypotesen er sand
258/1443 = 17.9% bor til offentlig leje. 17.9% af dem, der fødte før terminen, skulle bo til offentlig leje: 99*258/1443 = 17.7 Housing tenure Pre Term Total Owner-occupier 61.7 837.3 899 Council tenant 17.7 258 Private tenant 175 Lives with parents 72 Other 39 99 1344 1443 Biostatistik ST8 2007

9 Fødsel og bopælstype hvis nul-hypotesen er sand
generalt row total * column total grand total Housing tenure Pre Term Total Owner-occupier 61.7 837.3 899 Council tenant 17.7 240.3 258 Private tenant 12.0 163.0 175 Lives with parents 4.9 67.1 72 Other 2.7 36.3 39 99 1344 1443 Biostatistik ST8 2007

10 Fødsel og bopælstype hvis nul-hypotesen er sand
Observeret Forventet Housing tenure Før termin Til termin I alt Owner-occupier 50 849 61.7 837.3 899 Council tenant 29 229 17.7 240.3 258 Private tenant 11 164 12.0 163.0 175 Lives with parents 6 66 4.9 67.1 72 Other 3 36 2.7 36.3 39 Total 99 1344 1443 Biostatistik ST8 2007

11 Fødsel og bopælstype Test for sammenhæng
Hvis nul- hypotesen er sand og tallene er store vil tabellen være chi- kvadrat fordelt Antallet af frihedsgrader er (r-1)(k-1) = 4 Biostatistik ST8 2007

12 Fødsel og bopælstype Test for sammenhæng
df = 4 1-5% sandsynlighed for at H0 er sand SPSS: ’bolig.sav’ etc Biostatistik ST8 2007

13 2 x 2 tabeller Bronkitis Ikke bronkitis Total Hoste 26 44 70
Ingen hoste 247 1002 1249 273 1046 1319 Biostatistik ST8 2007

14 2 x 2 tabeller Antallet af frihedsgrader er 1 Bronkitis Uden bronkitis
Total Hoste 26 (14.49) 44 (55.51) 70 Ingen hoste 247 (258.51) 1002 (990.49) 1249 273 1046 1319 Antallet af frihedsgrader er 1 Biostatistik ST8 2007

15 Chi-kvadrat test for små samples
Chi- kvadrat testen gælder ikke for små samples 80% af de forventede værdier skal være over 5 Alle værdier skal være over 1 Streptomycin Kontrol Total Forbedring 13 (8.4) 5 (9.6) 18 Forværring 2 (4.2) 7 (4.8) 9 Død 0 (2.3) 5 (2.7) 5 15 17 32 Biostatistik ST8 2007

16 Chi-kvadrat test for små samples
Sammenføjning af grupperne Streptomycin Kontrol Total Forbedring 13 (8.4) 5 (9.6) 18 Forværring eller død 2 (6.6) 12 (7.4) 14 15 17 32 Biostatistik ST8 2007

17 Fisher’s exact test Et eksempel S D T A 4 B 1 3 5 8 S D T A 3 1 4 B 2
B 1 3 5 8 S D T A 3 1 4 B 2 5 8 S D T A 2 4 B 3 1 5 8 S D T A 1 3 4 B 5 8 Biostatistik ST8 2007

18 Fisher’s exact test Overlevende: a, b, c, d, e Døde: f, g, h
Tabel 1 kan laves på 5 forskellige måder Tabel 2: 30 Tabel 3: 30 Tabel 4: 5 70 forskellige måder S D T A 4 B 1 3 5 8 S D T A 3 1 4 B 2 5 8 S D T A 2 4 B 3 1 5 8 S D T A 1 3 4 B 5 8 Biostatistik ST8 2007

19 Yates’ korrektion for 2x2
Table 13.7 Fisher: p = χ2: p = Yates’ p = Biostatistik ST8 2007

20 Odds and odds ratios Odds Log odds / logit Biostatistik ST8 2007

21 Odds ratio Cough and Bronchitis p = 26/273 = 0.095 o = 26/247 = 0.105
No bronchitis Total Cough 26 (a) 44 (b) 70 No Cough 247 (c) 1002 (d) 1249 273 1046 1319 Cough and Bronchitis p = 26/273 = 0.095 o = 26/247 = 0.105 Biostatistik ST8 2007

22 Odds ratio Odds ratio: 0.105 / 0.0439 = 2.40 Bronchitis No bronchitis
Total Cough 0.105 (a) (b) 70 No Cough 9.50 (c) 22.8 (d) 1249 273 1046 1319 Odds ratio: / = 2.40 Biostatistik ST8 2007

23 Odds ratio Bronchitis No bronchitis Total Cough 26 (a) 44 (b) 70
No Cough 247 (c) 1002 (d) 1249 273 1046 1319 Biostatistik ST8 2007

24 Odds ratio Bronchitis No bronchitis Total Cough 26 (a) 44 (b) 70
No Cough 247 (c) 1002 (d) 1249 273 1046 1319 Biostatistik ST8 2007

25 Odds ratio, Confidence ln (or) ± 1.96*SE(ln(or)) = 0.370 to 1.379
Confidence of the odds ratio e0.370 to e1.379 = 1.45 to 3.97 Biostatistik ST8 2007

26 McNemar’s test Cold at age 14 total Yes No Cold at age 12 212 144 356
256 707 963 468 851 1319 Biostatistik ST8 2007

27 Yates correction for McNemar
Biostatistik ST8 2007

28 Opgaver Brug Chi kvadrat testen til at se om streptomycin er effektivt mod tuberkulose (Tabel 2.10) Opgaver i kapitlet Biostatistik ST8 2007

29 Spss Here is the code valid until 31st May 2007 4344d25c2c11a607cce3
Code registration is required on-line after the installation. Biostatistik ST8 2007


Download ppt "Analyse af krydstabeller (cross-tabulations)"

Lignende præsentationer


Annoncer fra Google