marginalMeans: Compute marginal means in an ANOVA design

Description Usage Arguments Value

View source: R/anova.R

Description

marginalMeans computes marginal means in ANOVA designs

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
marginalMeans(
  form,
  f_dat,
  a_dat,
  dimn,
  keep_term_order = FALSE,
  residualmean = FALSE,
  whichterm = NULL,
  no_icpt = FALSE
)

Arguments

form

formula of the model

f_dat

data.frame of factors

a_dat

matrix which contains the dependent variables. It must have as many rows as f_dat. Usually a_dat is the result of calling array2mat on the orginal data array.

dimn

the original dimension names for the array corresponding to the column names of a_dat

keep_term_order

logival variable whether to keep the order of the model terms as provided in form (TRUE) or all interaction terms should follow all main effect terms (FALSE, default)

residualmean

logical variable; if TRUE, each factor term is extracted from the data after computing the given marginal mean (default: FALSE)

whichterm

character, numeric or logical vector; indices of model terms which should be analyzed (default: NULL, meaning all terms are included)

no_icpt

logical value; if TRUE, global mean is subtracted before computing the marginal means (default: FALSE)

Value

A named list containing the marginal means for each model term


tdeenes/eegR documentation built on April 19, 2021, 4:17 p.m.