conceptDiagram2: Make concept Diagram

View source: R/conceptDiagram.R

conceptDiagram2R Documentation

Make concept Diagram

Description

Make concept Diagram

Usage

conceptDiagram2(
  X = "X",
  M = "M",
  Y = "Y",
  latent = rep(FALSE, 3),
  xb = FALSE,
  mc = FALSE,
  radx = 0.06,
  rady = 0.06,
  xmargin = 0.03,
  yinterval = NULL,
  moderator = list(),
  labels = list(),
  covar = list()
)

Arguments

X

character Name of independent variable

M

character Name of mediator variable

Y

character Name of dependent variable

latent

Logical. whether or not X,Y and Z are latent variables or not

xb

Logical. if positive draw linew between X and (Y+Z)

mc

Logical. if positive draw linew between M and (X+Y)

radx

horizontal radius of the box.

rady

vertical radius of the box.

xmargin

horizontal margin of plot

yinterval

vertical interval bewteen box

moderator

optional list of moderators

labels

optionallabels of X,Y and Z variables

covar

covariate optional list of covariates

Examples

labels=list(X="Time Spent in\n Grad School", M="# of\n Publications", Y="# of Job Offers")
conceptDiagram2(xb=TRUE,labels=labels)
moderator=list(name="Z1",label="Time Spent\n with Alex",pos=3,
    site=list(c("a","b","c")),latent=FALSE)
conceptDiagram2(moderator=moderator,labels=labels)
moderator=list(name=c("Z1","Z2"),label=c("Time Spent\n with Alex","Z2label"),pos=c(3,3),
    site=list(c("a","b","c"),c("b","c")),latent=c(FALSE,FALSE))
conceptDiagram2(moderator=moderator,labels=labels,yinterval=0.4)
covar=list(name=c("C1","C2"),label=c("sex","tenure"),site=list(c("M","Y"),c("Y")))
conceptDiagram2(M=NULL,moderator=list(name="M",pos=4,site=list("c"),latent=FALSE),covar=covar)
conceptDiagram2(covar=covar)

cardiomoon/semMediation documentation built on Nov. 16, 2023, 4:26 a.m.