R6 Class for Structural Causal Models
Overview
The implemented R6 class 'SCM' aims to simplify working with structural causal models. The missing data mechanism can be defined as a part of the structural model. The class contains methods for 1) defining a structural causal model via functions, text or conditional probability tables, 2) printing basic information on the model, 3) plotting the graph for the model using packages 'igraph' or 'qgraph', 4) simulating data from the model, 5) applying an intervention, 6) checking the identifiability of a query using the R packages 'causaleffect' and 'dosearch', 7) defining the missing data mechanism, 8) simulating incomplete data from the model according to the specified missing data mechanism and 9) checking the identifiability in a missing data problem using the R package 'dosearch'. In addition, there are functions for running experiments and doing counterfactual inference using simulation.
- Changed the parameters of functions
counterfactualandfairness. Now the method to simulate counterfactuals must be always specified by the user andcondition_typeis required if the method is "u_find".
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
Show 2 earlier changesHide 2 earlier changes
- ERROR13 OK, 1 ERROR2026-03-30
- OK14 OK2026-03-10
Documentation
- Help pages
- 16 (1 internal)includes a package overview page
- Examples that run
- 100%12 run in a plain check
- Exported functions with examples
- 86%
- Documented parameters
- 100%
- Return-value docs
- 29%
- Help pages citing references
- 13%
- using_R6causal PDF
Downloads
Dependencies
Installing R6causal adds 15 packages (9 with compiled code, 17 MB of source tarballs). Heaviest: data.table 5.7 MB, igraph 4.8 MB, Rcpp 1.8 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.8.3Latest
- 0.8.22023-12-19 · diff ↗
- 0.8.12023-11-18 · diff ↗
- 0.8.02023-06-12 · diff ↗ ·
added 5 exports
LinearGaussianSCM, analytic_linear_gaussian, analytic_linear_gaussian_conditining, credit, fairness - RR 4.3.0 released · 2023-04-21
- 0.7.0
- 0.6.12022-08-06 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.6.02021-08-06
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2021-08-06
- Total releases
- 7 / 5 yrs
- License
- AGPL-3 OSI
- Download size
- 296 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("R6causal")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.