Skip to contents

Construct a sum-to-zero contrast between two logical expressions.

Usage

pair_contrast(A, B, name, where = NULL)

Arguments

A

A formula representing the first logical expression in the contrast.

B

A formula representing the second logical expression in the contrast.

name

A character string specifying the name of the contrast (mandatory).

where

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

Value

A pair_contrast_spec object containing the sum-to-zero contrast between the two logical expressions.

Examples

# A hypothetical experiment with a factor 'category' that takes on values of 'face' and 'scene'
pair_contrast(~ category == "face", ~ category == "scene", name="face_scene")
#> contrast: face_scene 
#>  A:  ~category == "face" 
#>  B:  ~category == "scene"