X
Sering dibahas
Asosiasi
X
2 peubah
Y
Z
Y
Confounding • In statistics, a confounding variable (also confounding factor, a
confound, or confounder) is an extraneous variable in a statistical model that correlates (directly or inversely) with both the dependent variable and the independent variable.
• Confounding variables are variables that the researcher fail to
control, or eliminate, damaging the internal validity of an experiment.
Confounding: Contoh
Tabel Kontingensi 3 arah
Usia
Jenis Kelamin
Tingkat Prestasi
Analisis Rumit??
Analisis dengan tabel yang lebih sederhana:
1. Tabel Parsial ( Partial Table) : tabel yang lebih sederhana yang diperoleh dengan hanya melihat pada salah satu kategori peubah lain 2. Tabel Marginal (Marginal Table) : adalah tabel yang lebih sederhana yang diperoleh tanpa melihat kategori peubah lain (kategori peubah lain digabungkan).
Tabel Parsial
Tabel Parsial (lanjutan)
• Pengujian hipotesis tentang ada/tidaknya hubungan antar variabel kategorik dapat dilakukan pada tabel parsial seperti dengan uji chi-square. • Ukuran asosiasi pada tabel parsial disebut dengan conditional association. Ukuran asosiasi disini bisa seperti odds ratio, relative risk atau koefisien gamma
Tabel Marginal
Tabel Marginal (lanjutan)
• Pengujian hipotesis tentang ada/tidaknya hubungan antar variabel kategorik dapat dilakukan pada tabel marginal seperti dengan uji chi-square. Ukuran asosiasi pada tabel parsial disebut dengan marginal association. Ukuran asosiasi disini bisa seperti odds ratio, relative risk atau koefisien gamma.
• Uji Breslow-Day digunakan untuk menguji ada/tidaknya terdapat hubungan yang homogen antar 3 variabel pada tabel 3 arah dengan hopotesis awal adanya asosiasi homogen. • UjiCochran–Mantel–Haenszel (CMH) untuk menguji ada/tidaknya conditional associatian pada tabel 3 arah dengan hipotesis awal semua conditional odds ratios bernilai 1.
Ilustrasi • The data set Migraine contains hypothetical data for a clinical trial of migraine treatment. Subjects of both genders receive either a new drug therapy or a placebo. Assess the effect of new drug adjusting for gender. • SAS manual EPI 809/Spring 2008
14
Example - Migraine Response
Treatment
Better
Placebo
12
Active
Total
Same
28
27
40
66
Total
39
55
51
106
Pearson Chi-squares test p = 0.0037
But after stratify by sex, it will be different for male vs female.
EPI 809/Spring 2008
15
Male
Treatment Active
Example – Migraine Response
Better
Same Total
12
16
28
Total
19
35
54
Female
Response
Placebo
Treatment Active
Placebo Total
7
Better 16 5
21
19
26
p = 0.2205
Same Total
11 20
27 25
31 EPI 809/Spring 52 2008
p = 0.0039 16
Breslow Day-Test
uji ini digunakan untuk menguji ada tidaknya 3-way interaction/association (interaksi/asosiasi 3 arah) H0: Terdapat asosiasi homogen (tidak ada 3-way interaction/association) vs H1: Tidak terdapat asosiasi homogen (ada 3-way interaction/association)
H0 ditolak jika nilai p-value kurang dari taraf signifikansi yang digunakan (p-value
Tolak H0 berarti ada 3-way interaction. Jika H0 tidak ditolak berarti terjadi homogeneous association dan conditional association antar setiap 2 variabel adalah sama pada setiap level variabel ketiga (terdapat homogeneous associations dalam data). Akan tetapi uji ini hanya bisa digunakan pada tabel 2x2xK.
Hipotesis
H0: ORM=ORF Sebaran antara grup perlakuan dan respon yang dihasilkan sama (tidak berbeda ) pada jenis kelamin yang berbeda VS
H1: ORM≠ ORF Ada asosiasi keseluruhan antara grup perlakuan dan respon yang dihasilkan di kelompok jenis kelamin yang berbeda
2 BD
r
k 1
Statistik Uji
nk11 E (nk11 ;ˆMH ) Var (n ;ˆ ) k 11
2
MH
Under H0, Breslow-Day test statistics has a chi-squared distribution with degrees of freedom r-1. 2 2 Tolak H0, jika BD r 1
SAS- codes
data Migraine; input Gender $ Treatment $ Response $ Count @@; datalines; female Active Better 16 female Active Same 11 female Placebo Better 5 female Placebo Same 20 male Active Better 12 male Active Same 16 male Placebo Better 7 male Placebo Same 19 ;
proc freq data=Migraine; weight Count; tables Gender*Treatment*Response / cmh noprint; title1 'Clinical Trial for Treatment of Migraine Headaches'; run; ************* In SAS, Need to put Exposure BEFORE Disease to generate right results for CMH results; EPI 809/Spring 2008
21
SAS Output The FREQ Procedure
Summary Statistics for Treatment by Response Controlling for Gender
Cochran-Mantel-Haenszel Statistics (Based on Table Scores)
Statistic Alternative Hypothesis DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 1 Nonzero Correlation 1 8.3052 0.0040 2 Row Mean Scores Differ 1 8.3052 0.0040 3 General Association 1 8.3052 0.0040 Estimates of the Common Relative Risk (Row1/Row2)
Type of Study Method Value 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Case-Control Mantel-Haenszel 3.3132 1.4456 7.5934 (Odds Ratio) Logit 3.2941 1.4182 7.6515 Cohort (Col1 Risk) Cohort (Col2 Risk)
Mantel-Haenszel Logit Mantel-Haenszel Logit
2.1636 2.1059 0.6420 0.6613
Breslow-Day Test for Homogeneity of the Odds Ratios ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 1.4929 DF 1 Pr > ChiSq 0.2218 Total Sample Size = 106
EPI 809/Spring 2008
1.2336 1.1951 0.4705 0.4852
3.7948 3.7108 0.8761 0.9013
22
The large p-value for the Breslow-Day test (0.2218) indicates no significant gender difference in the odds ratios. tidak tolak hipotesis nol dan simpulkan terdapat asosiasi homogen atau tidak terdapat interaksi 3 variabel pada tabel 3 arah diatas.
However, for the Breslow-Day test to be
valid, the sample size should be relatively large in each stratum, and at least 80% of
the expected cell counts should be greater than 5.
Setelah di lakukan uji Breslow-Day dan ternyata terima hipotesis awal yang menunjukan adanya asosiasi homogen, maka bisa dilakukan uji Cochran–Mantel–Haenszel (CMH) testuntuk menguji ada/tidaknya conditional association dalam three-way tables (apakah terjadi two-way interaction). Hipotesis nol dari CMH test adalah semua conditional odds ratios bernilai 1. Jika H0 ditolak, berarti minimal ada satu conditional odds ratio ≠ 1 dan terjadi partial/conditional association dalam data.
The Cochran–Mantel–Haenszel Test
2 × 2 × K Contingency Tables
Digunakan ketika efek dari peubah penjelas terhadap peubah respon dipengaruhi oleh kovariat yang dapat dikendalikan.
untuk menguji ada/tidaknya conditional association dalam three-way tables (apakah terjadi two-way interaction)
Cochran- Mantel-Haenszel Test
• Cochran- Mantel-Haenszel test is to test whether the common conditional (adjusted) odds ratio of y and x equals to one, i.e. H0 : 1
• Of course, one can use the confidence interval of to test this null hypothesis. The problem with using confidence interval for hypothesis testing is the failure of obtaining p-value.
Cochran- Mantel-Haenszel Test
• The idea of CMH test is similar to that of Breslow-Day test: under the null hypothesis, • nk11 is close to itsr mean E (nk11;1) for each k. As a result, the total nk11 is also close to its mean,
E (nk11;1) r
k 1
k 1
Cochran- Mantel-Haenszel Test
• Cochran- Mantel-Haenszel test statistics takes the form: r r 2 CMH
nk11 E (nk11;1) k 1
k 1
Var (nk11;1) r
k 1
2
• Under the null hypothesis, Cochran- Mantel-Haenszel test statistics has a chi-squared distribution with degrees of freedom 1.
Hipotesis
H0: ORM=ORF =1 Tidak ada interaksi VS
H1: Ada minimal 1 OR≠1, dan terjadi partial/conditional association
CMH Statistic 1: Nonzero Correlation • Tests the null hypothesis of no association vs. the alternative hypothesis that there is a linear association between the row and column variables in at least one stratum • Both row and column variables have to be ordinal • Under H0, ~ χ2 with 1 df CMH Statistic 2: Row Mean Scores Differ • Tests the null hypothesis of no association vs. the alternative hypothesis that the mean scores of the table rows are unequal for at least one stratum • Useful only when the column variable is ordinal • Under H0, ~ χ2 with (r – 1) df CMH Statistic 3: General Association • Tests the null hypothesis of no association vs. the alternative hypothesis that there is some kind of association between the row and column variables for at least one stratum • Does not require the row or column variable to be ordinal • Under H0, ~ χ2 with (r – 1)(c – 1) df
SAS Output The FREQ Procedure
Summary Statistics for Treatment by Response Controlling for Gender
Cochran-Mantel-Haenszel Statistics (Based on Table Scores)
Statistic Alternative Hypothesis DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 1 Nonzero Correlation 1 8.3052 0.0040 2 Row Mean Scores Differ 1 8.3052 0.0040 3 General Association 1 8.3052 0.0040 Estimates of the Common Relative Risk (Row1/Row2)
Type of Study Method Value 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Case-Control Mantel-Haenszel 3.3132 1.4456 7.5934 (Odds Ratio) Logit 3.2941 1.4182 7.6515 Cohort (Col1 Risk) Cohort (Col2 Risk)
Mantel-Haenszel Logit Mantel-Haenszel Logit
2.1636 2.1059 0.6420 0.6613
Breslow-Day Test for Homogeneity of the Odds Ratios ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 1.4929 DF 1 Pr > ChiSq 0.2218 Total Sample Size = 106
EPI 809/Spring 2008
1.2336 1.1951 0.4705 0.4852
3.7948 3.7108 0.8761 0.9013
33
Kesimpulan
• Tolak H0, Ada minimal 1 OR≠1, dan terjadi partial/conditional association
Ilustrasi
Breslow Day Test
CMH-Test
data acc; input location $ injury $ fatal $ Count; cards; Victim's_home suicide yes 45 Victim's_home suicide no 20 Victim's_home accident yes 15 Victim's_home accident no 29 Friend's_home suicide yes 13 Friend's_home suicide no 12 Friend's_home accident yes 14 Friend's_home accident no 27 other suicide yes 18 other suicide no 11 other accident yes 11 other accident no 29 ; proc freq data=acc; weight Count; tables location*injury*fatal / cmh noprint; run;