/* ---------------------------------------------------------- FILE: intimacy.sas DATA: Intimacy between therapists and Clients, from Tabachnick & Fidell, 3rd Ed, pp 302-312. PURPOSE: Loglinear analysis--see T & B for how to do it. ---------------------------------------------------------- */ options nocenter pageno=1; title 'Sexual Intimacy between Therpatists and Clients'; title2 'from Tabachnick and Fidell, pp. 302-312'; proc format; value gtfmt 0='None' 1='Very Little' 2='Some'; value agefmt 0='Younger' 1 = 'Older'; value sexfmt 0='Female' 1='Male'; value intfmt 0='Never' 1='Yes'; data intimat; input gradtrng age sex intimacy freq; format gradtrng gtfmt. age agefmt. sex sexfmt. intimacy intfmt.; label gradtrng='Graduate Training' freq = 'Frequency'; cards; 0 0 1 0 75 0 0 1 1 6 0 0 0 0 56 0 0 0 1 3 0 1 1 0 71 0 1 1 1 14 0 1 0 0 82 0 1 0 1 1 1 0 1 0 45 1 0 1 1 5 1 0 0 0 27 1 0 0 1 1 1 1 1 0 35 1 1 1 1 4 1 1 0 0 19 1 1 0 1 .0001 2 0 1 0 35 2 0 1 1 2 2 0 0 0 27 2 0 0 1 .0001 2 1 1 0 39 2 1 1 1 .0001 2 1 0 0 21 2 1 0 1 1 ; title3 simple contingency tables; proc freq data=intimat; tables (gradtrng age sex)*intimacy / chisq; weight freq; run;