What is a general linear model?

Use General Linear Model to determine whether the means of two or more groups differ. You can include random factors, covariates, or a mix of crossed and nested factors. You can also use stepwise regression to help determine the model. You can then use the model to predict values for new observations, identify the combination of predictor values that jointly optimize one or more fitted values, and create surface plots, contour plots, and factorial plots.


For a model with random factors, you usually use Fit Mixed Effects Model so that you can use the Restricted Maximum Likelihood estimation method (REML).

GLM is an ANOVA procedure in which the calculations are performed using a least squares regression approach to describe the statistical relationship between one or more predictors and a continuous response variable. Predictors can be factors and covariates. GLM codes factor levels as indicator variables using a 1, 0, - 1 coding scheme, although you can choose to change this to a binary coding scheme (0, 1). Factors may be crossed or nested, fixed or random. Covariates may be crossed with each other or with factors, or nested within factors. The design may be balanced or unbalanced. GLM can perform multiple comparisons between factor level means to find significant differences.

Example of a general linear model

Suppose you are studying the affect of an additive (factor with three levels) and temperature (covariate) on the coating thickness of your product. You collect your data and fit a general linear model. The following output is a portion of the results from Minitab:

Factor Information Factor Type Levels Values Additive fixed 3 1, 2, 3
Analysis of Variance Source F P Temperature 719.21 0.000 Additive 56.65 0.000 Additive*Temperature 69.94 0.000
Model Summary S R-Sq R-Sq(adj) R-sq(pred) 19.1185 99.73% 99.61% 99.39%
Coefficients Term Coef T P Constant -4968 -25.97 0.000 Temperature 83.87 26.82 0.000 Additive*Temperature -0.2852 -22.83 0.000 Additive 1 -24.40 -5.52 0.000 2 -27.87 -6.30 0.000

Because the p-values are less than any reasonable alpha level, evidence exists that your two predictors and their interaction have a significant affect on strength. In addition, your model explains 99.73% of the variance. The coefficient for the covariate, temperature, indicates that the mean strength increases by 83.87 units per one degree increase in temperature when all other predictors are held constant. For the additive factor, the mean for level 1 is 24.40 units below the overall mean while level 2 is 27.87 units below the overall mean. Level 3 is the baseline value so it is not displayed. You can calculate the baseline factor level mean by adding all the level coefficients for a factor (excluding the intercept) and multiplying by - 1. In this case, it is 52.27 ((-24.40-27.87) * -1) units above the overall mean.