Mirrors the C# Probability.JointProbability. The plain form dispatches on a dependency
assumption alone ("independent" multiplies, "positive" takes the minimum, "negative"
clamps the excess of the sum over 1). Passing indicators (a 0/1 flag per component,
selecting which components participate) switches to the indicator-aware form; passing
correlation too routes dependency = "correlation" through Haden Smith's modification of
Pandey's Product-of-Conditional-Marginals method (HPCM).
Usage
joint_probability(
p,
dependency = c("independent", "positive", "negative", "correlation"),
indicators = NULL,
correlation = NULL
)Arguments
- p
numeric vector of marginal probabilities.
- dependency
one of
"independent"(default),"positive","negative","correlation"."correlation"requires bothindicatorsandcorrelation– the underlying C# method itself returnsNaNfor that combination rather than raising an error, but this wrapper rejects it up front and names the missing argument(s), rather than handing back a silentNaN.- indicators
optional 0/1 vector, the same length as
p.- correlation
optional
length(p)bylength(p)correlation matrix; requiresindicators.