causalDisco0.9.5 package

Tools for Causal Discovery on Observational Data

adj_confusion

Compute confusion matrix for comparing two adjacency matrices

amat

Extract adjacency matrix from tpdag, cpdag, tpag or pag object

as.graphNEL

Convert adjacency matrix to graphNEL object

average_degree

Compute average degree for adjacency matrix

compare

Compare two tpdag or tskeleton objects

confusion

Compute confusion matrix for comparing two adjacency matrices

corTest

Test for vanishing partial correlations

dir_confusion_original

Compute confusion matrix for comparing two adjacency matrices

dir_confusion

Compute confusion matrix for comparing two adjacency matrices

edges

List of edges in adjacency matrix

essgraph2amat

Convert essential graph to adjacency matrix

evaluate.array

Evaluate adjacency matrix estimation

evaluate.matrix

Evaluate adjacency matrix estimation

evaluate

Evaluate adjacency matrix estimation

evaluate.tamat

Evaluate adjacency matrix estimation

F1

F1 score

fci

Perform causal discovery using the FCI algorithm

FDR

False Discovery Rate

FOR

False Omission Rate

G1

G1 score

gausCorScore

Gaussian L0 score computed on correlation matrix

getvar.character

Get variables with a specific prefix (character method)

getvar.data.frame

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

graph2amat

Convert graphNEL object to adjacency matrix

is_cpdag

Check for CPDAG

is_pdag

Check for PDAG

maketikz

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

maxnedges

Compute maximal number of edges for graph

nDAGs

Number of different DAGs

nedges

Number of edges in adjacency matrix

NPV

Negative predictive value

pc

Perform causal discovery using the PC algorithm

plot.pag

Plot partial ancestral graph (PAG)

plot.tamat

Plot adjacency matrix with order information

plot.tpag

Plot temporal partial ancestral graph (TPAG)

plot.tpdag

Plot temporal partially directed acyclic graph (TPDAG)

plot.tskeleton

Plot temporal skeleton

plotTempoMech

Plot temporal data generating mechanism

precision

Precision

probmat2amat

Convert a matrix of probabilities into an adjacency matrix

recall

Recall

regTest

Regression-based information loss test

shd

Structural hamming distance between adjacency matrices

simDAG

Simulate a random DAG

simGausFromDAG

Simulate Gaussian data according to DAG

specificity

Specificity

tamat

Make a temporal adjacency matrix

TemporalBDeu-class

Temporal Bayesian Dirichlet equivalent uniform (Score criterion)

TemporalBIC-class

Temporal Bayesian Information Criterion (Score criterion)

tfci

Perform causal discovery using the temporal FCI algorithm (TFCI)

tges

Estimate the restricted Markov equivalence class using Temporal Greedy...

tpc

Perform causal discovery using the temporal PC algorithm (TPC)

tplot

Plot temporal graph via Latex

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) <doi:10.1093/aje/kwab087>. It also includes general tools for evaluating differences in adjacency matrices, which can be used for evaluating performance of causal discovery procedures.

  • Maintainer: Bjarke Hautop Kristensen
  • License: GPL-2
  • Last published: 2026-01-20