makeEquation: Make mediation equations 3

View source: R/makeEquation.R

makeEquationR Documentation

Make mediation equations 3

Description

Make mediation equations 3

Usage

makeEquation(X, M, Y, add2ndMediation = TRUE, covar = list())

Arguments

X

A character vectors indicating independent variables

M

A character vectors indicating mediators

Y

A character vectors indicating dependent variables

add2ndMediation

whether or not make a secondmediation equation

covar

Optional list of covariates

Examples

X="X";M=c("M1","M2","M3");Y=c("Y1","Y2");add2ndMediation=TRUE
covar=list(name=c("C1","C2","C3"),label=c("ese","sex","tenure"),site=list(c("M1","Y1"),"Y2","Y2"))
cat(makeEquation(X,M,Y,covar=covar))

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