This function calculates the posterior probability of a risk event 'R' occurring based on observations of multiple root causes and their associated conditional probabilities.
Arguments
- cause_probs
A vector of prior probabilities for each root cause 'C_i'.
- risks_given_causes
A vector of conditional probabilities of the risk event 'R' given each cause 'C_i'.
- risks_given_not_causes
A vector of conditional probabilities of the risk event 'R' given not each cause 'C_i'.
- observed_causes
A vector of observed values for each cause 'C_i' (1 if observed, 0 if not observed, NA if unobserved).
Details
Observed causes are fixed to their conditional probability
(\(P(R \mid C_i)\) if present, \(P(R \mid \bar{C}_i)\) if absent) while
unobserved causes (NA) keep their marginal contribution. The causes are
then combined with the same noisy-OR as risk_prob(), so the posterior is on
the same scale as the prior and observing an aggravating cause raises it.
