simData4iCoxph function

Simulated Survival Data with Uncertain Records

Simulated Survival Data with Uncertain Records

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

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.

Returns

A data frame with the following columns,

  • ID: subject ID
  • time: observed event times
  • event: event indicators
  • isTure: latent labels indicating the true records

and the corresponding covariates.

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.

Examples

## See examples of function iCoxph