ancova_core: Core ANCOVA Implementation

View source: R/ancova.R

ancova_coreR Documentation

Core ANCOVA Implementation

Description

Internal function that provides the common functionality for the (multi-arm) ANCOVA analysis. This function handles input validation, visit processing, delegates the actual single-visit analysis to ancova_single(), and assembles the per-parameter metadata.

Usage

ancova_core(
  data,
  vars,
  visits = NULL,
  weights = c("counterfactual", "equal", "proportional_em", "proportional")
)

Arguments

data

A data.frame containing the data to be used in the model.

vars

A vars object as generated by set_vars(). Only the group, visit, outcome and covariates elements are required. See details.

visits

An optional character vector specifying which visits to fit the ANCOVA model at. If NULL, a separate ANCOVA model will be fit to the outcomes for each visit (as determined by unique(data[[vars$visit]])). See details.

weights

Character, either "counterfactual" (default), "equal", "proportional_em" or "proportional". Specifies the weighting strategy to be used when calculating the lsmeans. See the weighting section for more details.


rbmi documentation built on Oct. 15, 2026, 9:06 a.m.