Learn R Programming

⚠️There's a newer version (2.7-12) of this package.Take me there.

pcalg (version 2.0-3)

Methods for graphical models and causal inference

Description

This package contains several 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 observational and interventional data without hidden variables). For causal inference the IDA algorithm and the generalized backdoor criterion is implemented.

Copy Link

Version

Install

install.packages('pcalg')

Monthly Downloads

1,945

Version

2.0-3

License

GPL (>= 2)

Maintainer

Markus Kalisch

Last Published

July 1st, 2014

Functions in pcalg (2.0-3)

legal.path

Check if a 3-node-path is Legal
EssGraph-class

Class "EssGraph"
rmvDAG

Generate Multivariate Data according to a DAG
dag2essgraph

Convert a DAG to an Essential Graph
getGraph

Get the "graph" Part or Aspect of R Object
condIndFisherZ

Test Conditional Independence of Gaussians via Fisher's Z
gmB

Graphical Model 5-Dim Binary Example Data
gmInt

Graphical Model 8-Dimensional Interventional Gaussian Example Data
showAmat

Show Adjacency Matrix of pcAlgo object
gies

Estimate Interventional Markov Equivalence Class of a DAG by GIES
gmL

Latent Variable 4-Dim Graphical Model Data Example
compareGraphs

Compare two graphs in terms of TPR, FPR and TDR
GaussParDAG-class

Class "GaussParDAG"
pcAlgo-class

Class "pcAlgo"
dag2pag

Convert a DAG with latent variables into a PAG
rfci

Estimate an RFCI-PAG using the RFCI Algorithm
dsepTest

Test for d-separation in a DAG
gAlgo-class

Class "gAlgo"
GaussL0penObsScore-class

Class "GaussL0penObsScore"
fciAlgo-class

Class "fciAlgo"
gmD

Graphical Model Discrete 5-Dim Example Data
ida

Estimate Multiset of Possible Total Causal Effects
qreach

Compute Possible-D-SEP(x,G) of a node x in a PDAG G
gmG

Graphical Model 8-Dimensional Gaussian Example Data
iplotPC

Plotting a pcAlgo object using the package igraph
binCItest

G square Test for (Conditional) Independence of Binary Variables
simy

Estimate Interventional Markov Equivalence Class of a DAG
idaFast

Multiset of Possible Total Causal Effects for Several Target Var.s
checkTriple

Check Consistency of Conditional Independence for a Triple of Nodes
backdoor

Find Set Satisfying the Generalized Backdoor Criterion
find.unsh.triple

Find all Unshielded Triples in an Undirected Graph
pdag2dag

Extend a Partially Directed Acyclic Graph (PDAG) to a DAG
pc

Estimate the Equivalence Class of a DAG using the PC Algorithm
disCItest

G square Test for (conditional) Independence for Discrete Data
ParDAG-class

Class "ParDAG"
pdsep

Estimate Final Skeleton in the FCI algorithm
dag2cpdag

Convert a DAG to a CPDAG
wgtMatrix

Compute weight matrix of simulated DAG.
GaussL0penIntScore-class

Class "GaussL0penIntScore"
mat2targets

Construct a list of intervention targets and a target index vector
rmvnorm.ivent

Simulate from a Gaussian Causal Model
mcor

Compute (Large) Correlation Matrix
showEdgeList

Show Edge List of pcAlgo object
trueCov

Covariance matrix of a DAG.
udag2pdag

Last PC Algorithm Step: Extend Object with Skeleton to Completed PDAG
pag2mag

Transform a PAG into a MAG in the Corresponding Markov Equivalence Class
r.gauss.pardag

Generate a Gaussian Causal Model Randomly
plotSG

Plot the subgraph around a Specific Node in a Graph Object
gds

Greedy DAG Search to Estimate Markov Equivalence Class of DAG
pcSelect.presel

Estimate Subgraph around a Response Variable using Preselection
pcSelect

PC-Select: Estimate subgraph around a response variable
skeleton

Estimate (Initial) Skeleton of a DAG using the PC / PC-Stable Algorithm
Score-class

Virtual Class "Score"
randomDAG

Generate a Directed Acyclic Graph (DAG) randomly
corGraph

Computing the correlation graph
pcorOrder

Compute Partial Correlations
visibleEdge

Check visible edge.
shd

Compute Structural Hamming Distance (SHD)
pcAlgo

PC-Algorithm [OLD]: Estimate Skeleton or Equivalence Class of a DAG
beta.special.pcObj

Compute set of intervention effects in a fast way
dsep

Test for d-separation in a DAG
ges

Estimate the Markov equivalence class of a DAG using GES
gmI

Graphical Model 7-dim IDA Data Examples
possibleDe

Find possible descendants on definite status paths.
udag2pag

Last steps of FCI algorithm: Transform Final Skeleton into FCI-PAG
plotAG

Plot partial ancestral graphs (PAG)
fci

Estimate a PAG, using the FCI-algorithm
beta.special

Compute set of intervention effects
getNextSet

Iteration through a list of all combinations of choose(n,k)
udag2apag

Last step of RFCI algorithm: Transform partially oriented graph into RFCI-PAG
pcalg-internal

Internal Pcalg Functions
pc.cons.intern

Utility for conservative and majority rule in PC and FCI
dreach

Compute D-SEP(x,y,G)