Calculate least squares means when you have only one covariate

To calculate least squares means when you have a single covariate do the following:

  1. Open PaintHardness.MWX.
  2. Choose Stat > ANOVA > General Linear Model > Fit General Linear Model.
  3. In Responses, enter Hardness.
  4. In Factors, enter Paint and Operator.
  5. In Covariates, enter Temp.
  6. Click Options, and beside Means select Main effects.
  7. Click OK in each dialog box.

    You should obtain the following results:

    Method

    Factor coding(-1, 0, +1)

    Factor Information

    FactorTypeLevelsValues
    PaintFixed4Blend 1, Blend 2, Blend 3, Blend 4
    OperatorFixed31, 2, 3

    Analysis of Variance

    SourceDFAdj SSAdj MSF-ValueP-Value
      Operator2209.961104.98017.540.000
      Paint3232.76077.58712.970.000
      Temp17.6087.6081.270.275
    Error17101.7315.984   
    Total23593.766     

    Model Summary

    SR-sqR-sq(adj)R-sq(pred)
    2.4462582.87%76.82%65.65%

    Coefficients

    TermCoefSE CoefT-ValueP-ValueVIF
    Constant-18.428.3-0.650.525 
    Operator         
      14.1060.8344.920.0001.93
      2-4.1810.772-5.420.0001.66
    Paint         
      Blend 11.2560.9341.340.1971.75
      Blend 2-5.4390.918-5.920.0001.69
      Blend 30.6930.9000.770.4521.63
    Temp1.0660.9451.130.2751.35

    Regression Equation

    PaintOperator
    Blend 11Hardness=-13.0 + 1.066 Temp
             
    Blend 12Hardness=-21.3 + 1.066 Temp
             
    Blend 13Hardness=-17.0 + 1.066 Temp
             
    Blend 21Hardness=-19.7 + 1.066 Temp
             
    Blend 22Hardness=-28.0 + 1.066 Temp
             
    Blend 23Hardness=-23.7 + 1.066 Temp
             
    Blend 31Hardness=-13.6 + 1.066 Temp
             
    Blend 32Hardness=-21.8 + 1.066 Temp
             
    Blend 33Hardness=-17.6 + 1.066 Temp
             
    Blend 41Hardness=-10.8 + 1.066 Temp
             
    Blend 42Hardness=-19.0 + 1.066 Temp
             
    Blend 43Hardness=-14.8 + 1.066 Temp

    Fits and Diagnostics for Unusual Observations

    ObsHardnessFitResidStd Resid
    186.5010.77-4.27-2.04R
    R  Large residual

    Means

    TermFitted MeanSE Mean
    Paint   
      Blend 114.831.09
      Blend 28.141.03
      Blend 314.271.02
      Blend 417.071.04
    Operator   
      117.681.02
      29.3970.958
      313.6530.844

    Means for Covariates

    CovariateData MeanStDev
    Temp29.9630.626

  8. Next, calculate the fitted values.
    1. Choose Stat > ANOVA > General Linear Model > Predict.
    2. Deselect Include covariates in prediction.
    3. Select Enter columns of values.
    4. In the table, enter Paint in Paint and Operator in Operator. Click OK.
  9. Calculate the mean of the fitted values across both factors.
    1. Choose Stat > Basic Statistics > Store Descriptive Statistics.
    2. In Variables, enter PFITS1.
    3. In By variables (optional), enter Paint Operator. Click OK.
  10. Last, calculate the means of the means for each factor separately.
    1. Choose Stat > Basic Statistics > Store Descriptive Statistics.
    2. In Variables, enter Mean1.
    3. In By variables (optional), enter ByVar1. Click OK.
      The least squares means for the different blends of paint are in the worksheet.
      • Blend 1: 14.83
      • Blend 2: 8.14
      • Blend 3: 14.27
      • Blend 4: 17.07
    4. Choose Stat > Basic Statistics > Store Descriptive Statistics.
    5. In By variables (optional), enter ByVar2. Click OK.
      The least squares means for the different operators are in the worksheet.
      • Operator 1: 17.68
      • Operator 2: 9.40
      • Operator 3: 13.65