Skip to contents

Create an interaction contrast specification

Usage

interaction_contrast(A, name, where = NULL)

Arguments

A

A formula specifying the interaction contrast

name

The name of the contrast

where

An optional formula specifying the subset over which the contrast is computed.

Value

An interaction_contrast_spec object containing the specification for generating interaction contrast weights

See also

oneway_contrast for main effects, pair_contrast for pairwise comparisons

Examples

# Create an interaction contrast for factors A and B
con <- interaction_contrast(~ A * B, name = "A_by_B")

# Create an interaction contrast with a 'where' clause
con <- interaction_contrast(~ A * B, name = "A_by_B",
                          where = ~ block == 1)