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

Re: st: Survival curves after Cox regression


From   [email protected] (Roberto G. Gutierrez, StataCorp.)
To   [email protected]
Subject   Re: st: Survival curves after Cox regression
Date   Tue, 27 May 2003 14:17:29 -0500

Ineta Sokolowski <[email protected]> asks:

> I would like to make one graph with 4 survival curves after estimation of
> Cox regression, but I can not plot the reference group in same plot with
> rest of the groups. I write following comands:

> .stset time, failure(response=1) 
> 
> .xi: stcox i.group4, basesurv(baseline) 
> .stcurve, surv at1( _Igroup4_2=1) at2( _Igroup4_3=1) at3( _Igroup4_4=1) 

> Variable group4 have values 1, 2, 3 and 4.

> Is there a posibility to plot all the 4 curves in the same graph? 

Sure.

  . local oldopts at1(_Igroup4_2=1) at2(_Igroup4_3=1) at3(_Igroup4_4=1)
  . stcurve, surv `oldopts' at4(_Igroup4_2=0 _Igroup4_3=0 _Igroup4_4=0)
	 
That is, simply add the new -at4()- option to what you currently have.  The
reference group (-group4==1-) is that for which all indicators are zero.

--Bobby
[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/



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