GenerateData: Generate data

Description Usage Arguments Value References

View source: R/GenerateData.R

Description

Produces data from different populations with the probability of belonging to a population. Also produces one discrete covariate and one continuous covariate.

Usage

1
GenerateData(n, p, m, qvs, censoring.rate, simu.setting)

Arguments

n

sample size, must be at least 1.

p

number of populations, must be at least 2.

m

number of different mixture proportions, must be at least 2.

qvs

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.).

censoring.rate

a scalar indicating the censoring proportion. Options are 0 or 40.

simu.setting

Character indicating simulation setting. Options are "Log-Normal-No-Covariates", "Log-Normal-With-Covariates", "HD-No-Covariates","HD-With-Covariates". Setting "Log-Normal-No-Covariates" and "Log-Normal-With-Covariates" refer to simulation setting 1 in Garcia and Parast (2020). "Log-Normal-No-Covariates" means the survival outcomes do NOT depend on the covariates, and "Log-Normal-With-Covariates" means the survival outcomes do depend on the covariates. Setting "HD-No-Covariates" and "HD-With-Covariates" refer to Simulation setting 2 in Garcia and Parast (2020), "HD-No-Covariates" means the survival outcomes do NOT depend on the covariates, and "HD-With-Covariates" means the survival outcomes do depend on the covariates.

Value

Returns a list containing

References

Garcia, T.P. and Parast, L. (2020). Dynamic landmark prediction for mixture data. Biostatistics, doi:10.1093/biostatistics/kxz052.


tpgarcia/stride documentation built on March 18, 2021, 3:42 p.m.