Learn R Programming

modelbased (version 0.6.0)

estimate_contrasts: Estimate contrasts between factor levels

Description

Contrast analysis. See the documentation for your object's class:

Usage

estimate_contrasts(
  model,
  levels = NULL,
  fixed = NULL,
  modulate = NULL,
  transform = "none",
  length = 10,
  standardize = TRUE,
  standardize_robust = FALSE,
  ...
)

Arguments

model

A statistical model.

levels

A character vector or formula specifying the names of the predictors over which to estimate means or contrasts.

fixed

A character vector indicating the names of the predictors to be "fixed" (i.e., maintained), so that the estimation is made at these values.

modulate

A character vector indicating the names of a numeric variable along which the means or the contrasts will be estimated. Adjust its length using length.

transform

Can be "none" (default for contrasts), "response" (default for means), "mu", "unlink", "log". "none" will leave the values on scale of the linear predictors. "response" will transform them on scale of the response variable. Thus for a logistic model, "none" will give estimations expressed in log-odds (probabilities on logit scale) and "response" in terms of probabilities.

length

Length of the spread numeric variables.

standardize

If TRUE, adds standardized differences or coefficients.

standardize_robust

Robust standardization through MAD (Median Absolute Deviation, a robust estimate of SD) instead of regular SD.

...

Arguments passed to or from other methods.

Value

A data frame of estimated contrasts.