viewof expected_value_of_imperfect_information = cell(`
/* Calculate the expected value of conducting a randomized controlled trial that measures the cost-effectiveness to a given level of accuracy (i.e., up to a standard error of plus/minus sigma_obs).
This function assumes that the observed cost-effectiveness estimate will be drawn from a log-normal distribution whose expected value is the true value and whose standard deviation is sigma_obs. It integrates the value of observing a sample from that distribution across the possible noisy measurements of a given true value and across possible true values. To integrate across possible true values it uses our probabilistic prediction of the expected cost-effectiveness as a prior on the true cost-effectiveness.
*/
expected_value_of_partial_information_lognormal(prior,std_obs,budget,previous_best) = {
mu_sigma_prior = fit_logNormal(prior)
true_value = max(lognormal(mu_sigma_prior[0],mu_sigma_prior[1])->SampleSet.fromDist,0.0001)
observed_ce = max(lognormal_from_mean_and_std(true_value,std_obs),0.0001)
sigma_obs = sqrt(log(std_obs^2/mean(prior)^2 +1 ))
value_of_partial_information_lognormal(mu_sigma_prior[0],mu_sigma_prior[1],observed_ce,sigma_obs,budget,previous_best)
}
//How many dollars would it be worth to obtain this information?
expected_value_of_partial_information_lognormal_in_usd(prior,std_obs,budget,previous_best)={
expected_value_of_partial_information_lognormal(prior,std_obs,budget,previous_best)/previous_best
}
//How much money is it worth to obtain this information per dollar that will be spent on the interventions?
ev_partial_information_lognormal_per_usd(prior,std_obs,previous_best)={
expected_value_of_partial_information_lognormal_in_usd(prior,std_obs,1,previous_best)
}
`, [cea_functions,value_of_imperfect_information])