Bookmark and Share

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]

st: -stcurve- (-svy:stcox-)


From   "Muhuri, Pradip (SAMHSA/CBHSQ)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: -stcurve- (-svy:stcox-)
Date   Sun, 4 Aug 2013 01:44:58 +0000

Dear Statalist,


I have used -svy:stcox- with attained age as the time scale (code not shown), and then plotted the survival curve and saved the results using the following code:

stcurve, surv at1(xspd2=1 xsmoke=3) at2(xspd2=2 xsmoke=3) range (18, 95) outfile ("G:\spd_no_spd_surv"). 

The data file provides me three variables namely,  _t, surv2, and surv3.


I am looking for the sample code to calculate the following:

	(1) the median survival times, that is, age at which (-t) half of the people survived 	(based on surv2 and surv3 as well); and 

	(2) the arithmetic mean of the survival times (-t) or life expectancy.

Any help will be highly appreciated.

Thanks,


Pradip

Pradip K. Muhuri, PhD
SAMHSA/CBHSQ
1 Choke Cherry Road, Room 2-1071
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index