Projections of Models

If you want to see how the different factor levels contribute their additive effects to each of the observed values of the response, then use the proj function like this:

library(help="multcomp")
                 (Intercept)        Water     Detergent      Daphnia    Water:Detergent

Water:Daphnia
1                   3.851905   -0.1660431    0.03292724   -1.0120302        -0.05698158
0.1941404
2                   3.851905   -0.1660431    0.03292724   -1.0120302        -0.05698158
0.1941404
3                   3.851905   -0.1660431    0.03292724   -1.0120302        -0.05698158

0.1941404
...

The name proj comes from the fact that the function returns a matrix or list of matrices giving the ‘projections of the data onto the terms of a linear model’.

Get The R Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.