Estimate Total Causal Effects of Joint Interventions

Description

This is the parallelised version of the IDA (stable) algorithm in the pcalg package.

Usage

1
2
jointIDA_parallel(datacsv, cause, effect, pcmethod = "stable", alpha,
  num.cores = 1, mem.efficient = FALSE, technique = c("RRC", "MCD"))

Arguments

datacsv

The dataset in csv format with rows are samples and columns are variables.

cause

The number of integer positions of the intervention variables in the dataset.

effect

the integer position of the target variable in the dataset.

pcmethod

Character string specifying the method of the PC algorithm, e.g. stable for stable-PC, and parallel for parallel-PC.

alpha

significance level (number in (0; 1) for the conditional independence tests.

num.cores

The numbers of cores CPU to run the algorithm

mem.efficient

If TRUE, uses less amount of memory at any time point while running the algorithm

technique

The character string specifying the technique that will be used to estimate the total joint causal effects in the pcalg package. RRC for Recursive regression for causal effects MCD for Modifying the Cholesky decomposition

Value

A matrix that shows the causal effects of the causes (rows) on the effect. Different columns show different possible causal effect values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
##########################################
## Using IDA_parallel without mem.efficeient
##########################################
library(bnlearn)
library(pcalg)
library(parallel)
data("gmI")
datacsv <- cov(gmI$x)
jointIDA_parallel(datacsv,1:2,3, pcmethod="parallel",0.01, 2, technique="RRC")

##########################################
## Using IDA_parallel with mem.efficeient
##########################################
library(bnlearn)
library(pcalg)
library(parallel)
data("gmI")
datacsv <- cov(gmI$x)
jointIDA_parallel(datacsv,1:2,3, pcmethod="parallel",0.01, 2, TRUE, technique="RRC")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.