Methods for Graphical Models and Causal Inference
Overview
Functions for causal structure learning and causal inference using graphical models. The main algorithms for causal structure learning are PC (for observational data without hidden variables), FCI and RFCI (for observational data with hidden variables), and GIES (for a mix of data from observational studies (i.e. observational data) and data from experiments involving interventions (i.e. interventional data) without hidden variables). For causal inference the IDA algorithm, the Generalized Backdoor Criterion (GBC), the Generalized Adjustment Criterion (GAC) and some related functions are implemented. Functions for incorporating background knowledge are provided.
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: pcalg/tests/test_pcSelect.R (.Dim: 4, .Dimnames: 4) '.Dim' should be changed to 'dim'. '.Dimnames' should be changed to 'dimnames'.
NOTERd contentsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Rd files without \usage: ‘amatType.Rd’ \arguments should not be documented without \usage.
- NOTE8 OK, 5 NOTENow
- NOTE9 OK, 4 NOTE2026-07-24
- ERROR9 OK, 3 NOTE, 1 ERROR2026-07-23
- NOTE12 OK, 1 NOTE2026-07-11
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-07
Show 4 earlier changesHide 4 earlier changes
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 95 (1 internal)
- Examples that run
- 100%83 run in a plain check
- Exported functions with examples
- 87%
- Documented parameters
- 86%
- Return-value docs
- 97%
- Help pages citing references
- 61%
Downloads
Dependencies
Installing pcalg adds 26 packages (15 with compiled code, 32 MB of source tarballs). Heaviest: BH 14 MB, igraph 4.8 MB, robustbase 2.2 MB. 2 more not on CRAN are not measured.
Show all 18 packagesHide all 18 packages
Code & Tests
Datasets
People & History
Show 6 more contributorsHide 6 contributors
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 2.7-12Latest
- RR 4.4.0 released · 2024-04-24
- 2.7-112024-02-12 · diff ↗
- 2.7-102024-02-06 · diff ↗
- 2.7-92023-09-26 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 2.7-82022-12-21 · diff ↗
- 2.7-72022-10-04 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.7-62022-04-04 · diff ↗
- 2.7-52022-02-22 · diff ↗
- 2.7-42021-11-25 · diff ↗
- 2.7-32021-06-01 · diff ↗
- RR 4.1.0 released · 2021-05-18
Show 60 earlier eventsHide 60 earlier events
- 2.7-22021-04-22 · diff ↗
- 2.7-12021-01-09 · diff ↗
- 2.7-0
- 2.6-122020-09-22 · diff ↗
- 2.6-112020-08-16 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.6-102020-03-03 · diff ↗
- 2.6-92020-02-11 · diff ↗
- 2.6-82019-11-21 · diff ↗
- 2.6-7
- 2.6-62019-09-16 · diff ↗
- 2.6-5
- 2.6-22019-04-26 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 2.6-0
- RR 3.5.0 released · 2018-04-23
- 2.5-02017-07-12 · diff ↗ ·
added 6 exports
possDe, possAn, pcalg2dagitty, addBgKnowledge, adjustment, isValidGraph - RR 3.4.0 released · 2017-04-21
- 2.4-52017-02-22 · diff ↗
- 2.4-32016-09-28 · diff ↗
- 2.4-2
- RR 3.3.0 released · 2016-05-03
- 2.2-42015-07-23 · diff ↗
- 2.2-32015-07-12 · diff ↗
- 2.2-2
- 2.2-0
- RR 3.2.0 released · 2015-04-16
- 2.0-10
- 2.0-32014-07-01 · diff ↗
- RR 3.1.0 released · 2014-04-10
- 2.0-22014-03-19 · diff ↗
- 2.0-12014-03-07 · diff ↗ ·
removed 15 exports
make.edge.df, orderEdges, labelEdges, find.sink, adj.check, ci.test, lm.cov, check.new.coll, reach, discr.path, ucp, upd, find.upd, legal.psep, faith.checkadded 22 exports
getGraph, dreach, legal.path, find.unsh.triple, udag2apag, dag2pag, iplotPC, showEdgeList, showAmat, visibleEdge, possibleDe, pag2magAM, backdoor, r.gauss.pardag, rmvnorm.ivent, gies, ges, gds, simy, mat2targets, dag2essgraph, rfci.vStruc - 2.0-1-dup2014-02-26 · diff ↗
- 1.1-62014-03-02 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 1.1-5
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- 1.1-4
- RR 2.13.0 released · 2011-04-13
- 1.1-2
- RR 2.12.0 released · 2010-10-15
- RR 2.11.0 released · 2010-04-22
- 1.0-22010-04-16 · diff ↗
- 1.0-02010-03-14 · diff ↗ ·
removed 1 export
decHeuradded 16 exports
skeleton, pc, fci, gSquareBin, gSquareDis, gaussCItest, dsepTest, disCItest, binCItest, dsep, pdsep, ida, idaFast, legal.psep, qreach, plotSG - RR 2.10.0 released · 2009-10-26
- 0.1-9
- RR 2.9.0 released · 2009-04-17
- 0.1-82009-03-06 · diff ↗ ·
added 11 exports
trueCov, ci.test, udag2pdagSpecial, udag2pdagRelaxed, beta.special, beta.special.pcObj, lm.cov, causalEffect, check.new.coll, allDags, pcAlgo.Perfect - RR 2.8.0 released · 2008-10-20
- RR 2.7.0 released · 2008-04-22
- 0.1-72008-04-16 · diff ↗
- 0.1-62008-04-02 · diff ↗ ·
added 24 exports
randomDAG, wgtMatrix, rmvDAG, decHeur, pcAlgo, pcSelect, pcSelect.presel, zStat, condIndFisherZ, pcorOrder, compareGraphs, getNextSet, mcor, corGraph, make.edge.df, orderEdges, labelEdges, dag2cpdag, find.sink, adj.check, pdag2dag, amat2dag, udag2pdag, shd - RR 2.6.0 released · 2007-10-03
- RR 2.5.0 released · 2007-04-24
- 0.1-52007-04-11 · diff ↗
- 0.1-42006-11-02 · diff ↗
- RR 2.4.0 released · 2006-10-03
- 0.1-32006-06-06
- RR 2.3.0 released · 2006-04-24
Package metadata
- First published
- 2006-06-06
- Total releases
- 49 / 20 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 2.1 MB / 7 files
- Download size
- 3.9 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("pcalg")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v047.i11.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.