Skip to content

R6causal

R6 Class for Structural Causal Models

v0.8.3 · Mar 14, 2024 · AGPL-3

Description

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.

Downloads

294

Last 30 days

13896th

883

Last 90 days

3.6K

Last year

Trend: -3.6% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 ERROR
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (1 non-OK)
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'using_R6causal.Rmd' using rmarkdown
! Package pdftex.def Error: File `3e34015c146dfdb256070bb6c95db05ae0b5dc6c.pdf'
 not found: using draft setting.

Error: processing vignette 'using_R6causal.Rmd' failed with diagnostics:
LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/R6causal.Rcheck/vign_test/R6causal/vignettes/using_R6causal.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See using_R6causal.log for more info.
--- failed re-building 'using_R6causal.Rmd'

SUMMARY: processing the following file failed:
  'using_R6causal.Rmd'

Error: Vignette re-building failed.
Execution halted

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'using_R6causal.Rmd' using rmarkdown
! Package pdftex.def Error: File `3e34015c146dfdb256070bb6c95db05ae0b5dc6c.pdf'
 not found: using draft setting.

Error: processing vignette 'using_R6causal.Rmd' 
...[truncated]...
rg/tinytex/r/#debugging for debugging tips. See using_R6causal.log for more info.
--- failed re-building 'using_R6causal.Rmd'

SUMMARY: processing the following file failed:
  'using_R6causal.Rmd'

Error: Vignette re-building failed.
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies causaleffect cfid data.table dosearch glue igraph R6 MASS R6causal

Version History

new 0.8.3 Mar 10, 2026
updated 0.8.3 ← 0.8.2 diff Mar 13, 2024
updated 0.8.2 ← 0.8.1 diff Dec 18, 2023
updated 0.8.1 ← 0.8.0 diff Nov 17, 2023
updated 0.8.0 ← 0.7.0 diff Jun 11, 2023
updated 0.7.0 ← 0.6.1 diff Nov 3, 2022
updated 0.6.1 ← 0.6.0 diff Aug 5, 2022
new 0.6.0 Aug 5, 2021