/*-------- Example: Test of independence with smoking data, Lesson 3 -------------*/ options ls=90 nocenter nodate; /**********************************************************/ /***********************************************************/ /* testing 2x3 table */ /* specifying the reference level of a string variable */ data smoke; input parent $ child $ count ; datalines; both yes 400 both no 1380 one yes 416 one no 1823 neither yes 188 neither no 1168 ; proc FREQ order=data; weight count; tables parent*child/all expected; /*tables parent*child/all expected relrisk riskdiff */ run;