mediationPlot: Make a data.frame for mediationPlot

View source: R/mediationPlot.R

mediationPlotR Documentation

Make a data.frame for mediationPlot

Description

Make a data.frame for mediationPlot

Usage

mediationPlot(
  fit,
  maxx = 80,
  maxy = 30,
  height = 5,
  width = 5,
  whatLabels = "std",
  useLabel = FALSE,
  usecolor = TRUE,
  clean = TRUE,
  base_size = 5,
  base_family = "NanumGothic",
  mediationOnly = FALSE,
  residuals = FALSE,
  regression = TRUE,
  indirect = FALSE,
  secondIndirect = FALSE,
  total = FALSE,
  mode = 1
)

Arguments

fit

A data.frame. Result of parameterEstimates function of package lavaan

maxx

An integer indicating maximum x position

maxy

An integer indicating maximum y position

height

A number indicating height of the rectangle

width

A number indicating width of the rectangle

whatLabels

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

useLabel

Whether use geom_label instead of geom_text. Default value is FALSE.

usecolor

Whether use colors for variables. Default value is TRUE.

clean

Whether use theme_clean. Default value is TRUE.

base_size

An integer indicating the font size.

base_family

A character indicating base font family

mediationOnly

Whether or not draw mediation effect only. Default value is FALSE.

residuals

Whether or not draw residuals(and variance). Default value is TRUE.

regression

Whether or not draw regression. Default value is TRUE.

indirect

Whether or not draw indirect effects. Default value is FALSE.

secondIndirect

Whether or not draw 2nd indirect effects. Default value is FALSE.

total

Whether or not draw total effect. Default value is FALSE.

mode

plot mode. 1 or 2.


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