bSCMCausalGraphFunc {BiCausality}R Documentation

bSCMCausalGraphFunc function

Description

This function infers a causal graph from a result of confounding factor filtering by bSCMdeConfoundingGraphFunc().

Usage

bSCMCausalGraphFunc(E1, Dboot, alpha = 0.05, SignThs = 0.05, CausalThs = 0.25)

Arguments

E1

is an adjacency matrix of undirected graph after filtering associations without true causal directions from any confounding factor.

Dboot

is a list of Ds (aligned list of transactions) that are generated from sampling with replacement on input samples (mat) nboot times.

alpha

is a significance threshold for hypothesis tests (Mann Whitney) that deploys for testing degrees of dependency, association direction, and causal direction. The default is 0.5.

SignThs

is a threshold for the degree of dependency for association direction inference. In the independence test of sign direction, to claim that any variables are dependent, the dependency degree must greater than this value significantly. The default is 0.05.

CausalThs

is a threshold for the degree of causal direction In the causal-direction test, to claim that any variables have causal relations, the degree of causal direction must greater than this value significantly. The default is 0.1.

Value

This function returns causal inference results from E1 matrix that is an output of bSCMdeConfoundingGraphFunc.

Ehat

An adjacency matrix of directed causal graph where CausalGRes$Ehat[i,j]=1 implies i causes j.

EValHat

An adjacency matrix of weighted directed causal graph where edge weights are estimated means of probabilities of effect being 1 given cause being either 1 for positive association or 0 for negative association using CondProb() and bootstrapping to estimate.

i

An index

j

An index

causalInfo$'i, j'$CDirConfValInv

An alpha*100th percentile confidence interval of estimated conditional probability of effect j being 1/0 given cause i's value being either the same (positive association) or opposite (negative association).

causalInfo$'i, j'$CDirConfInv

An alpha*100th percentile confidence interval of estimated causal direction degree of i cause j.

causalInfo$'i, j'$CDirmean

A mean-estimated-causal-direction degree of i cause j.

causalInfo$'i, j'$testRes2

A Mann-Whitney hypothesis test result for existence of causal direction. The null hypothesis is that the distributions of causal-direction degrees of i,j differ by a location shift of CausalThs and the alternative is that distributions of causal-direction degrees of i,j is shifted greater than CausalThs.

causalInfo$'i, j'$testRes1

A Mann-Whitney hypothesis test result for existence of association by odd differences from oddDiffFunc(). The null hypothesis is that the distributions of absolute odd difference of i,j differ by a location shift of IndpThs and the alternative is that distributions of absolute odd difference of i,j is shifted greater than IndpThs.

causalInfo$'i, j'$sign

A direction of i,j association: 1 for positive, 0 for negative, and -1 for no association.

causalInfo$'i, j'$SignConfInv

An alpha*100th percentile confidence interval of i,j odd difference from bootstrapping.

causalInfo$'i, j'$Signmean

A mean of i,j odd difference from bootstrapping.

Examples

bSCMCausalGraphFunc(resC$ConfoundRes$E1,resC$depRes$Dboot)

[Package BiCausality version 0.1.4 Index]