Simulating survival data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Simulating survival data

Peter Tait
Hi,

I would like to repeatedly create some simulated survival data.

Is there an R package that has a function that can do this?

I would like to simulate a clinical trial that has 2 study arms and the outcome of interest is measured up to 30 days from randomization.

Thanks for the help.
Peter

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Simulating survival data

Frank Harrell
[hidden email] wrote:

> Hi,
>
> I would like to repeatedly create some simulated survival data.
>
> Is there an R package that has a function that can do this?
>
> I would like to simulate a clinical trial that has 2 study arms and the outcome of interest is measured up to 30 days from randomization.
>
> Thanks for the help.
> Peter

library(Hmisc)
?spower


--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: Simulating survival data

Peter Tait
Hi Dr.Harrell,
thanks for the tip but I am not sure Quantile2() does what I'm need.
I need to repeatedly simulate 30 day survival data with a given sample
size and estimate a hazard ratio for each simulated data set. I want to
create a 95%CI for the hazard ratio by creating a distribution for it at
different sample sizes.
 From reading the documentation and running the examples,  Quantile2()
does not appear to do what I need.
Please correct me if I'm wrong.
Cheers
Peter

Frank E Harrell Jr wrote:

> [hidden email] wrote:
>> Hi,
>> I would like to repeatedly create some simulated survival data.
>>
>> Is there an R package that has a function that can do this?
>>
>> I would like to simulate a clinical trial that has 2 study arms and
>> the outcome of interest is measured up to 30 days from randomization.
>> Thanks for the help.
>> Peter
>
> library(Hmisc)
> ?spower
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html