Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: confidence intervals of predicted risk after stcox
From
Steve Samuels <[email protected]>
To
[email protected]
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?
Steve
On Oct 26, 2012, at 6:45 AM, [email protected] 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
estimate.
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:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/