/*========================================================= File name: 8_Potthoff.txt Written by: Karl L. Wuensch, WuenschK@ECU.edu Date: 28-August-2012. =========================================================== This is an example of how to test conincidence, intercepts, and slopes with k independent groups. Edit the LIBNAME and SET statements to point to the location of the SAS data set. ********************************************************/ data Areas2_4; LIBNAME Sol 'c:\Users\Vati\Documents\SAS\SASdata'; SET Sol.Lung; if area = 2 or area = 4; fheight=fheight-60; interaction=area*fheight; proc reg; model fweight=area fheight interaction; test area=0, interaction=0; title 'Compare Area 2 with Area 4'; run; data Areas1to4; set Sol.Lung; fheight=fheight-60; *Create dummy variables for area; If area=1 then Area1=1; else Area1=0; If area=2 then Area2=1; else Area2=0; If area=3 then Area3=1; else Area3=0; *Create dummy variables for interaction; I1=Area1*fheight; I2=Area2*fheight;I3=Area3*fheight; proc reg; model fweight=Area1 Area2 Area3 fheight I1 I2 I3; test Area1=0, Area2=0, Area3=0, I1=0, I2=0, I3=0; test I1=0, I2=0, I3=0; test Area1=0, Area2=0, Area3=0; title 'Test coincidence, slopes, and intercepts across four areas'; run; /********* If you can do without the test of coincidence, Proc GLM will do the dummy coding for you and give you the tests of slopes and of intercepts *******/ proc GLM; CLASS area; model fweight=area|fheight / ss3; run;