IDA_parallel {ParallelPC}R Documentation

Estimate Total Causal Effects using the IDA_parallel Algorithm

Description

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

Usage

IDA_parallel(datacsv, cause, effect, pcmethod, alpha, num.cores,
  mem.efficient = FALSE)

Arguments

datacsv

The dataset in csv format.

cause

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

effect

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

pcmethod

Character string specifying method; the default, "parallel", will use the parallelised method for learning the skeleton of the graph, see skeleton_parallel.

alpha

significance level (number in (0; 1) for the individual 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

Value

A matrix that shows the causal effects (minimum of all possible effects) of the causes (columns) on the effects (rows)

References

Marloes H Maathuis, Markus Kalisch, Peter Buhlmann, et al. Estimating high-dimensional intervention effects from observational data. The Annals of Statistics, 37(6A):3133-3164,2009.

Examples

##########################################
## Using IDA_parallel without mem.efficeient
##########################################
library(bnlearn)
library(pcalg)
library(parallel)
data("gmI")
datacsv <- cov(gmI$x)
IDA_parallel(datacsv,1:2,3:4,"parallel",0.01, 2)

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

[Package ParallelPC version 1.2 Index]