Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: kaplan meier graph


From   "Sudhinaraset, May" <msudhina@jhsph.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: kaplan meier graph
Date   Thu, 14 Apr 2011 11:52:56 -0400

Dear STATA experts,

I am trying to use the stci command, but because I weighted my data, it won't allow me to use this command. How else might I obtain the median?

stci, by(migsex)

Also, how do you include the median value in a kaplan meier graph? I used the following, but this gives me median survival. I would like the median time of failure for each group.

sts graph, by(migsex) noorigin ytitle(Proportion not sexually experienced,margin(small)) yscale(range(.20 1.0)) ylabel(.2 (.2) 1.0, format(%02.1f) labsize(*1.0)) ymlabel(0.5(.2)0.9, nolabels grid glwidth(medium)) xtitle(Age (years), margin(small)) note(Logrank P = 0.000, size(medsmall) position(7) ring(0) margin(vlarge)) legend(order(1 "Urban native"  2 "Rural native" 3 "Rural-urban migrant" 4 "Urban-urban migrant") all nobox region(lwidth(none)) ) scheme(sj) graphregion(fcolor(white)) plotregion(margin(medium) fcolor(white)) plot1opts( lwidth(*2) lcolor(green) lpattern(solid) ) plot2opts( lwidth(*2) lcolor(blue ) lpattern(dash ) ) addplot((pci -0.035 `a1' 0.5 `a1' -0.035 `a2' 0.5 `a2' -0.035 `a3' 0.5 `a3', lcolor(black))) yline(0.5, lpattern(dash)) 

Thanks,
May


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index