/* ----------------------------------------------------------- File: weightLoss.sas Purpose: Interpretation of MANOVA & Profile Analysis Study: Fabricated data on a clinical trial of a dietary intervention and an exercise intervention on weight loss and self esteem amoung overweight folks of a single gender. Weight is measured in kilograms and self-esteem is measured from a paper and pencil test of Poor Self Image. Note that high scores on the Poor Self Image reflect a poorer self-image than low scores. Hence, weight and poor self image are positively correlated. ----------------------------------------------------------- */ DATA Weight; INPUT Subject GroupNum Group $ Weight_Pre PoorImage_Pre Weight_Post PoorImage_Post; Weight_Loss = Weight_Pre - Weight_Post; SelfImage_Gain = PoorImage_Pre - PoorImage_Post; DATALINES; 1 1 Control 85.29 23 79.31 22 2 2 Diet 71.51 19 62.12 12 3 3 Exercise 93.20 22 89.29 22 4 2 Diet 83.81 17 73.46 17 5 2 Diet 102.6 24 85.75 15 6 2 Diet 83.78 20 84.67 22 7 2 Diet 86.17 24 68.77 13 8 2 Diet 107.8 19 108.3 22 9 3 Exercise 74.13 15 62.06 7 10 2 Diet 79.07 23 72.15 23 11 3 Exercise 81.70 18 78.24 16 12 1 Control 97.64 24 97.30 28 13 3 Exercise 79.37 21 75.78 12 14 1 Control 85.49 19 85.00 16 15 1 Control 83.84 16 89.23 21 16 2 Diet 69.95 18 70.94 21 17 2 Diet 80.01 24 75.34 22 18 1 Control 74.55 14 74.18 14 19 1 Control 91.34 24 93.88 23 20 2 Diet 86.95 19 80.95 19 21 2 Diet 90.02 15 72.90 11 22 1 Control 94.24 25 99.56 23 23 3 Exercise 84.69 20 81.60 19 24 3 Exercise 87.70 21 81.22 19 25 1 Control 83.75 17 85.35 18 26 3 Exercise 83.67 21 76.91 18 27 3 Exercise 78.51 23 67.81 15 28 2 Diet 83.83 18 81.98 16 29 3 Exercise 72.05 15 73.24 17 30 1 Control 96.01 22 92.68 18 31 1 Control 85.97 21 79.50 17 32 2 Diet 84.62 22 72.43 16 33 1 Control 80.84 20 79.24 24 34 1 Control 81.82 23 87.41 25 35 3 Exercise 77.19 25 74.34 22 36 2 Diet 69.34 18 68.64 20 37 3 Exercise 74.56 18 67.94 16 38 3 Exercise 80.29 19 75.71 16 39 2 Diet 89.28 20 84.27 21 40 1 Control 79.64 20 79.22 20 41 3 Exercise 89.94 23 83.63 18 42 3 Exercise 74.16 12 65.21 7 43 1 Control 84.09 18 88.07 23 44 1 Control 73.30 21 65.12 11 45 3 Exercise 71.23 11 74.79 15 ; RUN; /* ----------------------------------------------------------- First, calculate the means for each condition. This is necessary for plotting the means or using a table of means ----------------------------------------------------------- */ TITLE Weight loss intervention study; TITLE2 Descriptive Statistics; PROC SUMMARY DATA=Weight PRINT; CLASS Group; VAR Weight_Pre -- SelfImage_Gain; RUN; /* ----------------------------------------------------------- Next, examine the correlations ----------------------------------------------------------- */ TITLE2 Correlations; PROC CORR DATA=Weight; VAR Weight_Pre Weight_Post PoorImage_Pre PoorImage_Post; RUN; PROC CORR DATA=Weight; VAR Weight_Loss SelfImage_Gain; RUN; /* ----------------------------------------------------------- From the output, we note that despite random assignment, the exercise group weighed on average 5 kilos less than the Controls and the Diet Group before the intervention. This cautions us that we should control for baseline weight in the analysis. Control can be accomplished in one of two ways: (1) using basaeline weight as a predictor in the GLM (i.e., a covariate) or (2) using difference scores. Difference scores are easier to interpret, so lets use them. ----------------------------------------------------------- */ /* ----------------------------------------------------------- Because the differences scores for weight and for poor self image are on different scales, we will create a temporary data set and rescale them to a standard normal distribution. The standardized scores will then be used for plotting. ----------------------------------------------------------- */ DATA temp; SET Weight; ZWeight_Loss = Weight_Loss; ZSelfImage_Gain = SelfImage_Gain; RUN; PROC STANDARD DATA=Temp OUT=Temp M=0 S=1; VAR ZWeight_Loss ZSelfImage_Gain; RUN; /* -------------------------------------------------------------- Plotting the means ------------------------------------------------------------- */ PROC FORMAT; VALUE dvfmt 0 = ' ' 1 = 'Weight Loss' 2 = 'Self-Image Gain' 3 = ' '; RUN; DATA Temp1; SET Temp; Depvar=1; Score = ZWeight_Loss; OUTPUT; Depvar=2; Score = ZSelfImage_Gain; OUTPUT; format depvar dvfmt.; RUN; PROC SORT DATA=Temp1; BY Depvar Group; RUN; PROC MEANS DATA=Temp1 NOPRINT; BY Depvar Group; VAR Score; OUTPUT OUT=TempMeans MEAN=Mean STDERR=StdErr; RUN; DATA TempPlot; SET TempMeans; Score = Mean; OUTPUT; Score = Mean + StdErr; OUTPUT; Score = Mean - StdErr; OUTPUT; LABEL Score = 'Mean' Depvar = 'Dependent Variable'; RUN; TITLE2; AXIS1; AXIS2; SYMBOL1 c=black f=, v=none l=1 w=4 i=hilotj ci=red; SYMBOL2 c=black f=, v=none l=2 w=4 i=hilotj ci=green; SYMBOL3 c=black f=, v=none l=3 w=4 i=hilotj ci=blue; PROC GPLOT DATA=TempPlot; PLOT Score*Depvar=Group / VAXIS=axis1 HAXIS=axis2; RUN; QUIT; /* ------------------------------------------------------------- Now, the GLM. We will use two contrasts: (1) Control vs. the average of the two experimental interventions, and (2) Diet versus Exercise ----------------------------------------------------------- */ TITLE2 Univariate ANOVAs; PROC GLM DATA=Temp; CLASS Group; MODEL ZWeight_Loss ZSelfImage_Gain = Group; CONTRAST 'Cntrl v Exprmntl' Group -2 1 1; CONTRAST 'Diet v Exercise' Group 0 -1 1; RUN; /* ------------------------------------------------------------- The results from this suggest that the treatments have an influence on Weight but not on Image. Furthermore, there is no evidence for a difference betweeen the Diet and the Exercise conditions. ----------------------------------------------------------- */ TITLE2 Overall MANOVA; MANOVA H=Group / PRINTE; RUN; /* ------------------------------------------------------------- The MANOVA results for H=Group and for the "Control v. Experimental" Contrast are consistent with the overall univariate ANOVA. Now, however, there is a significant difference for "Diet v Exercise." Let us do a profile analysis to see if we can isolate this effect. NOTE: We will also use the H=Group in the profile analysis. This is not needed, but is included for the sake of completeness. ----------------------------------------------------------- */ TITLE3 Profile Analysis: Level; MANOVA H=group M=ZWeight_Loss + ZSelfImage_Gain; RUN; TITLE3 Profile Analysis: Shape; MANOVA H=group M=ZWeight_Loss - ZSelfImage_Gain; RUN; QUIT; /* ------------------------------------------------------------- Note how well the MANOVA profile analysis clarifies the issue. Again, the results for H=Group and for the "Control v Experimental" contrast do not tell us anything new. The results for the "Diet v Exercise" contrast is important. Here, there is no effect on Profile Level. This tells us that the average of (weight loss + gain in self image) is the same for Diet and Exercise. The significant results for Profile Shape tell us that Diet and Exercise have significantly different effects on the two outcomes. From examination of the means, Diet (relative to Exercise) is better for weight loss; Exercise (relative to Diet) is better for self- image. Hence, if a therapist concludes that a patient's weight loss is more important than a gain in self image, the therapist should spend more time monitoring a dietary intervention than an exercise regimen. If, on the other hand, the patient's self-esteem is the more important quality, then the emphasis should be on exercise. Note that the interpretation of the univariate ANOVAs would have resulted in different conclusions. The truth is that the interventions did influence self-image, but the univariate ANOVA lacked the power to detect it. ----------------------------------------------------------- */