pairwise_contrasts: Pairwise Contrasts

View source: R/contrast.R

pairwise_contrastsR Documentation

Pairwise Contrasts

Description

Construct pairwise contrasts for all combinations of factor levels.

Usage

pairwise_contrasts(levels, facname, where = NULL, name_prefix = "con")

Arguments

levels

A vector of factor levels to be compared.

facname

The name of the factor variable (column name in the design) these levels belong to.

where

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

name_prefix

A character string to prefix the generated contrast names (default: "con").

Value

A contrast_set object containing pairwise contrasts for all combinations of factor levels.

Examples

# Assuming 'my_factor' is a column name
pairwise_contrasts(c("A", "B", "C"), facname = "my_factor")
pairwise_contrasts(c("A", "B", "C"), facname = "my_factor", name_prefix = "pair")


bbuchsbaum/fmrireg documentation built on June 10, 2025, 8:18 p.m.