makeCatEquation2: Make equation for sem and lm for multiple X or multiple Y

View source: R/makeCatEquation.R

makeCatEquation2R Documentation

Make equation for sem and lm for multiple X or multiple Y

Description

Make equation for sem and lm for multiple X or multiple Y

Usage

makeCatEquation2(
  X = NULL,
  Y = NULL,
  W = NULL,
  labels = list(),
  vars = list(),
  prefix = "b",
  mode = 0,
  pos = list(),
  serial = FALSE,
  depy = FALSE,
  depx = FALSE
)

Arguments

X

Names of independent variable

Y

Names of dependent variable

W

Names of moderators

labels

optional list

vars

optional list

prefix

a character

mode

A numeric

pos

Numeric moderator position

serial

logical If TRUE, serial variables are added

depy

logical

depx

logical

Examples

makeCatEquation2(X="wt",Y="mpg")
makeCatEquation2(X="wt",Y="mpg",W="cyl")
makeCatEquation2(X="wt",Y=c("cyl","am"),prefix="a")
makeCatEquation2(X="wt",Y=c("hp","vs"),W="cyl",prefix="a")
makeCatEquation2(X="wt",Y=c("hp","vs"),W=c("cyl","am"),prefix="a",pos=list(1,2))
makeCatEquation2(X="wt",Y=c("hp","vs"),W=c("cyl"),prefix="a",pos=list(1))
makeCatEquation2(X="wt",Y=c("hp","vs"),W=c("cyl"),prefix="a",pos=list(c(1,2)))
makeCatEquation2(X=c("hp","vs"),Y="mpg",W=c("cyl"),prefix="b",pos=list(c(1)))
makeCatEquation2(X=c("hp","vs"),Y="mpg",W=c("cyl"),prefix="b")
makeCatEquation2(X=c("hp","vs"),Y="mpg",W=c("cyl"),prefix="b",pos=list(c(1,2)))
cat(makeCatEquation2(X="wt",Y="carb",W=c("am","hp")))
cat(makeCatEquation2(X="X",Y=c("M1","M2","M3"),W=NULL,prefix="a",serial=TRUE))
cat(makeCatEquation2(X="X",Y=c("M1","M2","M3"),W=NULL,prefix="a"))
cat(makeCatEquation2(X="X",Y=c("M1","M2"),prefix="a",mode=1,serial=TRUE))

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