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: How do I simulate survival data?


From   Thomas Speidel <thomas@tmbx.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: How do I simulate survival data?
Date   Thu, 03 Oct 2013 11:16:13 -0600

I'm trying to simluate survival data for illustrative purposes. I've never done this in Stata, so I'm not sure how I should proceed. The aim is to produce a Kaplan-Meier graph of a ficticious time to event process stratified by a binary variable. I would like the two lines to overlap until half time, and then starts diverging from one another. I also would like enough data to make the stair steps not too tall. I know how to generate the random time. But how do I generate the event and the binary variable so that it meets my conditions?

Thanks.

--
Thomas Speidel
*
*   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