Consistent Contrast Coding for Factors
Convert to unordered factor
Use backward difference coding
Use cumulative split coding
Decompose contrasts into new columns
Extract parameters from dots
Get columns where
Convert non factors to factors
Drop missing levels
Expand contrast formulas
Get dimnames of contrasts from factor
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 if one level factor
Get a list of contrast matrices
Find column with same non-positive values
Use forward difference coding
Get quick summary of contrasts in dataframe
Use helmert coding
Interpret intercept from contrasts
Check for intercept centering
Check for orthogonality
Check for unordered factor
Use orthogonal polynomial coding
Print contrasts
Use raw polynomial coding
Use reverse helmert coding
Use scaled sum coding
Set contrasts to factor columns in dataframe
Use sum coding
Use treatment coding
AsIs method for use_contrasts
Default method for use_contrasts
Function method for use_contrasts
hypr method for use_contrasts
Matrix method for use_contrasts
Symbol method for use_contrasts
Use contrast specification for given factor
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