copula_dag: Copula-based Directed Acyclic Graph

Description Usage Arguments Details Value Examples

Description

Copula-based Directed Acyclic Graph

Usage

1
2
copula_dag(x, alpha = 0.1, pc = TRUE, skeleton = FALSE, fast = TRUE,
  ...)

Arguments

x

a matrix or data frame with more than two columns (see pairwise_direction for the bivariate case)

alpha

a scalar number in (0,1) indicating the level of the test.

pc

a logical indicating whether the PC algorithm should be used to find the skeleton.

skeleton

a logical indicating whether the skeleton only should be returned.

fast

a logical indicating whether the memory greedy (but faster) method should be used.

...

additional arguments passed to bicop

Details

TODO

Value

estimated causal DAG and its adjacency matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(123)
n <- 500
X <- rnorm(n)
Y <- X ^ 2 + rnorm(n)
Z <- Y ^ 4 + 5 * rnorm(n)
W <- X ^ 3 + 2 * rnorm(n)
dag_data <- cbind(X, Y, Z, W)
trueDAG <- cbind(c(0, 0, 0, 0), c(1, 0, 0, 0), c(0, 1, 0, 0), c(1, 0, 0, 0))

estDAG <- copula_dag(dag_data, alpha = 0.01)

tvatter/copulaDAG documentation built on May 20, 2019, 10:23 p.m.