Consistent Contrast Coding for Factors
Convert to unordered factor
Backward difference code
Cumulative split contrasts
Decompose contrasts into new columns
Lookup namespace of contrast scheme function
Extract parameters from dots
Get columns where
Convert non factors to factors
Expand contrast formulas
Get dimnames of contrasts from factor
Retrieve value from param list
Get reference level of contrast matrix
Get reference levels from a (possibly set) list of contrasts
Check for reserved operators
Get contrast scheme labels for glimpse table
Glimpse default factors
Check if a scheme is a polynomial scheme
Check if node is a contrast-manipulation operator
Check if valid contrast
Make parameters for contrast code call
Make glimpse for 1-level factors
Alert user when factor coercion happens
Alert user when setting ordered factors
Alert user if there are more factors
Handle +
in formula LHS
Postprocess contrast matrices
Process code_by
Pass arguments to contrast code
Process factor column
Reset comparison labels of matrix to defaults
Set intercept for contrast matrix
Process and set parameter
Split contrast function using parens
Check if reference switching is necessary
Switch reference level in contrast matrix
Diagnose glimpse issues and send warnings
Warn user if nondefault contrasts are set
Warn if one level factor
List of contrast matrices
Find column with same non-positive values
Forward difference code
Glimpse contrasts in dataframe
Helmert code
Interpret intercept from contrasts
Check for orthogonality
Check for orthogonality
Check for unordered factor
Orthogonal Polynomial code
Raw Polynomial code
Reverse Helmert code
Scaled sum coding
Set contrasts to dataframe
Sum code
Treatment code
AsIs method for use_contrasts
Default method for use_contrasts
Function method for use_contrasts
Use a hypr object for contrasts
Matrix method for use_contrasts
Symbol method for use_contrasts
Contrast code factors
Quickly set and summarize contrasts for factors prior to regression analyses. Intended comparisons, baseline conditions, and intercepts can be explicitly set and documented without the user needing to directly manipulate matrices. Reviews and introductions for contrast coding are available in Brehm and Alday (2022)<doi:10.1016/j.jml.2022.104334> and Schad et al. (2020)<doi:10.1016/j.jml.2019.104038>.
Useful links