The REG Procedure

Multivariate Tests

The MTEST statement described in the section MTEST Statement can test hypotheses involving several dependent variables in the form

where is a linear function on the regressor side, is a matrix of parameters, is a column vector of constants, is a row vector of ones, and is a linear function on the dependent side. The special case where the constants are zero is

To test this hypothesis, PROC REG constructs two matrices called and that correspond to the numerator and denominator of a univariate F test:

These matrices are displayed for each MTEST statement if the PRINT option is specified.

Four test statistics based on the eigenvalues of or are formed. These are Wilks’ lambda, Pillai’s trace, the Hotelling-Lawley trace, and Roy’s greatest root. These test statistics are discussed in Chapter 4: Introduction to Regression Procedures.

The following code creates MANOVA data from Morrison (1976):

* Manova Data from Morrison (1976, 190);
data a;
   input sex $ drug $ @;
   do rep=1 to 4;
      input y1 y2 @;
      sexcode=(sex='m')-(sex='f');
      drug1=(drug='a')-(drug='c');
      drug2=(drug='b')-(drug='c');
      sexdrug1=sexcode*drug1;
      sexdrug2=sexcode*drug2;
      output;
   end;
   datalines;
m a  5  6  5  4  9  9  7  6
m b  7  6  7  7  9 12  6  8
m c 21 15 14 11 17 12 12 10
f a  7 10  6  6  9  7  8 10
f b 10 13  8  7  7  6  6  9
f c 16 12 14  9 14  8 10  5
;

The following statements perform a multivariate analysis of variance and produce Figure 99.49 through Figure 99.52:

proc reg;
   model y1 y2=sexcode drug1 drug2 sexdrug1 sexdrug2;
   y1y2drug: mtest y1=y2, drug1,drug2;
   drugshow: mtest drug1, drug2 / print canprint;
run;

Figure 99.49: Multivariate Analysis of Variance: REG Procedure

The REG Procedure
Model: MODEL1
Dependent Variable: y1

Analysis of Variance
SourceDFSum of
Squares
Mean
Square
F ValuePr > F
Model5316.0000063.2000012.04<.0001
Error1894.500005.25000  
Corrected Total23410.50000   

Root MSE2.29129R-Square0.7698
Dependent Mean9.75000Adj R-Sq0.7058
Coeff Var23.50039  

Parameter Estimates
VariableDFParameter
Estimate
Standard
Error
t ValuePr > |t|
Intercept19.750000.4677120.85<.0001
sexcode10.166670.467710.360.7257
drug11-2.750000.66144-4.160.0006
drug21-2.250000.66144-3.400.0032
sexdrug11-0.666670.66144-1.010.3269
sexdrug21-0.416670.66144-0.630.5366


Figure 99.50: Multivariate Analysis of Variance: REG Procedure

Analysis of Variance
SourceDFSum of
Squares
Mean
Square
F ValuePr > F
Model569.3333313.866672.190.1008
Error18114.000006.33333  
Corrected Total23183.33333   

Root MSE2.51661R-Square0.3782
Dependent Mean8.66667Adj R-Sq0.2055
Coeff Var29.03782  

Parameter Estimates
VariableDFParameter
Estimate
Standard
Error
t ValuePr > |t|
Intercept18.666670.5137016.87<.0001
sexcode10.166670.513700.320.7493
drug11-1.416670.72648-1.950.0669
drug21-0.166670.72648-0.230.8211
sexdrug11-1.166670.72648-1.610.1257
sexdrug21-0.416670.72648-0.570.5734


Figure 99.51: Multivariate Analysis of Variance: First Test

The REG Procedure
Model: MODEL1
Multivariate Test: y1y2drug

Multivariate Statistics and Exact F Statistics
S=1 M=0 N=8
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.2805391723.08218<.0001
Pillai's Trace0.7194608323.08218<.0001
Hotelling-Lawley Trace2.5645645623.08218<.0001
Roy's Greatest Root2.5645645623.08218<.0001


The four multivariate test statistics are all highly significant, giving strong evidence that the coefficients of drug1 and drug2 are not the same across dependent variables y1 and y2.

Figure 99.52: Multivariate Analysis of Variance: Second Test

The REG Procedure
Model: MODEL1
Multivariate Test: drugshow

Error Matrix (E)
94.576.5
76.5114

Hypothesis Matrix (H)
30197.5
97.536.333333333

 Canonical
Correlation
Adjusted
Canonical
Correlation
Approximate
Standard
Error
Squared
Canonical
Correlation
Eigenvalues of Inv(E)*H
= CanRsq/(1-CanRsq)
Test of H0: The canonical correlations in the current row and all that follow are zero
 EigenvalueDifferenceProportionCumulativeLikelihood
Ratio
Approximate
F Value
Num DFDen DFPr > F
10.9059030.8999270.0401010.8206614.57604.51250.98630.98630.1686295212.20434<.0001
20.244371.0.2102540.0597170.0635 0.01371.00000.940282731.141180.2991

Multivariate Statistics and F Approximations
S=2 M=-0.5 N=7.5
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.1686295212.20434<.0001
Pillai's Trace0.880378107.084360.0003
Hotelling-Lawley Trace4.6395366619.40419.407<.0001
Roy's Greatest Root4.5760267541.18218<.0001
NOTE: F Statistic for Roy's Greatest Root is an upper bound.
NOTE: F Statistic for Wilks' Lambda is exact.


The four multivariate test statistics are all highly significant, giving strong evidence that the coefficients of drug1 and drug2 are not zero for both dependent variables.