addCovarEquation: Add covariates to equation

View source: R/makeEquation.R

addCovarEquationR Documentation

Add covariates to equation

Description

Add covariates to equation

Usage

addCovarEquation(
  equation,
  covar = list(),
  prefix = "f",
  grouplabels = NULL,
  multipleMediator = FALSE
)

Arguments

equation

The equation

covar

A list

prefix

prefix

grouplabels

A list

multipleMediator

logical

Examples

equation="M ~ X*W\nY ~ a1*M + C1*X"
covar=list(name=c("C1","C2","C3"),label=c("ese","sex","tenure"),site=list(c("M","Y"),"Y","Y"))
grouplabels=list(C1="e")
addCovarEquation(equation,covar=covar)
equation="M1 ~ a11*X\nM2 ~ a12*M"
covar=list(name=c("C1","C2","C3"),label=c("ese","sex","tenure"),site=list(c("M1","Y"),"M2","M2"))
addCovarEquation(equation,covar=covar,multipleMediator=TRUE)
addCovarEquation(equation,covar=covar)

processR documentation built on Jan. 23, 2023, 5:44 p.m.