I would like to simulate survival meta-analysis in clinical trials on R but I'm not pretty sure of what would be the best way to do it and what would be fitting more the reality. The data would include a random treatment effect.
I made an attempt (inspired by the article "Individual patient data meta-analysis of survival data using Poisson regression models" Crowther and al.).
After simulating n patients, allocated in k trials (each trial is divided in 50% assigned to treatment, 50% assigned to control), I have simulated :
- k beta1; beta1 being the coefficient associated with the treatment effect (coming from a Normal distribution, the mean of it being the mean log HR and the standard error being the random effect)
- (k-1) beta0; beta0 being the coefficient associated with the trial effect (coming from a Normal distribution, the mean of it being 0 and the standard error being the trial effect). The beta0 for the trial number 1 equals 0.
The survival times are then taken from a Weibull distribution with the shape = 0.5 (for example) and the scale = exp(beta0_j+beta1_j*z_arm_j) (j being the number of the trial).
z_arm is the covariate associated with the arm, equals to -0.5 or 0.5.
What do you think of this ? Does this seem ok ?
Thanks for any help !