************************************************** SAS code for the rice/CO2/nitrogen experiment of Example 7.1 using REML. The experiment was a split-plot with whole-plots in an RCBD. **************************************************; proc mixed data=subplots; class block co2 nitrogen; model fertility = co2 nitrogen nitrogen*co2; random block block*co2; lsmeans co2*nitrogen; estimate 'amb vs elev CO2' co2 1 -1 /cl; estimate 'low N vs high N' nitrogen -1 1 0; estimate 'amb CO2: low vs high N' nitrogen -1 1 0 co2*nitrogen -1 1 0 0 0 0; estimate 'elev CO2: low vs high N' nitrogen -1 1 0 co2*nitrogen 0 0 0 -1 1 0; estimate 'low N: amb vs elev CO2' co2 1 -1 co2*nitrogen 1 0 0 -1 0 0; *************************************************** Proc Mixed output *************************************************** The Mixed Procedure Iteration History Iteration Evaluations -2 Res Log Like Criterion 0 1 72.59238890 1 1 71.29681578 0.00000000 Convergence criteria met. Covariance Parameter Estimates Cov Parm Estimate Block 0.3965 Block*CO2 0.0566 Residual 1.6281 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F CO2 1 3 3.06 0.1783 Nitrogen 2 12 30.80 <.0001 CO2*Nitrogen 2 12 0.74 0.4982 Estimates Std. t Label Estimate Error DF Value Pr > |t| amb vs elev CO2 -0.958 0.547 3 -1.75 0.1783 low N vs high N 4.663 0.638 12 7.31 <.0001 amb CO2: low vs high N 4.300 0.902 12 4.77 0.0005 elev CO2: low vs high N 5.025 0.902 12 5.57 0.0001 low N: amb vs elev CO2 -0.200 0.918 12 -0.22 0.8312 Least Squares Means Standard Effect CO2 Nitrogen Estimate Error CO2*Nitrogen AMB High 91.0500 0.7213 CO2*Nitrogen AMB Low 95.3500 0.7213 CO2*Nitrogen AMB Medi 94.1875 0.7213 CO2*Nitrogen FACE High 91.2500 0.7213 CO2*Nitrogen FACE Low 96.2750 0.7213 CO2*Nitrogen FACE Medi 95.9375 0.7213 ********************************************************* The rice/CO2/nitrogen example is balanced, so the generalized least squares equations do not require iteration; this is why the iteration history shows only one iteration. The "Type 3 Tests of Fixed Effects" are Wald-type F-tests and coincide with those of Table 7.8. Note that in Proc Mixed the user may specify the degrees of freedom for the standard errors of the differences between whole-plot treatment means, split-plot treatment means, and the interaction means. The degrees of freedom for standard errors of differences between whole-plot treatment levels at specific split-plot treatment levels are an approximation since no correct degrees of freedom parameter exists. In the rice/CO2/nitrogen example Satterthwaite's approximation would give df=13, which is larger than the degrees of freedom of MSE(2), so we have used the default MSE(2) degrees of freedom. **********************************************************