[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

AW: Re: st: Creating dataset for survival analysis

From   "" <>
To   <>
Subject   AW: Re: st: Creating dataset for survival analysis
Date   Thu, 21 Aug 2008 19:03:34 +0000 (GMT)

VEry helpful. Thank you. 
----Urspr√ľngliche Nachricht----
Datum: 21.08.2008 13:45
An: <>
Betreff: Re: st: Creating dataset for survival analysis

When you say two competing events, do you mean competing risks, that 
subjects are at risk for both events concurrently?

May not matter, there's an easy solution..

Use the Weibull distribution:

Surv=exp(-H t^p)

Draw random times from the Weibull by substituting a uniform random 
variate (R) for Surv, and solving for t


If you give each "subject" an ID number, you can use stset and stsplit 
to do your censoring.

For a fixed hazard ratio based on a discrete covariate, use different 
values of H.

For competing risks, draw two separate times, one for each event, and 
take the shorter one.

Paul wrote:
> I am interested to perform some simulations with survival analysis (KM). Does anybody now how to Stata to create a
> dataset with a large number of subjects with a constant hazard rate for two competing events? Thank you in 
> Peter
> *
> *   For searches and help try:
> *
> *
> *

E. Paul Wileyto, Ph.D.
Assistant Professor of Biostatistics
Tobacco Use Research Center
School of Medicine, U. of Pennsylvania
3535 Market Street, Suite 4100
Philadelphia, PA  19104-3309

Fax: 215-746-7140

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index