View source: R/belief_trajectory.R
| belief_trajectory | R Documentation |
Given a prior distribution over hypotheses and a sequence of likelihood ratio vectors (one per evidence step), computes the full Bayesian belief trajectory by sequential multiplicative updating.
belief_trajectory(prior, lr_list)
prior |
Numeric vector. Prior distribution over the |
lr_list |
List of numeric vectors. Each element is the likelihood
ratio vector for an evidence step, with one entry per hypothesis
(same length as |
The update rule is the classical multiplicative Bayesian update:
P_t(H_i) \propto P_{t-1}(H_i) \cdot \mathrm{LR}_t(H_i)
with renormalization after each step. In the two-hypothesis case
(n = 2), the ratio of the components of
lr_list[[t]] recovers the classical forensic likelihood ratio.
A matrix with (T+1) rows and n columns, where row 1 is
the prior and row t+1 is the posterior distribution after the
first t evidence steps. Each row is a probability distribution.
Marsico, F. L. & Egeland, T. (in preparation). Belief dynamics during the investigative process.
binary_belief_trajectory for the two-hypothesis
special case, trajectory_metrics for summary statistics.
# Two hypotheses, three evidence steps
prior <- c(0.5, 0.5)
lr_list <- list(c(3, 1), c(1, 2), c(2, 1))
traj <- belief_trajectory(prior, lr_list)
print(traj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.