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

View source: R/plot.mbias.R

plot.mbiasR Documentation

Plot DAGs before and after conditioning on collider (M bias)

Description

Create two Directed Acyclic Graphs (DAGs), before and after conditioning on the collider M, for selection bias caused by M bias, using 'ggdag'.

Usage

## S3 method for class 'mbias'
plot(x, type = c("before", "after"), dec = 2, ...)

Arguments

x

'mbias' object to plot.

type

DAG before or after conditioning on M.

dec

Number of digits displayed.

...

Other unused arguments.

Value

A DAG for selection bias caused by M bias.

See Also

mbias

Examples

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


episensr documentation built on Aug. 30, 2023, 5:09 p.m.