jointIDA_parallel {ParallelPC} | R Documentation |
Estimate Total Causal Effects of Joint Interventions
Description
This is the parallelised version of the IDA (stable) algorithm in the pcalg package.
Usage
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
##########################################
## 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")