viewof fistulaVPIAnalysis = cell(`params = {
chickens_affected_every_year: 240M to 390M,
follow_through_rate: 0.48 to 0.84,
mean_years_of_impact: 4 to 36,
costs: 36M to 84M,
average_lifespan_of_chicken: 1.1 to 1.5,
benefit_from_saved_chicken: beta(0.5, 1.3)
}
chicken_years_affected_per_dollar_rp(x) = {
chickens_affected_per_dollar = x.chickens_affected_every_year * x.follow_through_rate * x.mean_years_of_impact / x.costs
SampleSet.fromDist(x.average_lifespan_of_chicken * chickens_affected_per_dollar * x.benefit_from_saved_chicken)
}
mapDict(x, f) = Dict.fromList(map(Dict.keys(x), {|key| [key, f(x[key])]}))
mapSet(x, key, value) = Dict.merge(x, Dict.fromList([[key, value]]))
to_mean(x) = mapDict(x, mean)
vpi_analysis(f, params, other) = {
mean_params = to_mean(params)
Dict.fromList(map(Dict.keys(params), {|key| [key, {
possible_results = f(mapSet(mean_params, key, params[key]))
vou = max([mean(possible_results), other])
possible_decisions = SampleSet.map(possible_results, {|s| max([s, other])})
voi = mean(possible_decisions)
vpi = voi - vou
vpi / voi * 93000000
}]}))
}
vpi_analysis(chicken_years_affected_per_dollar_rp, params, mean(malaria_consortium))`, [malaria_consortium])