Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Confidence limits on survival probabilities from stcox

From   May Boggess <>
Subject   RE: st: Confidence limits on survival probabilities from stcox
Date   02 Feb 2005 09:20:25 -0600

On Wednesday, Neville wrote:

> ... In my example. I just have the
> two categorical variables and chose to plot the survival curves for each
> combination of levels of the two variables, thereby avoiding evaluating at
> any means. I attempted to do the same thing in the - adjust for - option of
> - stlist - (by putting each dummy variable in the - adjust for -) but it
> didn't produce the same results. 

The command -sts list- only evaluates at zero. So get the survival curve
at a particular value, you need to add or subtract appropriately from
your variable so zero will correspond to the value you are interestd in.
Here is an example:

sysuse cancer
stset st,f(di)
stcox drug, bases(surv)
stcurve, outfile(results, replace) surv  at1(drug=1) at2(drug=2)
use results, clear
duplicates drop
sort _t
twoway line surv1 surv2 _t, connect(stairstep stairstep)
save results, replace

sysuse cancer, clear
stset st,f(di)
gen copydrug=drug
replace drug=copydrug-1
sts list, adjustfor(drug)
replace drug=copydrug-2
sts list, adjustfor(drug)


*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index