Censor events given a fixed dropout rate
censordata(simdata,lambda,gamma, dropoutrate,ebx=1,gammac=1,groupfreq=1,
censordist='exponential',timeinterval=NULL,HRPW=FALSE)
Simulated event dataset
lambda for event hazard function
gamma for event hazard function
Patient dropout rate with range [0,1). If dropoutrate contains only one number. The program will control the dropout rate at population level(treatment + control). If dropoutrate contains two numbers (ie. c(0.2,0.1)), the program will control the dropout rate of control and treatment arm seperately, with the first dropout rate number for control and the second number for treatment. Default value is "0" (no dropout)
exp(beta*x), if there's no covariates, ebx=1.
frequence of each level of ebx value
time intervals for piecewise baseline hazard function
gamma for censor hazard function. Default is 1 (exponential)
censor hazard distribution. Default is exponential
Indicator of piecewise hazard ratios. TURE for piecewise. FALSE for non piecewise