Create a one-way contrast specification
Usage
oneway_contrast(A, name, where = NULL)
Arguments
- A
A formula specifying the contrast
- name
The name of the contrast
- where
An optional formula specifying the subset over which the contrast is computed.
Value
A oneway_contrast_spec object that can be used to generate contrast weights
Examples
# Create a one-way contrast for a factor 'basis'
con <- oneway_contrast(~ basis, name = "Main_basis")
# Create a one-way contrast with a 'where' clause
con <- oneway_contrast(~ basis, name = "Main_basis",
where = ~ block == 1)