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 |
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 |
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 |
causalInfo$'i , j'$CDirConfInv |
An |
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 |
causalInfo$'i , j'$testRes1 |
A Mann-Whitney hypothesis test result for existence of association by odd differences from |
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 |
causalInfo$'i , j'$Signmean |
A mean of i,j odd difference from bootstrapping. |
Examples
bSCMCausalGraphFunc(resC$ConfoundRes$E1,resC$depRes$Dboot)