Bary prdctor Bary outcom HANDY REFERENCE SHEE HRP/SAS 6, Dscrt Data x Cotgcy abls Dsas (D No Dsas (~D Exposd (E a b Uxposd (~E c d Masurs of Assocato a /( a + b Rs Rato = c /( c + d RR * xp a /( a+ b c /( c+ d a /( a+ b c /( c+ d.96 + +.96 + a c a c, RR * xp Odds Rato = bc OR * xp.96 + + + a b c d, OR * xp +.96 + + + a b c d Dffrc Proportos: H 0 : pd / E pd /~ E = 0 [for cas-cotrol study: p / d p /~ d = 0 ] st Statstc: ( p d / pˆ ( p d / d / pˆ d ( p + /~ d /~ ( p ~ d /~ ~ Z ( pˆ d / pˆ d /~ ±.96 * ( pˆ d / ( pˆ d / ( pˆ + d /~ ( pˆ ~ d /~ proc frq data=yourdata; tabls yourexposur*youroutcom /masurs cl; wght couts; *f you ha groupd data;
Bary prdctor Bary outcom Catgorcal coarat xxk Cotgcy abls Notato: outcom=d; prdctor=; catgorcal coarat= Stps. Calculat crud OR d- (or RR d-. Calculat stratum-spcfc OR s: OR d-/=k 3. If crud OR stratum-spcfc OR s ar all smlar SOP. s ully to b a cofoudr or a ffct modfr, you may us usual mthods for x tabl (s pag, gorg. 4. If crud OR stratum-spcfc OR s dffr procd to (a or (b blow: a If stratum-spcfc OR s ar smlar to ach othr suspct cofoudg ( Apply Cochra-Matl-Haszl tst of codtoal dpdc: H 0 : d ar codtoally dpdt. st Statstc: No Dsas Dsas Exposd a b Uxposd c d [ (a = = E(a Var(a ] ( a + b ( a + c E(a = ; whr ( a + b ( a + c ( b + d ( c + d Var(a = ( = total stratum ( Calculat Matl-Haszl (MH summary OR (justd for cofoudg by. If you rjctd th ull (, th MH OR should b.0. If you dd ot rjct ull (, th MH OR should b.0. OR = d / = = a d b c For RR: RR d / = = = a ( c c ( a + d + b b If stratum-spcfc OR s dffr from ach othr suspct tracto (ffct modfcato ( Apply Brslow-Day tst of homogty of th OR s: H 0 : stratum-spcfc OR s ar qual (homogous st Statstc: complx us computr softwar If you rjct ull ffct modfcato s prst. Rport stratumspcfc OR s If you fal to rjct ull suffct dc of ffct modfcato; calculat Matl-Haszl summary OR, as abo. proc frq data=yourdata; tabls yourcoarat*yourexposur*youroutcom /cmh; wght couts; *f you ha groupd data;
Catgorcal Varabls that lac clar prdctor/outcom dstcto Mult-way Cotgcy abls: Notato: x, y, z ar catgorcal arabls Ch-squar tst of dpdc (RxC tabl: H 0 : x, y, z ar dpdt st Statstc: clls ( Obsrd Expctd Expctd ( rows ( colums Log-Lar Modl log( couts = + β x + β y + β z + tractos f approprat x y z Odds rato trprtato (f x tabl: log( ORd = log( = log a + log d logb logc bc log( = ( + β d + β + β d + ( ( + β d ( + β bc OR = β d* * = β d* Ch-squar tst proc frq data=yourdata; tabls yourx*youry*yourk / chsq; wght couts; *f you ha groupd data; Log-lar modls proc gmod data=yourdata; modl total = yourx youry yourk YourItractos / dst=posso l=log prd;
Urstrctd prdctors coarats Bary outcom Logstc Rgrsso Modl: p l( = + β x + β x p + sts of Modl Ft: Wald st... Smplst form of th logstc llhood (from x: + β a b c d l( β = ( x( x( x( + β + β + + + + Dsas No Dsas Exposd a b Uxposd c d ˆ β 0 Z = asymptotc stard rror ( ˆ β Llhood Rato st: whr full modl has paramtrs rducd modl has -p rducd l = full l( rducd [ l( full] p Itrprtato of Estmatd Coffcts Odds Probablts: OR trprtato: OR xposur = β xp OR trprtato th prsc of tracto (two bary prdctors: β + β + β OR xposur/tractg factor prst = OR xposur/tractg factor abst = β Probablty trprtato: P(D/E = + β + + β proc logstc data = aalyss; class YourPrdctor_c (rf= "YourBasl"; * automatc dummy codg to gt > OR agast th rfrc group; modl YourOutcom_c (t = "Ys" = YourPrdctor / lacft; *lacft gs Hosmr Lmshow goodss of ft ch-squar tst; output out = OutDataSt p = Prdctd; *outputs prdctd probablts to w datast;
Par-Matchd Data Par-Matchd Data Bary Prdctor Bary Outcom Cas Matchd-cotrol Exposd Uxposd Exposd a b Uxposd c d Odds Rato b OR = c McNmar s st H 0 : xposur dsas ar dpdt st Statstc: ( b c b + c :M Matchd Data Codtoal Logstc Rgrsso: h smplst llhood (from x: β b c l ( β = ( x( β β + + Matchd Data Urstrctd Prdctors Coarats Bary Outcom OR trprtato: OR xposur = β xp ** SAS V9 ONLY proc logstc data = yourdata ; modl YourOutcpm_c (t= "Ys" = YourPrdctor YourPrdctor YourPrdctor3...; strata MatchgVarabl MatchgVarabl / fo; output out = OutDatast p = Prdctd;