Sering dibahas Usia
X Asosiasi
2 peubah Y
Y
Z Jenis Tingkat
X Kelamin Prestasi
Tabel Kontingensi 3 arah
Analisis Rumit??
1
20/11/2013
Tabel Parsial
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) :
Tabel Marginal (Marginal Table) : adalah tabel
adalah tabel
yang lebih sederhana yang diperoleh tanpa
melihat kategori peubah lain (kategori peubah
lain digabungkan).
Tabel Parsial (lanjutan) Tabel Marginal
• Pengujian hipotesis tentang ada/tidaknya
h b
hubungan antar variabel kategorik dapat
t i b lk t ik d t
dilakukan pada tabel parsial seperti dengan uji
chi‐square.
• Ukuran asosiasi pada tabel parsial disebut
g conditional association. Ukuran
dengan
asosiasi disini bisa seperti odds ratio, relative
risk atau koefisien gamma
2
20/11/2013
Tabel Marginal (lanjutan)
• Pengujian hipotesis tentang ada/tidaknya • Uji Breslow‐Day digunakan untuk menguji
h b
hubungan antar variabel kategorik dapat
t i b lk t ik d t ada/tidaknya terdapat hubungan yang homogen
ada/tidaknya terdapat hubungan yang homogen
antar 3 variabel pada tabel 3 arah dengan
dilakukan pada tabel marginal seperti dengan hopotesis awal adanya asosiasi homogen.
uji chi‐square. Ukuran asosiasi pada tabel
• UjiCochran–Mantel–Haenszel (CMH) untuk
parsial disebut dengan marginal menguji ada/tidaknya conditional associatian
association. Ukuran asosiasi disini bisa seperti p
pada tabel 3 arah dengan hipotesis awal semua
g p
odds ratio, relative risk atau koefisien gamma. conditional odds ratios bernilai 1.
Untuk penjelasan lebih lengkap mengenai kedua
uji tersebut dapat dilhat
But after stratify by sex, it will be different for male vs female.
• SAS manual
EPI 809/Spring 2008 11 EPI 809/Spring 2008 12
3
20/11/2013
Example – Migraine
Male Response
A i
Active 12
12 16
16 28
p = 0.2205
Placebo 7 19 26 Breslow Day‐Test
Total 19 35 54
Female Response
Non‐central Hypergeometric
Breslow‐Day Test distribution
• Fact: For the kth 2 by 2 table, the conditional
• The
The Mantel
Mantel‐Haenszel(logit)
Haenszel(logit) estimate of common
estimate of common di t ib ti
distribution of n
f k11 given column totals, m
i l t t l k1
odds ratio are developed under the hypothesis that
and mk0, and row totals, nk1 and nk0 , fixed is
the conditional odds ratios are equal. It is necessary
to test this odds ratio homogeneity hypothesis: so‐called Non‐central Hypergeometric
distribution, which has the following
H 0 : θ1 = L = θ r
before obtaining the Mantel‐Haenszel(logit) estimate,
before obtaining the Mantel‐Haenszel(logit) estimate
probability mass function:
θk
where is the conditional odds ratio
corresponding to the k‐th level of z (k=1,…,r)
= i) =
( )( )θ
nk 1 nk 0
i mk1 −i
i
k
∑ ( )( )θ
P ( n k 11 nk 1 nk 0 u
u mk1 −u k
u
4
20/11/2013
Non‐central Hypergeometric
Breslow‐Day Test
distribution
• Hypergeometric
Hypergeometric distribution is a special case of Non
distribution is a special case of Non‐ • The
The idea of Breslow
idea of Breslow‐Day
Day test is under the null
test is under the null
central Hypergeometric distribution since when the θk
hypothesis( are equal), nk11 is approximately
θk
odds ratio, , equals 1, the mass function of Non Non‐central Hypergeometric distributed with
central Hypergeometric distribution becomes that of θ k = θˆMH
Hypergeometric distribution:
E (n11k ;θˆMH )
and hence nk11 should be close to , the
= i) =
( )( ) = ( )( )
nk 1 nk 0
i mk 1 −i
nk 1
i
nk 0
mk 1 −i
mean of this Non‐central Hypergeometric
mean of this Non‐central Hypergeometric
distribution.
∑ ( )( ) ( )
P (nk11 nk 1 nk 0 nk
u mk 1 −u mk 1
u
uji ini digunakan untuk menguji ada tidaknya 3‐way
interaction/association (interaksi/asosiasi 3 arah) Hipotesis
H0: Terdapat asosiasi homogen (tidak ada 3‐way H0: ORM=ORF
interaction/association)
Sebaran antara grup perlakuan dan respon yang
Sebaran antara grup perlakuan dan respon yang
H1: Tidak terdapat asosiasi homogen (ada 3‐way
d k d h ( d dihasilkan sama (tidak berbeda ) pada jenis kelamin yang
interaction/association) berbeda
H0 ditolak jika nilai p‐value kurang dari taraf signifikansi VS
yang digunakan (p‐value<alpha). Tolak H0 berarti ada 3‐
way interaction. Jika H0 tidak ditolak berarti terjadi
homogeneous association dan conditional association
homogeneous association dan conditional association H1: OR
: ORM≠ OR
≠ ORF
antar setiap 2 variabel adalah sama pada setiap level Ada asosiasi keseluruhan antara grup perlakuan dan
variabel ketiga (terdapat homogeneous associations respon yang dihasilkan di kelompok jenis kelamin yang
dalam data). Akan tetapi uji ini hanya bisa digunakan berbeda
pada tabel 2x2xK.
5
20/11/2013
χ 2
=∑
r
[ nk11 − E (nk11 ;θˆMH ) ]2 input Gender $ Treatment $ Response $ Count @@;
datalines;
Var ( nk11 ;θˆMH )
BD
k =1 female Active Better 16 female Active Same 11
female Placebo Better 5 female Placebo Same 20
male Active Better 12 male Active Same 16
Under H0, Breslow‐Day test statistics has a chi‐squared distribution with male Placebo Better 7 male Placebo Same 19
degrees of freedom r‐1. ;
SAS Output
The FREQ Procedure
Cohort
Logit
Mantel-Haenszel
3.2941 1.4182
2.1636 1.2336
7.6515
3.7948
tidak tolak hipotesis nol dan simpulkan
(Col1 Risk)
Cohort
Logit
Mantel-Haenszel
2.1059
0.6420
1.1951
0.4705
3.7108
0.8761
p g
terdapat asosiasi homogen atau tidak
(Col2 Risk) Logit 0.6613 0.4852 0.9013
terdapat interaksi 3 variabel pada tabel 3
Breslow-Day Test for
Homogeneity of the Odds Ratios
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ arah diatas.
Chi-Square 1.4929
DF 1
Pr > ChiSq 0.2218
6
20/11/2013
Setelah di lakukan uji Breslow‐Day test dan ternyata
terima hipotesis awal yang menunjukan adanya
asosiasi homogen, maka bisa dilakukan
However, for the Breslow‐Day test to be uji Cochran–Mantel–Haenszel (CMH) testuntuk
menguji ada/tidaknya conditional association dalam
menguji ada/tidaknya conditional association dalam
valid, the sample size should be relatively three‐way tables (apakah terjadi two‐way
interaction).
large in each stratum, and at least 80% of
the expected cell counts should be greater Hipotesis nol dari CMH test adalah
semua conditional odds ratios
conditional odds ratios bernilai 1. Jika H0
bernilai 1. Jika H0
than 5. ditolak, berarti minimal ada satu conditional odds
ratio ≠ 1 dan terjadi par al/condi onal associa on
dalam data.
Digunakan ketika efek dari peubah
The Cochran–Mantel–Haenszel Test penjelas terhadap peubah respon
dipengaruhi oleh kovariat yang
dapat dikendalikan.
untuk menguji ada/tidaknya
untuk menguji ada/tidaknya
conditional association dalam
2 × 2 × K Contingency Tables three‐way tables (apakah terjadi
two‐way interaction)
7
20/11/2013
Cochran‐ Mantel‐Haenszel Test
Cochran‐ Mantel‐Haenszel Test
• The idea of CMH test is similar to that of
• Cochran‐
Cochran Mantel
Mantel‐Haenszel
Haenszel test is to test whether the
test is to test whether the B l
Breslow‐Day test: under the null hypothesis,
D t t d th ll h th i
common conditional (adjusted) odds ratio of y and x
equals to one, i.e. • nk11 is close to its mean for each k. As a
r
E ( nk 11 ;1)
H0 :θ = 1 ∑ k11
result, the total is also close to its mean,
n
k =1
r
θ
• Of course, one can use the confidence interval of to ∑ E (nk11;1)
test this null hypothesis The problem with using
test this null hypothesis. The problem with using k =1
confidence interval for hypothesis testing is the failure
of obtaining p‐value.
Testing of Independence Based on Stratified
Cochran‐ Mantel‐Haenszel Test Tables
• Cochran‐ Mantel‐Haenszel test statistics takes the • H0:OR1=OR2= . . . =ORI = 1
form: r r • HA1:: at least one OR
at least one ORj differs from 1
differs from 1
[ ∑ nk11 − ∑ E (nk11;1) ]2 • Do a χ2 test for each stratum
χ CMH
2
= k =1
r
k =1 – Multiple testing issue
∑ Var (nk11;1) – Low power
k =1 • Add the χ2 test statistic from each stratum to give a
• Under the null hypothesis, Cochran‐ Mantel‐Haenszel χ2 test with I degrees of freedom
g
test statistics has a chi‐squared distribution with – Low power
degrees of freedom 1.
32
8
20/11/2013
SAS Output
Hipotesis The FREQ Procedure
Ilustrasi
Kesimpulan
• Tolak H0, Ada minimal 1 OR≠1, dan terjadi
partial/conditional association
ti l/ diti l i ti
9
20/11/2013
CMH‐Test
Breslow Day 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 yyes 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
h accident
id no 29
;
proc freq data=acc;
weight Count;
tables location*injury*fatal / cmh noprint;
run;
10