ancova_single: Implements an Analysis of Covariance (ANCOVA)

View source: R/ancova.R

ancova_singleR Documentation

Implements an Analysis of Covariance (ANCOVA)

Description

Performance analysis of covariance. See ancova() for full details.

Usage

ancova_single(
  data,
  outcome,
  group,
  covariates,
  weights = c("proportional", "equal")
)

Arguments

data

The data.frame containing all of the data required for the model.

outcome

Character, the name of the outcome variable in data.

group

Character, the name of the group variable in data.

covariates

Character vector containing the name of any additional covariates to be included in the model as well as any interaction terms.

weights

Character, specifies whether to use "proportional" or "equal" weighting for each categorical covariate combination when calculating the lsmeans.

Details

  • group must be a factor variable with only 2 levels.

  • outcome must be a continuous numeric variable.

See Also

ancova()

Examples

## Not run: 
iris2 <- iris[ iris$Species %in% c("versicolor", "virginica"), ]
iris2$Species <- factor(iris2$Species)
ancova_single(iris2, "Sepal.Length", "Species", c("Petal.Length * Petal.Width"))

## End(Not run)

rbmi documentation built on Nov. 24, 2023, 5:11 p.m.