Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: confidence intervals of predicted risk after stcox

Subject   st: confidence intervals of predicted risk after stcox
Date   Fri, 26 Oct 2012 12:45:19 +0200

Hi all,

I use Stata/IC 12.1 for Windows (32-bit).

I run a Cox model to calculate for each patient the predicted probability
of event at 15 months, using predict xb, predict basesurv and adjiusting
the baseline risk

webuse cancer, clear
gen age40=age-40
stcox age40 i.drug
predict xb, xb
predict basesurv, basesurv
sum basesurv if _t<16
scalar base15 = r(min)
gen risk15 = 1 - base15^exp(xb)

I ask if it is possible to have also the 95% confidence intervals of these

I try:

predict se_xb, stdp
gen lb = xb - invnormal(0.975)*se_xb
gen ub = xb + invnormal(0.975)*se_xb
gen lb15 = 1 - base15^exp(lb)
gen ub15 = 1 - base15^exp(ub)

but the results seems do not have sense.

Thanks for your consideration.

Mario Petretta
Dpt. of Internal Medicine, Cardiology and Heart Surgery
Naples University Federico II -Italy

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index