against_ref(levels, ref = levels[1], x = tail(levels, -1))
custom_contrast(levels, x, y)
Value
Vector of contrasts, or matrix of jacobians.
A list of contrast object with following elements:
Index of the treatment group.
Index of the reference group.
Additional attributes include levels and max_levels indicating the
names of the treatment levels and the maximum number of levels.
Arguments
x
(vector) A vector of treatment levels.
y
(vector) A vector of treatment levels.
f
(function) Function with argument x and y to compute treatment effect.