plot.mm: plot.mm

View source: R/plot.mm.R

plot.mmR Documentation

plot.mm

Description

"plot.mm" is used to display the results of the mediation analyzes done with "multimediate".

Usage

## S3 method for class 'mm'
plot(
  x,
  treatment = NULL,
  logit = "logOR",
  labels = NULL,
  effect.type = c("indirect", "direct", "total"),
  xlim = NULL,
  ylim = NULL,
  xlab = "",
  ylab = "",
  main = "Estimates and confidence intervals",
  is.legend = TRUE,
  lwd = 1.5,
  cex = 0.85,
  col = "black",
  ...
)

Arguments

x

element of the class "mm".

treatment

a character string indicating the baseline treatment value of the estimated causal mediation effect and direct effect to plot. Can be either "control", "treated", "average" or "three". If "NULL"(default), three sets of estimates are plotted.

logit

a character string indicating, when the outcome is binary, the scale of the average causal effects. "effects" for average causal effects, " OR" average causal effects on OR scale, "logOR" average causal effects on logOR scale.

labels

a vector of character strings indicating the labels for estimated effects. The default labels wiil be used if NULL.

effect.type

a vector indicating which quantities of interest to plot. Default is to plot all three quantities (indirects, direct and total effects).

xlim

range of the horizontal axis.

ylim

range of the vertical axis.

xlab

label of the horizontal axis.

ylab

label of the vertical axis.

main

main title.

is.legend

a logical value indicating the presence of the legend on top right. If the legend obscures some results, is.legend can be switched to "FALSE" or the x-axis can be changed manually with the parameters xlim.

lwd

width of the horizontal bars for confidence intervals.

cex

size of the dots for point estimates.

col

color of the dots and horizontal bars for the estimates.

...

additional parameters passed to 'plot'.

Value

plot summarizing the causal analysis


AllanJe/multimediate documentation built on July 25, 2024, 12:14 p.m.