Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: kaplan meier graph

From   "Sudhinaraset, May" <>
To   "" <>
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)) 


*   For searches and help try:

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