Learn R Programming

CausalR (version 1.4.3)

GetApproximateMaximumDValueFromThreeByTwoContingencyTable: returns approximate maximum D value or weight for a 3x2 superfamily

Description

Computes an approximate maximum D value (or weight) for a superfamily (3x2 table). The result is only approximate as only the first valid D value that is return. This has been done to speed up the overall algorithm.

Usage

GetApproximateMaximumDValueFromThreeByTwoContingencyTable(threeByTwoContingencyTable, predictionListStats, logOfFactorialOfPredictionListStats, returnlog = FALSE)

Arguments

threeByTwoContingencyTable
approximate values of n++, n+-, n-+, n--, n0+ and n0-, these values are calculated to optimise the D-value (see page 6 of Assessing statistical significance of causal graphs)
predictionListStats
a vector containing the values q+, q- and q0 (the number of positive/negative/non-significant (or contradictory) predictions)
logOfFactorialOfPredictionListStats
a vector containing the log of the factorial value for each entry in predictionListStats
returnlog
return the result as a log, default is FALSE

Value

an approximate maximum D value or weight