options pageno=1; title "Women's labour-force participation, Canada 1977"; /* Source: Social Change in Canada Project, York Institute for Social Research. */ %include data(wlfdata) / source2; proc print data=wlfpart(obs=50); run; /*NB: Proc Logistic considers the lowest value of the response to be the 'event' (usually a 0) whose probability is to be modelled. For the binary responses here, we want 1 to be the event, so we use the descending option. */ proc logistic data=wlfpart nosimple descending; class region; model working = husinc children region; title2 'All-main-effects model for Working (Full or Part)'; run; proc logistic data=wlfpart nosimple; model labor = husinc children ; title2 'Proportional Odds Model for Fulltime/Parttime/NotWorking'; run; proc logistic data=wlfpart nosimple descending; model working = husinc children ; output out=resultw p=predict; ods output GlobalTests=gtests1; title 'Nested Dichotomies'; proc plot; plot predict * husinc = children; proc logistic data=wlfpart nosimple descending; model fulltime = husinc children ; output out=resultf p=predict; ods output GlobalTests=gtests2; proc plot; plot predict * husinc = children; run; quit; title2 'Summing Global tests for full 3-category model'; data gtests; set gtests1 gtests2; by Test; proc print data=gtests; by Test; id Test; sum ChiSq df; run;