simData4iCoxph: Simulated Survival Data with Uncertain Records

Description Usage Arguments Details Value Examples

View source: R/simData4iCoxph.R

Description

Generate survival data with uncertain records. An integrative Cox model can be fitted for the simulated data by function iCoxph.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
simData4iCoxph(
  nSubject = 1000,
  beta0Vec,
  xMat,
  maxNum = 2,
  nRecordProb = c(0.9, 0.1),
  matchCensor = 0.1,
  matchEvent = 0.1,
  censorMin = 0.5,
  censorMax = 12.5,
  lambda = 0.005,
  rho = 0.7,
  fakeLambda1 = lambda * exp(-3),
  fakeRho1 = rho,
  fakeLambda2 = lambda * exp(3),
  fakeRho2 = rho,
  mixture = 0.5,
  randomMiss = TRUE,
  eventOnly = FALSE,
  ...
)

Arguments

nSubject

Number of subjects.

beta0Vec

Time-invariant covariate coefficients.

xMat

Design matrix. By default, three continuous variables following standard normal distribution and one binary variable following Bernoulli distribution with equal probability are used.

maxNum

Maximum number of uncertain records.

nRecordProb

Probability of the number of uncertain records.

matchCensor

The matching rate for subjects actually having censoring times.

matchEvent

The matching rate for subjects actually having event times.

censorMin

The lower boundary of the uniform distribution for generating censoring time.

censorMax

The upper boundary of the uniform distribution for generating censoring time.

lambda

A positive number, scale parameter in baseline rate function for true event times.

rho

A positive number, shape parameter in baseline rate function for true event times.

fakeLambda1

A positive number, scale parameter in baseline rate function for fake event times from one distribution.

fakeRho1

A positive number, shape parameter in baseline rate function for fake event times from one distribution.

fakeLambda2

A positive number, scale parameter in baseline rate function for fake event times from another distribution.

fakeRho2

A positive number, shape parameter in baseline rate function for fake event times from another distribution.

mixture

The mixture weights, i.e., the probabilities (summing up to one) of fake event times coming from different mixture components.

randomMiss

A logical value specifying whether the labels of the true records are missing completely at random (MCAR) or missing not at random (MNAR). The default value is TRUE for MCAR.

eventOnly

A logical value specifying whether the uncertain records only include possible events. The default value is FALSE, which considers the censoring cases as the possible truth in addition to event records.

...

Other arguments for future usage.

Details

The event times are simulated from a Weibull proportional hazard model of given shape and baseline scale. The censoring times follow uniform distribution of specified boundaries.

Value

A data frame with the following columns,

and the corresponding covariates.

Examples

1
## See examples of function iCoxph

intsurv documentation built on Jan. 13, 2021, 3:46 p.m.