* * File MANOVA.wolves.sas * * Example of a MANOVA using factor scores ; OPTIONS NOCENTER NODATE PAGENO=1; * --- NOTW WELL: must assign LIBNAME p7291; * --- first do the factor analysis to reduce the number of dependent variables; TITLE 'Wolf Skull Measurements'; PROC FACTOR DATA=p7291.wolves CORR ROTATE=promax N=3 SCORE OUT=wolves2; VAR x1-x9; RUN; * --- rename the factors to something meaningful; DATA wolves2 (RENAME=(factor1=width1 factor2=length factor3=width2)); SET wolves2; RUN; TITLE2 GLM univariate ANOVAs; PROC GLM DATA=wolves2; CLASS sex location; MODEL width1 width2 length = sex | location; RUN; * --- means and leasat square means; TITLE2 'Means and Least Squares Means'; MEANS location sex*location; LSMEANS sex location sex*location; RUN; * --- MANOVA for each effect; TITLE2 'MANOVAs'; MANOVA H=sex; MANOVA H=location; MANOVA H=sex*location; RUN; * --- profile analysis: Level; TITLE2 'Profile analysis: Overall Level = Mass'; MANOVA H=sex M=width1 + width2 + length; MANOVA H=location M=width1 + width2 + length; MANOVA H=sex*location M=width1 + width2 + length; RUN; * --- Profile analysis: shape; TITLE2 'Profile analysis: Shape: Sex'; MANOVA H=sex M=width1 - length, length - width2 MNAMES = dw1len dw2len / SUMMARY; RUN; TITLE2 'Profile analysis: Shape: Location'; MANOVA H=location M=width1 - length, length - width2 MNAMES = dw1len dw2len / SUMMARY; RUN; TITLE2 'Profile analysis: Shape: Sex*Location'; MANOVA H=sex*location M=width1 - length, length - width2 MNAMES = dw1len dw2len / SUMMARY; RUN; QUIT;