Learn R Programming

causalDisco (version 0.9.5)

Tools for Causal Discovery on Observational Data

Description

Various tools for inferring causal models from observational data. The package includes an implementation of the temporal Peter-Clark (TPC) algorithm. Petersen, Osler and Ekstrøm (2021) . It also includes general tools for evaluating differences in adjacency matrices, which can be used for evaluating performance of causal discovery procedures.

Copy Link

Version

Install

install.packages('causalDisco')

Monthly Downloads

308

Version

0.9.5

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Bjarke Hautop Kristensen

Last Published

January 20th, 2026

Functions in causalDisco (0.9.5)

corTest

Test for vanishing partial correlations
dir_confusion

Compute confusion matrix for comparing two adjacency matrices
dir_confusion_original

Compute confusion matrix for comparing two adjacency matrices
evaluate

Evaluate adjacency matrix estimation
is_pdag

Check for PDAG
is_cpdag

Check for CPDAG
graph2amat

Convert graphNEL object to adjacency matrix
fci

Perform causal discovery using the FCI algorithm
gausCorScore

Gaussian L0 score computed on correlation matrix
evaluate.array

Evaluate adjacency matrix estimation
pc

Perform causal discovery using the PC algorithm
nedges

Number of edges in adjacency matrix
evaluate.tamat

Evaluate adjacency matrix estimation
shd

Structural hamming distance between adjacency matrices
nDAGs

Number of different DAGs
maxnedges

Compute maximal number of edges for graph
simDAG

Simulate a random DAG
evaluate.matrix

Evaluate adjacency matrix estimation
precision

Precision
getvar.character

Get variables with a specific prefix (character method)
probmat2amat

Convert a matrix of probabilities into an adjacency matrix
plot.tamat

Plot adjacency matrix with order information
plot.pag

Plot partial ancestral graph (PAG)
maketikz

Generate Latex tikz code for plotting a temporal DAG, PDAG or PAG.
recall

Recall
plot.tskeleton

Plot temporal skeleton
plotTempoMech

Plot temporal data generating mechanism
plot.tpdag

Plot temporal partially directed acyclic graph (TPDAG)
plot.tpag

Plot temporal partial ancestral graph (TPAG)
simGausFromDAG

Simulate Gaussian data according to DAG
tfci

Perform causal discovery using the temporal FCI algorithm (TFCI)
tamat

Make a temporal adjacency matrix
tpcExample

Simulated data example
tplot

Plot temporal graph via Latex
regTest

Regression-based information loss test
getvar.data.frame

Get variables with a specific prefix (data.frame method)
specificity

Specificity
tges

Estimate the restricted Markov equivalence class using Temporal Greedy Equivalence Search
tpc

Perform causal discovery using the temporal PC algorithm (TPC)
amat

Extract adjacency matrix from tpdag, cpdag, tpag or pag object
TemporalBIC-class

Temporal Bayesian Information Criterion (Score criterion)
FOR

False Omission Rate
FDR

False Discovery Rate
NPV

Negative predictive value
adj_confusion

Compute confusion matrix for comparing two adjacency matrices
as.graphNEL

Convert adjacency matrix to graphNEL object
F1

F1 score
G1

G1 score
TemporalBDeu-class

Temporal Bayesian Dirichlet equivalent uniform (Score criterion)
confusion

Compute confusion matrix for comparing two adjacency matrices
average_degree

Compute average degree for adjacency matrix
edges

List of edges in adjacency matrix
essgraph2amat

Convert essential graph to adjacency matrix
compare

Compare two tpdag or tskeleton objects