Learn R Programming

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

pcalg (version 2.0-2)

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

2,763

Version

2.0-2

License

GPL (>= 2)

Maintainer

Markus Kalisch

Last Published

March 19th, 2014

Functions in pcalg (2.0-2)

ParDAG-class

Class "ParDAG"
backdoor

Find Set Satisfying the Generalized Backdoor Criterion
corGraph

Computing the correlation graph
gmD

Graphical Model Discrete 5-Dim Example Data
checkTriple

Check Consistency of Conditional Independence for a Triple of Nodes
dsepTest

Test for d-separation in a DAG
dag2pag

Convert a DAG with latent variables into a PAG
disCItest

G square Test for (conditional) Independence for Discrete Data
dsep

Test for d-separation in a DAG
ges

Estimate the Markov equivalence class of a DAG using GES
binCItest

G square Test for (Conditional) Independence of Binary Variables
GaussL0penObsScore-class

Class "GaussL0penObsScore"
getNextSet

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

Test Conditional Independence of Gaussians via Fisher's Z
GaussL0penIntScore-class

Class "GaussL0penIntScore"
dag2cpdag

Convert a DAG to a CPDAG
r.gauss.pardag

Generate a Gaussian Causal Model Randomly
gmInt

Graphical Model 8-Dimensional Interventional Gaussian Example Data
rfci

Estimate an RFCI-PAG using the RFCI Algorithm
iplotPC

Plotting a pcAlgo object using the package igraph
find.unsh.triple

Find all Unshielded Triples in an Undirected Graph
dreach

Compute D-SEP(x,y,G)
getGraph

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

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

Compute set of intervention effects
gies

Estimate Interventional Markov Equivalence Class of a DAG by GIES
visibleEdge

Check visible edge.
gmL

Latent Variable 4-Dim Graphical Model Data Example
pcSelect

PC-Select: Estimate subgraph around a response variable
idaFast

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

Last PC Algorithm Step: Extend Object with Skeleton to Completed PDAG
fciAlgo-class

Class "fciAlgo"
pc.cons.intern

Utility for conservative and majority rule in PC and FCI
pag2mag

Transform a PAG into a MAG in the Corresponding Markov Equivalence Class
ida

Estimate Multiset of Possible Total Causal Effects
pdag2dag

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

Find possible descendants on definite status paths.
pdsep

Estimate Final Skeleton in the FCI algorithm
qreach

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

Construct a list of intervention targets and a target index vector
simy

Estimate Interventional Markov Equivalence Class of a DAG
mcor

Compute (Large) Correlation Matrix
showEdgeList

Show Edge List of pcAlgo object
pcorOrder

Compute Partial Correlations
trueCov

Covariance matrix of a DAG.
randomDAG

Generate a Directed Acyclic Graph (DAG) randomly
pcSelect.presel

Estimate Subgraph around a Response Variable using Preselection
plotAG

Plot partial ancestral graphs (PAG)
pcAlgo-class

Class "pcAlgo"
plotSG

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

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

Compute weight matrix of simulated DAG.
Score-class

Virtual Class "Score"
EssGraph-class

Class "EssGraph"
shd

Compute Structural Hamming Distance (SHD)
gds

Greedy DAG Search to Estimate Markov Equivalence Class of DAG
gmB

Graphical Model 5-Dim Binary Example Data
udag2pag

Last steps of FCI algorithm: Transform Final Skeleton into FCI-PAG
rmvnorm.ivent

Simulate from a Gaussian Causal Model
gAlgo-class

Class "gAlgo"
udag2apag

Last step of RFCI algorithm: Transform partially oriented graph into RFCI-PAG
legal.path

Check if a 3-node-path is Legal
compareGraphs

Compare two graphs in terms of TPR, FPR and TDR
gmG

Graphical Model 8-Dimensional Gaussian Example Data
rmvDAG

Generate Multivariate Data according to a DAG
pcalg-internal

Internal Pcalg Functions
GaussParDAG-class

Class "GaussParDAG"
beta.special.pcObj

Compute set of intervention effects in a fast way
dag2essgraph

Convert a DAG to an Essential Graph
pcAlgo

PC-Algorithm [OLD]: Estimate Skeleton or Equivalence Class of a DAG
gmI

Graphical Model 7-dim IDA Data Examples
showAmat

Show Adjacency Matrix of pcAlgo object
pc

Estimate the Equivalence Class of a DAG using the PC Algorithm