slope.contrast {statpsych} | R Documentation |
Computes the contrast coefficients to estimate the slope of a line in a single factor design with a quantitative factor.
slope.contrast(x)
x |
vector of numeric factor levels |
Returns the vector of contrast coefficients
x <- c(25, 50, 75, 100) slope.contrast(x) # Should return: # Coefficient # [1,] -0.012 # [2,] -0.004 # [3,] 0.004 # [4,] 0.012