generate_data {transmdl} | R Documentation |
Generate data for simulation.
Description
Generate observed event times, covariates and other data used for simulations in the paper.
Usage
generate_data(n, alpha, rho, beta_true, now_repeat = 1)
Arguments
n |
number of subjects |
alpha |
parameter in transformation function |
rho |
parameter in baseline cumulative hazard function |
beta_true |
parameter |
now_repeat |
number of duplication of simulation |
Details
The survival function for of the
th observation takes
the form
The failure time can be generated by
Value
a list containing
X | design matrix | ||
beta_X | |
||
Y | observed event time | ||
References
Abramowitz, M., and Stegun, I.A. (1972). Handbook of Mathematical Functions (9th ed.). Dover Publications, New York. +- Evans, M. and Swartz, T. (2000). Approximating Integrals via Monte Carlo and Deterministic Methods. Oxford University Press.
Liu, Q. and Pierce, D.A. (1994). A note on Gauss-Hermite quadrature. Biometrika 81: 624-629.
Examples
generate_data(200,0.5,1,c(0.5,-1))
[Package transmdl version 0.1.0 Index]