Learn R Programming

sensmediation (version 0.3.1)

plot.effectsMed: Plot function for objects of class "effectsMed"

Description

Plots the estimated natural indirect or direct effects with confidence intervals over the range of the sensitivity parameter Rho.

Usage

# S3 method for effectsMed
plot(
  x,
  effect = "indirect",
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  main = NULL,
  lwd = graphics::par("lwd"),
  ...
)

Arguments

x

object of class "effectsMed"

effect

which effect to plot results for ("indirect" or "direct")

xlab

a title for the x axis, see title. Default is expression(rho).

ylab

a title for the y axis, see title. Default is NIE (NIE* if alt.decomposition = TRUE) or NDE (NDE*)

xlim

the x limits (x1, x2) of the plot, see plot.default. Default is c(min(x$Rho),max(x$Rho))

ylim

the y limits of the plot. Default is c(min(x$CI$CI.nie[,1]),max(x$CI$CI.nie[,2]))

main

a main title for the plot, see title

lwd

line widths for the lines of the plot, see par

...

additional graphical parameters to be passed to plotting functions, see par