Contrasts function for factors in the
For internal use by earth.
contr.earth.response(x, base, contrasts)
Returns a diagonal matrix.
An example for a 3 level factor with levels
A B C A 1 0 0 B 0 1 0 C 0 0 1
Earth uses this function internally.
You shouldn't need it.
It is made publicly available only because it seems that is necessary