Stephanie J Macneill <[email protected]> asks:
> I have been asked to generate a Kaplan Meyer curve incorporating the number
> of subjects at risk at various time points along the curve and I am not sure
> how to proceed. The dataset is of a group of subjects who are followed-up
> until death or until the end of the follow-up period (subjects cannot
> re-enter the study). If I specify the "lost" option in sts graph (STS GRAPH,
> BY(GROUP) LOST) then STATA provides the number of subjects at various points
> who have been lost to follow-up, but not the ones who died. Is there a way
> of requesting the number of patients who are at risk (beginning total from
> the sts list) rather than the number lost? I am also curious whether it is
> routine to do this only at select points to avoiding cluttering the graph.
-sts graph- has an -atrisk- option for precisely this purpose. For example,
. sts graph, by(drug) atrisk
As for avoiding clutter, I would try the above first and see. Displaying
the number at risk for a subset of the steps in the Kaplan-Meier is a bit
tedious. You would have to -sts generate- the Kaplan Meier estimate, -sts
generate- the number at risk at each time (-sts generate newvar = n-), and
then place the number at risk manually where you want it.
--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/