# 9.4 - Approach 2: MANOVA

9.4 - Approach 2: MANOVA

When taking a multivariate approach, we collect the observations over time from the same dog, dog j receiving treatment i into a vector:

$$\mathbf{Y}_{ij} = \left(\begin{array}{c}Y_{ij1}\\ Y_{ij2} \\ \vdots\\ Y_{ijt}\end{array}\right)$$

We treat the data collected at different points in time as if it were data from different variables. Basically, we have a vector of observations for dog j receiving treatment i and each entry corresponds to data collected at a particular point in time.

The usual assumptions are made for a one-way MANOVA. In this case:

1. Dogs receiving treatment i have common mean vector $$\mu_{i}$$
2. All dogs have a common variance-covariance matrix $$\Sigma$$
3. Data from different dogs are independently sampled
4. Data are multivariate normally distributed

## The Analysis

Step 1: Use a MANOVA to test for overall differences between the mean vectors of the four different observations and the treatments.

We will use the Dog SAS program to perform this multivariate analysis.

Note: In the upper right-hand corner of the code block you will have the option of copying ( ) the code to your clipboard or downloading ( ) the file to your computer.

options ls=78;
title "Repeated Measures - Coronary Sinus Potassium in Dogs";

data dogs;
infile "D:\Statistics\STAT 505\data\dog1.csv" firstobs=2 delimiter=',';
input treat dog p1 p2 p3 p4;
run;

proc print data=dogs;
run;

/* The class statement specifies treat as a categorical variable.
* The model statement specifies p1 through p4 as the responses
* and treat as the factor.
* The h= option in the manova statement is used to specify over
* which groups the mean response vectors are to be compared.
* The m= option specifies the transformation (if any) to be
* applied to the responses before the means are calculated.
*/

proc glm data=dogs;
class treat;
model p1 p2 p3 p4=treat;
manova h=treat / printe;
manova h=treat m=p1+p2+p3+p4;
manova h=treat m=p2-p1,p3-p2,p4-p3;
run;


### MANOVA approach

To fit the MANOVA model and test for equal mean vectors:

1. Open the ‘dog1’ data set in a new worksheet
2. Rename the columns treat, dog, p1, p2, p3, and p4, from left to right.
3. Stat > ANOVA > General MANOVA
1. Highlight and select p1 through p4 to move these to the Responses window.
2. Highlight and select treat to move it to the Model window.
3. Choose 'OK'. The results for the MANOVA test are displayed in the results area.

To fit the MANOVA model and test for interaction effect:

1. Open the ‘dog1’ data set in a new worksheet
2. Rename the columns treat, dog, p1, p2, p3, and p4, from left to right.
3. Name new columns in the worksheet diff12, diff23, diff34. These will be used below.
4. Calc > Calculator
1. Highlight and select diff12 for the Store result window.
2. In the Expression window, enter p1-p2, and choose 'OK'. The first difference of the responses appears in the diff12 column in the worksheet.
3. Repeat sub-steps 1. and 2. but with diff23 in the Store result window and with p2-p3 in the Expression window.
4. Repeat sub-steps 1. and 2. but with diff34 in the Store result window and with p3-p4 in the Expression window.
5. Stat > ANOVA > General MANOVA
1. Highlight and select diff12, diff23, and diff34 to move these to the Responses window.
2. Highlight and select treat to move it to the Model window.
3. Choose 'OK'. The results for the interaction test are displayed in the results area.

To fit the MANOVA model and test for treatment main effect:

1. Open the ‘dog1’ data set in a new worksheet
2. Rename the columns treat, dog, p1, p2, p3, and p4, from left to right.
3. Name a new column in the worksheet sum.
4. Calc > Calculator
1. Highlight and select sum for the Store result window
2. In the expression window, enter p1+p2+p3+p4, and choose 'OK'. The sum of the responses appears in the sum column in the worksheet.
5. Stat > ANOVA > One-way
1. Choose 'Response data are in one column'.
2. Highlight and select sum to move this to the Responses window.
3. Highlight and select treat to move it to the Factor window.
4. Choose 'OK'. The results are shown in the results area.

We use the glm procedure to analyze these data. In this case, we look at a one-way MANOVA.  We only really have one classification variable - treatment.

The model statement includes the variables of interest on the left-hand side of the equal sign.  In this case, they are p1, p2, p3, and p4, (the potassium levels at four different points in time).  We put the explanatory variable, treatment, on the right-hand side of the equal sign.

The first MANOVA statement tests the hypothesis that the mean vector of observations over time does not depend on treatment. The print option asks for the error of sums of squares and cross-products matrix as well as the partial correlations.

The second MANOVA statement tests for the main effects of treatment. We'll return to this later.

The third MANOVA statement tests for the interaction between treatment and time. We'll also return to this later.

Right now, the result that we want to focus on is the Wilks Lambda of 0.484, and the corresponding F-approximation of 2.02 with 12, 77 d.f. A p-value of 0.0332 indicates that we can reject the null hypothesis that there is no treatment effect.

Our Conclusion at this point: There are significant differences between at least one pair of treatments in at least one measurement of time $$\left( \Lambda = 0.485; F = 2.02; d.f. = 12, 77; p = 0.0332 \right)$$.

## Next Steps...

If we find that there is a significant difference, then with repeated measures data we tend to focus on a couple of additional questions:

• First Question

Is there a significant treatment by time interaction? Or, in other words, does the effect of treatment depend on the observation time? Previously in the ANOVA analysis, this question was evaluated by looking at the F-value, 2.06. This was reported as a significant result. If we find that this is a significant interaction, the next thing we need to address is, what is the nature of that interaction.

• Alternative Question

If we do not find a significant interaction, then we can collapse the data and determine if the average sinus potassium level over time differs significantly among treatments.  Here, we are looking at the main effects of treatment.

Let's proceed...

  Link ↥ Has Tooltip/Popover Toggleable Visibility