The GLM Procedure

Example 47.6 Multivariate Analysis of Variance

(View the complete code for this example.)

This example employs multivariate analysis of variance (MANOVA) to measure differences in the chemical characteristics of ancient pottery found at four kiln sites in Great Britain. The data are from Tubb, Parker, and Nickless (1980), as reported in Hand et al. (1994).

For each of 26 samples of pottery, the percentages of oxides of five metals are measured. The following statements create the data set and invoke the GLM procedure to perform a one-way MANOVA. Additionally, it is of interest to know whether the pottery from one site in Wales (Llanederyn) differs from the samples from other sites; a CONTRAST statement is used to test this hypothesis.

title "Romano-British Pottery";
data pottery;
   input Site $12. Al Fe Mg Ca Na;
   datalines;
Llanederyn   14.4 7.00 4.30 0.15 0.51
Llanederyn   13.8 7.08 3.43 0.12 0.17
Llanederyn   14.6 7.09 3.88 0.13 0.20
Llanederyn   11.5 6.37 5.64 0.16 0.14
Llanederyn   13.8 7.06 5.34 0.20 0.20
Llanederyn   10.9 6.26 3.47 0.17 0.22
Llanederyn   10.1 4.26 4.26 0.20 0.18
Llanederyn   11.6 5.78 5.91 0.18 0.16
Llanederyn   11.1 5.49 4.52 0.29 0.30
Llanederyn   13.4 6.92 7.23 0.28 0.20
Llanederyn   12.4 6.13 5.69 0.22 0.54
Llanederyn   13.1 6.64 5.51 0.31 0.24
Llanederyn   12.7 6.69 4.45 0.20 0.22
Llanederyn   12.5 6.44 3.94 0.22 0.23
Caldicot     11.8 5.44 3.94 0.30 0.04
Caldicot     11.6 5.39 3.77 0.29 0.06
IslandThorns 18.3 1.28 0.67 0.03 0.03
IslandThorns 15.8 2.39 0.63 0.01 0.04
IslandThorns 18.0 1.50 0.67 0.01 0.06
IslandThorns 18.0 1.88 0.68 0.01 0.04
IslandThorns 20.8 1.51 0.72 0.07 0.10
AshleyRails  17.7 1.12 0.56 0.06 0.06
AshleyRails  18.3 1.14 0.67 0.06 0.05
AshleyRails  16.7 0.92 0.53 0.01 0.05
AshleyRails  14.8 2.74 0.67 0.03 0.05
AshleyRails  19.1 1.64 0.60 0.10 0.03
;
proc glm data=pottery;
   class Site;
   model Al Fe Mg Ca Na = Site;
   contrast 'Llanederyn vs. the rest' Site 1 1 1 -3;
   manova h=_all_ / printe printh;
run;

After the summary information, displayed in Output 47.6.1, PROC GLM produces the univariate analyses for each of the dependent variables, as shown in Output 47.6.2 through Output 47.6.6. These analyses show that sites are significantly different for all oxides individually. You can suppress these univariate analyses by specifying the NOUNI option in the MODEL statement.

Output 47.6.1: Summary Information about Groups

Romano-British Pottery

The GLM Procedure

Class Level Information
ClassLevelsValues
Site4AshleyRails Caldicot IslandThorns Llanederyn

Number of Observations Read26
Number of Observations Used26


Output 47.6.2: Univariate Analysis of Variance for Aluminum Oxide

Romano-British Pottery

The GLM Procedure
 
Dependent Variable: Al

SourceDFSum of SquaresMean SquareF ValuePr > F
Model3175.610318758.536772926.67<.0001
Error2248.28814292.1949156  
Corrected Total25223.8984615   

R-SquareCoeff VarRoot MSEAl Mean
0.78433010.222841.48152514.49231

SourceDFType I SSMean SquareF ValuePr > F
Site3175.610318758.536772926.67<.0001

SourceDFType III SSMean SquareF ValuePr > F
Site3175.610318758.536772926.67<.0001

ContrastDFContrast SSMean SquareF ValuePr > F
Llanederyn vs. the rest158.5833664058.5833664026.69<.0001


Output 47.6.3: Univariate Analysis of Variance for Iron Oxide

Romano-British Pottery

The GLM Procedure
 
Dependent Variable: Fe

SourceDFSum of SquaresMean SquareF ValuePr > F
Model3134.221615844.740538689.88<.0001
Error2210.95084570.4977657  
Corrected Total25145.1724615   

R-SquareCoeff VarRoot MSEFe Mean
0.92456715.791710.7055254.467692

SourceDFType I SSMean SquareF ValuePr > F
Site3134.221615844.740538689.88<.0001

SourceDFType III SSMean SquareF ValuePr > F
Site3134.221615844.740538689.88<.0001

ContrastDFContrast SSMean SquareF ValuePr > F
Llanederyn vs. the rest171.1514413271.15144132142.94<.0001


Output 47.6.4: Univariate Analysis of Variance for Calcium Oxide

Romano-British Pottery

The GLM Procedure
 
Dependent Variable: Ca

SourceDFSum of SquaresMean SquareF ValuePr > F
Model30.204702750.0682342529.16<.0001
Error220.051485710.00234026  
Corrected Total250.25618846   

R-SquareCoeff VarRoot MSECa Mean
0.79903233.012650.0483760.146538

SourceDFType I SSMean SquareF ValuePr > F
Site30.204702750.0682342529.16<.0001

SourceDFType III SSMean SquareF ValuePr > F
Site30.204702750.0682342529.16<.0001

ContrastDFContrast SSMean SquareF ValuePr > F
Llanederyn vs. the rest10.035316880.0353168815.090.0008


Output 47.6.5: Univariate Analysis of Variance for Magnesium Oxide

Romano-British Pottery

The GLM Procedure
 
Dependent Variable: Mg

SourceDFSum of SquaresMean SquareF ValuePr > F
Model3103.350527034.450175749.12<.0001
Error2215.42961140.7013460  
Corrected Total25118.7801385   

R-SquareCoeff VarRoot MSEMg Mean
0.87009926.657770.8374643.141538

SourceDFType I SSMean SquareF ValuePr > F
Site3103.350527034.450175749.12<.0001

SourceDFType III SSMean SquareF ValuePr > F
Site3103.350527034.450175749.12<.0001

ContrastDFContrast SSMean SquareF ValuePr > F
Llanederyn vs. the rest156.5934933956.5934933980.69<.0001


Output 47.6.6: Univariate Analysis of Variance for Sodium Oxide

Romano-British Pottery

The GLM Procedure
 
Dependent Variable: Na

SourceDFSum of SquaresMean SquareF ValuePr > F
Model30.258245600.086081879.500.0003
Error220.199292860.00905877  
Corrected Total250.45753846   

R-SquareCoeff VarRoot MSENa Mean
0.56442460.063500.0951780.158462

SourceDFType I SSMean SquareF ValuePr > F
Site30.258245600.086081879.500.0003

SourceDFType III SSMean SquareF ValuePr > F
Site30.258245600.086081879.500.0003

ContrastDFContrast SSMean SquareF ValuePr > F
Llanederyn vs. the rest10.233444460.2334444625.77<.0001


The PRINTE option in the MANOVA statement displays the elements of the error matrix, also called the Error Sums of Squares and Crossproducts matrix. (See Output 47.6.7.) The diagonal elements of this matrix are the error sums of squares from the corresponding univariate analyses.

The PRINTE option also displays the partial correlation matrix associated with the E matrix. In this example, none of the oxides are very strongly correlated; the strongest correlation (r = 0.488) is between magnesium oxide and calcium oxide.

Output 47.6.7: Error SSCP Matrix and Partial Correlations

Romano-British Pottery

The GLM Procedure
Multivariate Analysis of Variance

E = Error SSCP Matrix
 AlFeMgCaNa
Al48.2881428577.08007142860.60801428570.10647142860.5889571429
Fe7.080071428610.9508457140.5270571429-0.1551942860.0667585714
Mg0.60801428570.527057142915.4296114290.43537714290.0276157143
Ca0.1064714286-0.1551942860.43537714290.05148571430.0100785714
Na0.58895714290.06675857140.02761571430.01007857140.1992928571

Partial Correlation Coefficients from the Error SSCP Matrix / Prob > |r|
DF = 22AlFeMgCaNa
Al
1.000000
 
0.307889
0.1529
0.022275
0.9196
0.067526
0.7595
0.189853
0.3856
Fe
0.307889
0.1529
1.000000
 
0.040547
0.8543
-0.206685
0.3440
0.045189
0.8378
Mg
0.022275
0.9196
0.040547
0.8543
1.000000
 
0.488478
0.0180
0.015748
0.9431
Ca
0.067526
0.7595
-0.206685
0.3440
0.488478
0.0180
1.000000
 
0.099497
0.6515
Na
0.189853
0.3856
0.045189
0.8378
0.015748
0.9431
0.099497
0.6515
1.000000
 


The PRINTH option produces the SSCP matrix for the hypotheses being tested (Site and the contrast); see Output 47.6.8 and Output 47.6.9. Since the Type III SS are the highest-level SS produced by PROC GLM by default, and since the HTYPE= option is not specified, the SSCP matrix for Site gives the Type III matrix. The diagonal elements of this matrix are the model sums of squares from the corresponding univariate analyses.

Four multivariate tests are computed, all based on the characteristic roots and vectors of . These roots and vectors are displayed along with the tests. All four tests can be transformed to variates that have F distributions under the null hypothesis. Note that the four tests all give the same results for the contrast, since it has only one degree of freedom. In this case, the multivariate analysis matches the univariate results: there is an overall difference between the chemical composition of samples from different sites, and the samples from Llanederyn are different from the average of the other sites.

Output 47.6.8: Hypothesis SSCP Matrix and Multivariate Tests for Overall Site Effect

Romano-British Pottery

The GLM Procedure
Multivariate Analysis of Variance

H = Type III SSCP Matrix for Site
 AlFeMgCaNa
Al175.61031868-149.295533-130.8097066-5.889163736-5.372264835
Fe-149.295533134.22161582117.745035164.82178659345.3259491209
Mg-130.8097066117.74503516103.350527034.20916131874.7105458242
Ca-5.8891637364.82178659344.20916131870.20470274730.154782967
Na-5.3722648355.32594912094.71054582420.1547829670.2582456044

Characteristic Roots and Vectors of: E Inverse * H, where
H = Type III SSCP Matrix for Site
E = Error SSCP Matrix
Characteristic RootPercentCharacteristic Vector V'EV=1
AlFeMgCaNa
34.161114096.390.09562211-0.26330469-0.05305978-1.87982100-0.47071123
1.25009943.530.02651891-0.012397150.17564390-4.259297851.23727668
0.02753960.080.090822200.131598690.03508901-0.15701602-1.39364544
0.00000000.000.03673984-0.151297120.204555290.54624873-0.17402107
0.00000000.000.068623240.03056912-0.106623992.511519781.23668841

MANOVA Test Criteria and F Approximations for the Hypothesis of No Overall Site Effect
H = Type III SSCP Matrix for Site
E = Error SSCP Matrix

S=3 M=0.5 N=8
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.0123009113.091550.091<.0001
Pillai's Trace1.553936194.301560<.0001
Hotelling-Lawley Trace35.4387530240.591529.13<.0001
Roy's Greatest Root34.16111399136.64520<.0001
NOTE: F Statistic for Roy's Greatest Root is an upper bound.


Output 47.6.9: Hypothesis SSCP Matrix and Multivariate Tests for Differences between Llanederyn and the Other Sites

H = Contrast SSCP Matrix for Llanederyn vs. the rest
 AlFeMgCaNa
Al58.583366402-64.56230291-57.57983466-1.438395503-3.698102513
Fe-64.5623029171.15144132363.4563521161.58519613764.0755256878
Mg-57.5798346663.45635211656.5934933861.41375582013.6347541005
Ca-1.4383955031.58519613761.41375582010.03531687830.0907993915
Na-3.6981025134.07552568783.63475410050.09079939150.2334444577

Characteristic Roots and Vectors of: E Inverse * H, where
H = Contrast SSCP Matrix for Llanederyn vs. the rest
E = Error SSCP Matrix
Characteristic RootPercentCharacteristic Vector V'EV=1
AlFeMgCaNa
16.1251646100.00-0.088834880.254581410.087235740.981586680.71925759
0.00000000.00-0.005035380.03825743-0.176328545.16256699-0.01022754
0.00000000.000.00162771-0.08885364-0.01774069-0.830968172.17644566
0.00000000.000.04450136-0.157224940.221567910.000000000.00000000
0.00000000.000.119392060.108335490.000000000.000000000.00000000

MANOVA Test Criteria and Exact F Statistics for the Hypothesis of No Overall Llanederyn vs. the rest Effect
H = Contrast SSCP Matrix for Llanederyn vs. the rest
E = Error SSCP Matrix

S=1 M=1.5 N=8
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.0583936058.05518<.0001
Pillai's Trace0.9416064058.05518<.0001
Hotelling-Lawley Trace16.1251646258.05518<.0001
Roy's Greatest Root16.1251646258.05518<.0001