sum_causal_paths: Summarize causal relationship between two variables

View source: R/mediators.R

sum_causal_pathsR Documentation

Summarize causal relationship between two variables

Description

Summarize causal relationship between two variables

Usage

sum_causal_paths(
  object,
  i,
  j,
  digits = 2,
  alpha = 0.1,
  show = TRUE,
  indirect = TRUE
)

Arguments

object

augmented output of MCMC algorithm

i, j

variables whose relationship is to be analysed

digits

how to round numbers in printed output (see details)

alpha

mass to remove from confidence interval (so defaults to 90% CI)

show

logical: should ACE be printed?

indirect

logical: if true includes indirect effects

Details

Get summary of causal connections and mediations. Prints summary and returns list of total_eff, direct_eff and indirect_eff, each being a list with entries to and from.

The output is printed as a mixture of percentages and causal effects, each of which is rounded to 2 significant figures by default. This value can be modified by using the digits argument.


rje42/DAGtools documentation built on June 6, 2024, 3:13 a.m.