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,
  box.col = "white",
  xlim = NULL,
  ylim = 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 line between X and (Y+Z)

mc

Logical. if positive draw line 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 between box

box.col

fill color of box

xlim

the x limits (min,max) of the plot

ylim

the y limits (min,max) of the plot

moderator

optional list of moderators

labels

optional labels 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("Y"),c("Y")))
conceptDiagram2(M=NULL,moderator=list(name="M",pos=4,site=list("c"),latent=FALSE),covar=covar)
conceptDiagram2(covar=covar)

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