/* GSS data cross-classifies participants on attitudes toward Freedom */ /* of Speech and Suicide. */ data Speech; input Religion Racist Communist Militarist Speech Suicide; /* Religion here refers to an anti-religious speech. 1 indicates */ /* support of free speech in a given context, 0 indicates opposition */ datalines; 1 1 1 1 571 105 0 1 1 1 11 0 1 0 1 1 64 1 0 0 1 1 19 0 1 1 0 1 67 4 0 1 0 1 18 0 1 0 0 1 18 4 0 0 0 1 30 3 1 1 1 0 66 10 0 1 1 0 14 1 1 0 1 0 36 3 0 0 1 0 39 3 1 1 0 0 63 62 0 1 0 0 53 16 1 0 0 0 49 444 0 0 0 0 270 724 ; run; data Suicide; set Speech; /* 1 indicates support of suicide in a given context, 0 opposition */ Incurable=Religion; Tired=Racist; Dishonor=Communist; Bankrupt=Militarist; run; proc genmod data=speech; class religion racist communist militarist; /* The @ sign fits all possible three-way effects */ model speech=Religion|Racist|Communist|Militarist@3/dist=poi link=log type3; run; * All possible two-way effects; proc genmod data=speech; class religion racist communist militarist; model speech=Religion|Racist|Communist|Militarist@2/dist=poi link=log type3; run; *A single 3-way effect added; proc genmod data=speech; class religion racist communist militarist; model speech=Religion|Racist|Communist|Militarist@2 Religion*Communist*Militarist/dist=poi link=log type3; run; *Suicide data--all three-way interactions; proc genmod data=suicide; class incurable tired dishonor bankrupt; model suicide=Incurable|Tired|Dishonor|Bankrupt@3/ dist=poi link=log type3; run; *Suicide data--all two-way interactions; proc genmod data=suicide; class incurable tired dishonor bankrupt; model suicide=Incurable|Tired|Dishonor|Bankrupt@2/ dist=poi link=log type3; run;