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:
clear
sysuse cancer
stset st,f(di)
stcox drug, bases(surv)
stcurve, outfile(results, replace) surv at1(drug=1) at2(drug=2)
use results, clear
list
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)
--May
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/