Produces data from different populations with the probability of belonging to a population. Also produces one discrete covariate and one continuous covariate.
GenerateData(n, p, m, qvs, censoring.rate, simu.setting,
covariate.dependent)Returns a list containing
x: a numeric vector of length n containing the observed event times
for each person in the sample.
delta: a numeric vector of length n that denotes
censoring (1 denotes event is observed, 0 denotes event is censored).
q: a numeric matrix of size p by n containing the
mixture proportions for each person in the sample.
ww: a numeric vector of length n containing the values of the continuous
covariate for each person in the sample.
zz: a numeric vector of length n containing the values of the discrete
covariate for each person in the sample.
true.groups: numeric vector of length n denoting the population identifier for each person in the sample.
sample size, must be at least 1.
number of populations, must be at least 2.
number of different mixture proportions, must be at least 2.
a numeric matrix of size p by m containing all possible
mixture proportions (i.e., the probability of belonging to each population k, k=1,...,p.).
a scalar indicating the censoring proportion. Options are 0 or 50.
Character indicating simulation setting. Options are "1A", "1B", "2A","2B". Setting "1A" and "1B" refer to Simulation setting 1 in the referenced paper, "1A" means the survival outcomes do NOT depend on the covariates, and "1B" means the survival outcomes do depend on the covariates. Setting "2A" and "2B" refer to Simulation setting 2 in the referenced paper, "2A" means the survival outcomes do NOT depend on the covariates, and "2B" means the survival outcomes do depend on the covariates.
logical indicator. If TRUE, then the survival times depend on covariates.