* Authors: Bellavia A, Bottai M, Discacciati A, Orsini N * Adjusted survival curves with multivariable Laplace regression. Epidemiology. 2014. // To install laplace_surv use the following command net install laplace_surv, from(http://www.imm.ki.se/biostatistics/stata) replace webuse catheter, clear // Overall survival quietly laplacereg time , fail(infect) q(1(1)70) laplace_surv, line /// title("Unadjusted survival curve" " ") name(f1, replace) // Adjusted survival curves using mean covariate method quietly laplacereg time female age, fail(infect) q(1(1)70) laplace_surv, at1(female=0) at2(female=1) line /// title("Adjusted survival curves" "Mean covariate method") /// legend(label(1 "Male") label(2 "Female")) name(f2, replace) // Adjusted survival curves using inverse probability weights logistic female age predict prob replace prob=1-prob if female==0 quietly laplacereg time female [pweight=1/prob], f(infect) q(1(1)70) laplace_surv, at1(female=0) at2(female=1) line /// legend(label(1 "Male") label(2 "Female")) /// title("Adjusted survival curves" "Inverse probability weights") name(f3, replace)