How Models Partition Variation

As a demonstration of how models partition variation, I'm going to construct a model and compare the variation in the response variable to the variations in the fitted values and residuals.

cps = fetchData("CPS85")
## Data CPS85 found in package.
mod = mm(wage ~ sector + sex, data = cps)

First, note that the variance of the resonse variable is

var(wage, data = cps)
## [1] 26.41

Compare this to the sum of the var