The MIXED Procedure

Example 79.6 Line-Source Sprinkler Irrigation

(View the complete code for this example.)

These data appear in Hanks et al. (1980); Johnson, Chaudhuri, and Kanemasu (1983); Stroup (1989b). Three cultivars (Cult) of winter wheat are randomly assigned to rectangular plots within each of three blocks (Block). The nine plots are located side by side, and a line-source sprinkler is placed through the middle. Each plot is subdivided into twelve subplots—six to the north of the line source, six to the south (Dir). The two plots closest to the line source represent the maximum irrigation level (Irrig=6), the two next-closest plots represent the next-highest level (Irrig=5), and so forth.

This example is a case where both and can be modeled. One of Stroup’s models specifies a diagonal containing the variance components for Block, Block*Dir, and Block*Irrig, and a Toeplitz with four bands. The SAS statements to fit this model and carry out some further analyses follow.

Caution: This analysis can require considerable CPU time.

data line;
   length Cult$ 8;
   input Block Cult$ @;
   row = _n_;
   do Sbplt=1 to 12;
      if Sbplt le 6 then do;
         Irrig = Sbplt;
         Dir = 'North';
      end; else do;
         Irrig = 13 - Sbplt;
         Dir = 'South';
      end;
      input Y @; output;
   end;
   datalines;
 1 Luke     2.4 2.7 5.6 7.5 7.9 7.1 6.1 7.3 7.4 6.7 3.8 1.8
 1 Nugaines 2.2 2.2 4.3 6.3 7.9 7.1 6.2 5.3 5.3 5.2 5.4 2.9
 1 Bridger  2.9 3.2 5.1 6.9 6.1 7.5 5.6 6.5 6.6 5.3 4.1 3.1
 2 Nugaines 2.4 2.2 4.0 5.8 6.1 6.2 7.0 6.4 6.7 6.4 3.7 2.2
 2 Bridger  2.6 3.1 5.7 6.4 7.7 6.8 6.3 6.2 6.6 6.5 4.2 2.7
 2 Luke     2.2 2.7 4.3 6.9 6.8 8.0 6.5 7.3 5.9 6.6 3.0 2.0
 3 Nugaines 1.8 1.9 3.7 4.9 5.4 5.1 5.7 5.0 5.6 5.1 4.2 2.2
 3 Luke     2.1 2.3 3.7 5.8 6.3 6.3 6.5 5.7 5.8 4.5 2.7 2.3
 3 Bridger  2.7 2.8 4.0 5.0 5.2 5.2 5.9 6.1 6.0 4.3 3.1 3.1
;

proc mixed;
   class Block Cult Dir Irrig;
   model Y = Cult|Dir|Irrig@2;
   random Block Block*Dir Block*Irrig;
   repeated / type=toep(4) sub=Block*Cult r;
   lsmeans Cult|Irrig;
   estimate 'Bridger vs Luke' Cult 1 -1 0;
   estimate 'Linear Irrig' Irrig -5 -3 -1 1 3 5;
   estimate 'B vs L x Linear Irrig' Cult*Irrig
            -5 -3 -1 1 3 5 5 3 1 -1 -3 -5;
run;

The preceding statements use the bar operator ( | ) and the at sign (@) to specify all two-factor interactions between Cult, Dir, and Irrig as fixed effects.

The RANDOM statement sets up the and matrices corresponding to the random effects Block, Block*Dir, and Block*Irrig.

In the REPEATED statement, the TYPE=TOEP(4) option sets up the blocks of the matrix to be Toeplitz with four bands below and including the main diagonal. The subject effect is Block*Cult, and it produces nine 1212 blocks. The R option requests that the first block of be displayed.

Least squares means (LSMEANS) are requested for Cult, Irrig, and Cult*Irrig, and a few ESTIMATE statements are specified to illustrate some linear combinations of the fixed effects.

The results from this analysis are shown in Output 79.6.1.

The "Covariance Structures" row in Output 79.6.1 reveals the two different structures assumed for and .

Output 79.6.1: Model Information in Line-Source Sprinkler Analysis

The Mixed Procedure

Model Information
Data SetWORK.LINE
Dependent VariableY
Covariance StructuresVariance Components, Toeplitz
Subject EffectBlock*Cult
Estimation MethodREML
Residual Variance MethodProfile
Fixed Effects SE MethodModel-Based
Degrees of Freedom MethodContainment


The levels of each classification variable are listed as a single string in the Values column, regardless of whether the levels are numeric or character (Output 79.6.2).

Output 79.6.2: Class Level Information

Class Level Information
ClassLevelsValues
Block31 2 3
Cult3Bridger Luke Nugaines
Dir2North South
Irrig61 2 3 4 5 6


Even though there is a SUBJECT= effect in the REPEATED statement, the analysis considers all of the data to be from one subject because there is no corresponding SUBJECT= effect in the RANDOM statement (Output 79.6.3).

Output 79.6.3: Model Dimensions and Number of Observations

Dimensions
Covariance Parameters7
Columns in X48
Columns in Z27
Subjects1
Max Obs per Subject108

Number of Observations
Number of Observations Read108
Number of Observations Used108
Number of Observations Not Used0


The Newton-Raphson algorithm converges successfully in seven iterations (Output 79.6.4).

Output 79.6.4: Iteration History and Convergence Status

Iteration History
IterationEvaluations-2 Res Log LikeCriterion
01226.25427252 
14187.99336173.
23186.625792990.10431081
31184.382182130.04807260
41183.418368530.00886548
51183.251114750.00075353
61183.238099970.00000748
71183.237977480.00000000

Convergence criteria met.


The first block of the estimated matrix has the TOEP(4) structure, and the observations that are three plots apart exhibit a negative correlation (Output 79.6.5).

Output 79.6.5: Estimated R Matrix for the First Subject

Estimated R Matrix for Block*Cult 1 Bridger
RowCol1Col2Col3Col4Col5Col6Col7Col8Col9Col10Col11Col12
10.28500.0079860.001452-0.09253        
20.0079860.28500.0079860.001452-0.09253       
30.0014520.0079860.28500.0079860.001452-0.09253      
4-0.092530.0014520.0079860.28500.0079860.001452-0.09253     
5 -0.092530.0014520.0079860.28500.0079860.001452-0.09253    
6  -0.092530.0014520.0079860.28500.0079860.001452-0.09253   
7   -0.092530.0014520.0079860.28500.0079860.001452-0.09253  
8    -0.092530.0014520.0079860.28500.0079860.001452-0.09253 
9     -0.092530.0014520.0079860.28500.0079860.001452-0.09253
10      -0.092530.0014520.0079860.28500.0079860.001452
11       -0.092530.0014520.0079860.28500.007986
12        -0.092530.0014520.0079860.2850


Output 79.6.6 lists the estimated covariance parameters from both and . The first three are the variance components making up the diagonal , and the final four make up the Toeplitz structure in the blocks of . The Residual row corresponds to the variance of the Toeplitz structure, and it represents the parameter profiled out during the optimization process.

Output 79.6.6: Estimated Covariance Parameters

Covariance Parameter Estimates
Cov ParmSubjectEstimate
Block 0.2194
Block*Dir 0.01768
Block*Irrig 0.03539
TOEP(2)Block*Cult0.007986
TOEP(3)Block*Cult0.001452
TOEP(4)Block*Cult-0.09253
Residual 0.2850


The "–2 Res Log Likelihood" value in Output 79.6.7 is the same as the final value listed in the "Iteration History" table (Output 79.6.4).

Output 79.6.7: Fit Statistics Based on the Residual Log Likelihood

Fit Statistics
-2 Res Log Likelihood183.2
AIC (Smaller is Better)197.2
AICC (Smaller is Better)198.8
BIC (Smaller is Better)190.9


Every fixed effect except for Dir and Cult*Irrig is significant at the 5% level (Output 79.6.8).

Output 79.6.8: Tests for Fixed Effects

Type 3 Tests of Fixed Effects
EffectNum DFDen DFF ValuePr > F
Cult2687.980.0008
Dir123.950.1852
Cult*Dir2683.440.0379
Irrig510102.60<.0001
Cult*Irrig10681.910.0580
Dir*Irrig5686.12<.0001


The "Estimates" table lists the results from the various linear combinations of fixed effects specified in the ESTIMATE statements (Output 79.6.9). Bridger is not significantly different from Luke, and Irrig possesses a strong linear component. This strength appears to be influencing the significance of the interaction.

Output 79.6.9: Estimates

Estimates
LabelEstimateStandard
Error
DFt ValuePr > |t|
Bridger vs Luke-0.038890.0952468-0.410.6843
Linear Irrig30.64441.44121021.26<.0001
B vs L x Linear Irrig-9.86672.740068-3.600.0006


The least squares means shown in Output 79.6.10 are useful in comparing the levels of the various fixed effects. For example, it appears that irrigation levels 5 and 6 have virtually the same effect.

Output 79.6.10: Least Squares Means for Cult, Irrig, and Their Interaction

Least Squares Means
EffectCultIrrigEstimateStandard
Error
DFt ValuePr > |t|
CultBridger 5.03060.28746817.51<.0001
CultLuke 5.06940.28746817.64<.0001
CultNugaines 4.72220.28746816.43<.0001
Irrig 12.42220.3220107.52<.0001
Irrig 23.18330.3220109.88<.0001
Irrig 35.05560.32201015.70<.0001
Irrig 46.18890.32201019.22<.0001
Irrig 56.40000.31401020.38<.0001
Irrig 66.39440.32271019.81<.0001
Cult*IrrigBridger12.85000.3679687.75<.0001
Cult*IrrigBridger23.41670.3679689.29<.0001
Cult*IrrigBridger35.15000.36796814.00<.0001
Cult*IrrigBridger46.25000.36796816.99<.0001
Cult*IrrigBridger56.30000.34636818.19<.0001
Cult*IrrigBridger66.21670.36976816.81<.0001
Cult*IrrigLuke12.13330.3679685.80<.0001
Cult*IrrigLuke22.86670.3679687.79<.0001
Cult*IrrigLuke35.23330.36796814.22<.0001
Cult*IrrigLuke46.55000.36796817.80<.0001
Cult*IrrigLuke56.88330.34636819.87<.0001
Cult*IrrigLuke66.75000.36976818.26<.0001
Cult*IrrigNugaines12.28330.3679686.21<.0001
Cult*IrrigNugaines23.26670.3679688.88<.0001
Cult*IrrigNugaines34.78330.36796813.00<.0001
Cult*IrrigNugaines45.76670.36796815.67<.0001
Cult*IrrigNugaines56.01670.34636817.37<.0001
Cult*IrrigNugaines66.21670.36976816.81<.0001


An interesting exercise is to fit other variance-covariance models to these data and to compare them to this one by using likelihood ratio tests, Akaike’s information criterion, or Schwarz’s Bayesian information criterion. In particular, some spatial models are worth investigating (Marx and Thompson 1987; Zimmerman and Harville 1991). The following is one example of spatial model statements:

proc mixed;
   class Block Cult Dir Irrig;
   model Y = Cult|Dir|Irrig@2;
   repeated / type=sp(pow)(Row Sbplt) sub=intercept;
run;

The TYPE=SP(POW)(Row Sbplt) option in the REPEATED statement requests the spatial power structure, with the two defining coordinate variables being Row and Sbplt. The SUBJECT=INTERCEPT option indicates that the entire data set is to be considered as one subject, thereby modeling as a dense 108108 covariance matrix. See Wolfinger (1993) for further discussion of this example and additional analyses.

Last updated: February 13, 2019