make.data.set: Data matrix for dynamic landmark prediction of mixture data

Description Usage Arguments Value

View source: R/main.R

Description

Create data set based on user input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
make.data.set(
  n,
  m,
  p,
  qvs,
  q,
  x,
  delta,
  ww,
  zz,
  know.true.groups,
  true.group.identifier
)

Arguments

n

sample size, must be at least 1.

m

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

p

number of populations, 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.).

q

a numeric matrix of size p by n containing the mixture proportions for each person in the sample.

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

ww

a numeric vector of length n containing the values of the continuous covariate for each person in the sample. Can be NULL.

zz

a numeric vector of length n containing the values of the discrete covariate for each person in the sample. Can be NULL.

know.true.groups

logical indicator. If TRUE, then we know the population identifier for each person in the sample. This option is only used for simulation studies. Default is FALSE.

true.group.identifier

numeric vector of length n denoting the population identifier for each person in the sample. Default is NULL.

Value

a matrix of the concatenated data. The columns are "x", "delta", "q1" to "qp" (correspond to the mixture proportions), "w" (for ww if non-NULL), "z" (for zz if non-NULL), "uset" (for "u-set" meaning the uth mixture proportion group), and "group" (for the true population group as defined by true.group.identifier). If know.true.groups is FALSE, then the column "group" is a vector of 0's.


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