Hello

Does anyone have simple code to create a cost-effectiveness acceptability curve?
I have a dataset that has 2 columns - one columne (inc_dep_cci) with 1000 bootstrapped estimates of incremental effect and the other column (inc_cost_cci) with 1000 bootstrapped estimates of incremental costs between two care environments.

When I use the below code, the estimates of probability cost-effective keeps coming up 0.

capture postutil clear
postfile ceac n probce using "ceac.dta", replace // Set-up 'postfile' to store results
use "P:\Omar Projects\Paloma\OSCAR Aim 3\Aim 3 Data Files\bootstrap_mnar.dta", clear
gen n = _n in 1/1000
count if ~missing(inc_dep_cci)
local denom = r(N)
forvalues n=1/1000 {
count if (inc_dep_cci*`n' - inc_cost_cci) > 0
post ceac (`n') ( r(N)/`denom' ) // Proportion of cost-effective BS replicates

}

postclose ceac


Any help is greatly appreciated.

Thank you,
Marta