Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: confidence intervals of predicted risk after stcox

From   Steve Samuels <>
Subject   Re: st: confidence intervals of predicted risk after stcox
Date   Fri, 26 Oct 2012 17:15:04 -0400

Mario, when I run your code, and sum the new variables, I get:

Variable |       Obs        Mean    Std. Dev.       Min        Max
        lb15 |        48    .2283326    .2110915   .0112244   .6184661
      risk15 |        48    .4723272     .343838   .0406233   .9987398
        ub15 |        48    .7089512    .3057171   .1413257          1

I see nothing strange about them. What is it that does not make sense to you?


On Oct 26, 2012, at 6:45 AM, wrote:

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:

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index