| generate_data | R Documentation |
Generate simulated data
generate_data(N=500, rand_ratio=0.5, effect_p=0.6, enroll_rate=380*0.25/6,
lambda1=0.117, HR=0.5, tau=12*5, t1=1)
N |
Maximum sample size |
rand_ratio |
Allocation ratio |
effect_p |
Vector for proportion of responders in the treatment arm at baseline (see details) |
enroll_rate |
Enrollment rate in subjects per month |
lambda1 |
Baseline hazard in terms of months |
HR |
Vector of hazard ratios for responders against controls (see details) |
tau |
Total study duration |
t1 |
Delayed duration |
The length and order of effect_p must be the same as HR. Both of these vectors
should contain information only for the groups of responders. For example, if there are
full responders and partial responders, then effect_p and HR would be vectors
of length two.
A data frame with columns:
| Name | Description |
| id | id variable |
| trt | treatment allocation: 1 = treatment arm |
| D1 | patient's response status for group 1 |
| D2 | patient's response status for group 2 |
| Dm | patient's response status for non-responders |
| tau | total study duration |
| enroll_time | patients' enrollment times |
| time_to_event | patients' event times |
| event_status | censoring indicator |
| X | observational time |
| t1 | delayed duration |
Zhenzhen Xu <Zhenzhen.Xu@fda.hhs.gov>, Yongsoek Park <yongpark@pitt.edu> and Bin Zhu <bin.zhu@nih.gov>
data <- generate_data()
data[1:5, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.