one_against_all_contrast: One Against All Contrast

View source: R/contrast.R

one_against_all_contrastR Documentation

One Against All Contrast

Description

Construct contrasts comparing each factor level against the average of the other levels.

Usage

one_against_all_contrast(levels, facname, where = NULL)

Arguments

levels

A vector of factor levels to be compared.

facname

A character string specifying the name of the factor containing the supplied levels.

where

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

Value

A contrast_set object containing contrasts comparing each factor level against the average of the other levels.

Examples

fac <- factor(rep(c("A", "B", "C"), 2))
con <- one_against_all_contrast(levels(fac), "fac")


bbuchsbaum/fmrireg documentation built on May 16, 2023, 10:56 a.m.