Given a vector of discrete-time hazards \(h_1, \ldots, h_K\), computes the corresponding PMF: $$pmf_i = h_i \prod_{j < i} (1 - h_j)$$
Details
The last hazard must equal 1 (to ensure the PMF sums to 1). If a vector of length \(K-1\) is supplied (all hazards except the final exit hazard), 1 is appended automatically.
See also
Other pdiscretestep:
ddiscretestep(),
pdiscretestep(),
pmf_to_hazards(),
rdiscretestep()
Examples
hazards_to_pmf(c(0.2, 0.3, 1))
#> [1] 0.20 0.24 0.56
