Compares the mean of level k to level k-1. Differs in direction from forward_difference_code , so be careful to pick the right function. See also contr.sdif .
backward_difference_code(n)
Arguments
n: Integer umber of factor levels to compute contrasts for.
Returns
A contrast matrix with dimensions n rows and (n-1) columns.
Details
Example interpretation for a 4 level factor:
Intercept = Grand mean (mean of the means of each level)