generate.compt {SurvImpute}R Documentation

Simulate competing risks 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.compt(n, beta1, beta2, phi, gamma, seed)

Arguments

n

Sample Size.

beta1

Regression Coefficients for the event of interest process (length of 3)

beta2

Regression Coefficients for the event of competing risk 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.

Examples

# Simulate a data set with approximately 45% censoring, 35% cause 1,
# and 20% causes 2, and half of the subjects with at least one missing covariates.
generate.compt(n = 100, beta1 = c(1,1,-1), beta2 = c(2, 2, -2),
phi= c(-1,-1,-0.5), gamma = c(1,1,1,-1), seed = 112358)

[Package SurvImpute version 0.1.0 Index]