/*Getting MEANS and doing statistical testing among the group means --using PROC MIXED www.estat.us */ /*One can use PROC MIXED to do simple statsitical testing. The disadvantage (?) is that it isn't clear what is determining DF. */ /*This is a simple comparison between male and felame*/ /*Saving results using ODS. See AAA1 and BBB2. Click on them to see the data sets from Explorer window (WORK folder).*/ PROC MIXED data=sashelp.class covtest noclprint; class sex; model height=sex; lsmeans sex/PDIFF adjust=tukey; ods output LSMeans=AAA1 Diffs=BBB2; RUN; /*This is a comparison among many groups*/ PROC MIXED data=sashelp.retail covtest noclprint; class year; model sales=year; lsmeans year/PDIFF adjust=tukey; ods output LSMeans=AAA2 Diffs=BBB2; RUN; /*Above procedures produced result data sets*/ /*Use TIMEPLOT to see some of them*/ proc timeplot data=AAA2; plot estimate / overlay ref=mean( estimate ) hiloc npp /*pos=20*/ REFCHAR="*" JOINREF; id year ; run;