/*fitting an incomplete table */ /*replace a missing value with any value, e.g. 0*/ /*create a numerical indicator variable 'delta' that takes 1 for the missing value and zero everywhere else */ options ls=90 nocenter nodate; data concerns; input gender $ health $ count delta; datalines; male sex 6 0 male mens 0 1 male healthy 49 0 male none 77 0 female sex 16 0 female mens 12 0 female healthy 29 0 female none 102 0 ; /*without and indicator variable*/ proc genmod data=concerns order=data; class gender health; model count = gender health gender*health /link=log dist=poisson lrci type3 obstats; title 'Saturated model without indicator'; /*with indicator variable */ proc genmod data=concerns order=data; class gender health; model count = gender health gender*health delta/link=log dist=poisson lrci type3 obstats; title 'Satuared Model'; run; /*without and indicator variable*/ proc genmod data=concerns order=data; class gender health; model count = gender health /link=log dist=poisson lrci type3 obstats; title 'Indepedence model'; run; /*with and indicator variable*/ proc genmod data=concerns order=data; class gender health; model count = gender health delta/link=log dist=poisson lrci type3 obstats; title 'Indepedence model'; run; ;