Content Disclaimer
Copyright @2020.
All Rights Reserved.
StatsToDo : General Linear Model EXplained: Analysis of Variance
Analysis of Covariance and Multiple Regression

Links : Home Index (Subjects) Contact StatsToDo

Related Links:
R Explained Page

Introduction Example R Code Example Explained
This page provides explanations and example R codes for the General Linear Model.

The two terms General Linear Model and Generalized Linear Models have different meanings. General Linear model is an extension of the least square analysis where the dependent variable is Guassian (parametric, normally distributed measurements). Generalized Linear Models is an extension and adaptation of the General Linear Model to include dependent variables that are non-parametric, and includes Binomial Logistic Regression, Multinomial Regression, Ordinal Regression, and Poisson Regression. In this page, the abbreviation GLM refers to the General Linear Model for Gaussian dependent variables

GLM (lm in R) differs from Analysis of Vairance (aov in R) only in the method of calculation. The results obtained are the same except for very minor rounding differences. Analysis of variance uses formulae based on estimation of variances, while GLM uses maximum Likelihood approximations.

The aov procedure produces a table of analysis of variance, where each variable is tested for statistical significance. The lm procedure produces coefficients used to estimate the value of the dependent varible using the values of the independent variables.

The advantage of using the aov and lm procedures in R are flexibility

  • If all the independent variables are binary, ordinal, or parametric measurements, the model become that of multiple regression
  • If all the variables are factors (group names), then the model becomes the factorial analysis of variance
  • If the independent variables are a mixture of measurements and factors, then the model is that of analysis of covariance

References An R Companion for the Handbook of Biological Statistics by Salvatore S. Mangiafico. Chapter on analysis of covariance