The goal of ipcalg is to estimate an DAG/IDAG pair for a dataset with unknown SCM.
You can install development of ipcalg from GitHub with:
devtools::install_github("dhessing/ipcalg")
library(tibble)
library(pcalg)
library(ipcalg)
n <- 1000
data <- tibble::tibble(
A = rnorm(n),
B = rnorm(n),
Y = A + B + A * B + rnorm(n)
)
pc.fit <- pc(
suffStat = list(C = cor(data), n = nrow(data)),
indepTest = gaussCItest,
alpha = 0.01,
labels = colnames(data)
)
ipc.fit <- ipc(pc.fit, data, x = 'A', y = 'Y', alpha = 0.01)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.