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,
  arrowslabels = NULL,
  arrowslty = NULL,
  labels = list(),
  nodeslabels = list(),
  whatLabel = "name",
  fit = NULL,
  estimatesTable = NULL,
  digits = 3,
  covar = list(),
  addCovar = TRUE,
  type = NULL,
  includeLatentVars = FALSE,
  addprime = TRUE,
  box.col = "white",
  xlim = c(0, 1),
  ylim = NULL
)

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

arrowslabels

A character vector

arrowslty

linetype of arrows

labels

A list of character string

nodeslabels

A list of character string

whatLabel

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

fit

A list of class lm or an object of class lavaan

estimatesTable

A data.frame

digits

Integer indicating the number of decimal places

covar

Optional list of covariates

addCovar

Logical. Whether or not include covariates

type

An integer

includeLatentVars

A logical

addprime

logical. Whether or not add prime to label "c"

box.col

fill color of the box

xlim

the x limits (min,max) of the plot

ylim

the y limits (min,max) of the plot

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("M","Y"),c("Mi","Y"),c("Mi","Y")))
covar=list(name=c("C1","C2"),site=list(c("M","Y"),"Y"))
statisticalDiagram(no=4,covar=covar)
statisticalDiagram(no=8,covar=covar)
labels=list(X="wintense",Mi="cogapp",Y="emotion")
nodeslabels=list(X="Work\nIntensity",Mi="Cognitive\nAppraisal",Y="Emotional\nExhaustion")
statisticalDiagram(4,labels=labels)
statisticalDiagram(4,labels=nodeslabels)
statisticalDiagram(4,labels=labels,nodeslabels=nodeslabels)
labels=list(X="GDP\nper inhabitant",M="Illiteracy Rate",Y="Mean Life\nExpectation")
statisticalDiagram(4,labels=labels)
statisticalDiagram(4,labels=labels,arrowslabels=c("e","f","g"),whatLabel="label")

cardiomoon/processR documentation built on April 20, 2023, 3:38 a.m.