slope.contrast: Contrast coefficients for the slope of a quantitative factor

View source: R/statpsych2.R

slope.contrastR Documentation

Contrast coefficients for the slope of a quantitative factor

Description

Computes the contrast coefficients that are needed to estimate the slope of a line in a one-factor design with a quantitative factor.

For more details, see Section 1.11 of Bonett (2021, Volume 2)

Usage

slope.contrast(x)

Arguments

x

vector of numeric factor levels

Value

Returns the vector of contrast coefficients

References

\insertRef

Bonett2021statpsych

Examples

x <- c(25, 50, 75, 100)
slope.contrast(x)

# Should return:
#      Coefficient
# [1,]      -0.012
# [2,]      -0.004
# [3,]       0.004
# [4,]       0.012
 


statpsych documentation built on Jan. 13, 2026, 1:07 a.m.