udag2pdag {pcalg} | R Documentation |
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.
udag2pdag(gInput)
gInput |
pcAlgo-object containing skeleton and cond. ind. information |
The skeleton is extended to a PDAG using rules by Spirtes and Pearl (see References).
A pcAlgo-object containing the PDAG.
Markus Kalisch (kalisch@stat.math.ethz.ch)
P. Spirtes, C. Glymour and R. Scheines (2000) Causation, Prediction, and Search, 2nd edition, The MIT Press.
J. Pearl (2000), Causality, Cambridge University Press.
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)