Learn R Programming

episensr (version 0.7.1)

plot.mbias: Plot DAGs before and after conditioning on collider (M bias)

Description

Create two DAGs, before and after conditioning on the collider C, for selection bias caused by M bias, using ggplot2.

Usage

## S3 method for class 'mbias':
plot(x, title1 = "DAG before conditioning on C",
  title2 = "DAG after conditioning on C", title.size = 6, size = 6,
  dec = 2, layout = c("landscape", "portrait"), ...)

Arguments

x
'mbias' object to plot.
title1
Title of DAG graph before conditioning on C.
title2
Title of DAG graph after conditioning on C.
title.size
Title size.
size
Text size.
dec
Number of digits displayed.
layout
Side-by-side graphs in landscape or portrait layout.
...
Other unused arguments.

Value

  • Two DAGs for selection bias caused by M bias.

See Also

mbias

Examples

Run this code
plot(mbias(or = c(2, 5.4, 2.5, 1.5, 1),
var = c("HIV", "Circumcision", "Muslim", "Low CD4", "Participation")))

Run the code above in your browser using DataLab