GenerateData {landmix}R Documentation

Generate data

Description

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

Usage

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

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

simu.setting

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.

covariate.dependent

logical indicator. If TRUE, then the survival times depend on covariates.

Value

Returns a list containing


[Package landmix version 1.0 Index]