statisticalDiagram: Draw statistical diagram

View source: R/statisticalDiagram.R

statisticalDiagramR Documentation

Draw statistical diagram

Description

Draw statistical diagram

Usage

statisticalDiagram(
  no = 1,
  radx = 0.1,
  rady = 0.04,
  xmargin = 0.01,
  arrowlabel = TRUE,
  labels = list(),
  whatLabel = "name",
  fit = NULL,
  estimateTable = NULL,
  covar = list(),
  includeLatentVars = FALSE
)

Arguments

no

process macro model number

radx

horizontal radius of the box.

rady

vertical radius of the box.

xmargin

horizontal margin of plot

arrowlabel

logical whether or not draw arrowlabel

labels

A character list

whatLabel

What should the edge labels indicate in the path diagram? Choices are c("est","std","name")

fit

An object of class lavaan. Result of lavaan::sem()

estimateTable

A data.frame

covar

Optional list of covariates

includeLatentVars

A logical

Examples

statisticalDiagram(no=1)
covar=list(name=c("posemot","ideology","sex"),site=list(c("Y"),c("Y"),c("Y")))
statisticalDiagram(no=1,covar=covar)
covar=list(name=c("posemot","ideology","sex"),site=list(c("Mi","Y"),c("Mi","Y"),c("Mi","Y")))
statisticalDiagram(no=4,covar=covar)
statisticalDiagram(no=8,covar=covar)
#statisticalDiagram(no=1.1,fit=fit)
#labels=list(X="knowledge",Mi="empathy",Y="intervention")
#statisticalDiagram(no=4,fit=fit,includeLatentVars=TRUE,labels=labels,whatLabel="est",radx=0.06)
#statisticalDiagram(no=4,fit=fit,labels=list(X="knowledge",Mi="empathy",Y="intervention"))
#statisticalDiagram(no=4,fit=fit)

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