udag2pdag {pcalg}R Documentation

Extend a pcAlgo-object containing a skeleton to a PDAG

Description

This function extends a pcAlgo-object containing a skeleton and corresponding conditional independence information to a Partially Directed Acyclic Graph (PDAG). The result is a pcAlgo-object as well.

Usage

udag2pdag(gInput)

Arguments

gInput pcAlgo-object containing skeleton and cond. ind. information

Details

The skeleton is extended to a PDAG using rules by Spirtes and Pearl (see References).

Value

A pcAlgo-object containing the PDAG.

Author(s)

Markus Kalisch (kalisch@stat.math.ethz.ch)

References

P. Spirtes, C. Glymour and R. Scheines (2000) Causation, Prediction, and Search, 2nd edition, The MIT Press.

J. Pearl (2000), Causality, Cambridge University Press.

See Also

udag2cpdag,pdag2dag,dag2cpdag

Examples

p <- 10 # number of random variables
n <- 10000 # number of samples
s <- 0.4 # sparsness of the graph

## generate random data
set.seed(42)
g <- randomDAG(p,s) # generate a random DAG
d <- rmvDAG(n,g) # generate random samples

gSkel <- 
  pcAlgo(d,alpha=0.05) # estimate of the skeleton

gPDAG <- udag2pdag(gSkel)

[Package pcalg version 0.1-5 Index]