generate.surv {SurvImpute} | R Documentation |
Simulate survival endpoints data where censoring depends on missing covariates.
Description
We are assuming three covariates, two continuous and one binary, where we assume the first continous and the binary covariates have missing values, and the second continuous covariates is fully observed.
Usage
generate.surv(n, beta, phi, gamma, seed)
Arguments
n |
Sample Size. |
beta |
Regression Coefficients for the event process (length of 3). |
phi |
Regression Coefficients for the censoring process (length of 3). |
gamma |
Regression Coefficients for the missingness (length of 3). |
seed |
A random seed for data generation. |
Value
A data frame with missing values. For the delta
column, 0 = censored, and 1 = event.
Examples
# Simulate a data set with approximately 50% censoring
# and 50% of the subjects with at least one missing covariates.
generate.surv(n = 100, beta = c(1,1,-1), phi= c(1,-1,-0.5), gamma = c(3,2,-1), seed = 112358)
[Package SurvImpute version 0.1.0 Index]