surv_est {CIMPLE}R Documentation

Coefficient estimation in the survival model with longitudinal measurements.

Description

This function offers a collection of methods of coefficient estimation in a survival model with a longitudinally measured predictor. These methods include Cox proportional hazard model with time-varying covariates (cox), Joint modeling the longitudinal and disease diagnosis processes (JMLD), Joint modeling the longitudinal and disease diagnosis processes with an adjustment for the historical number of visits in the longitudinal model (VA_JMLD), Cox proportional hazard model with time-varying covariates after imputation (Imputation_Cox), Cox proportional hazard model with time-varying covariates after imputation with an adjustment for the historical number of visits in the longitudinal model (VAImputation_Cox).

Usage

surv_est(
  long_data,
  surv_data,
  method,
  id_var,
  time = NULL,
  survTime = NULL,
  survEvent = NULL,
  LM_fixedEffect_variables = NULL,
  LM_randomEffect_variables = NULL,
  SM_timeVarying_variables = NULL,
  SM_timeInvariant_variables = NULL,
  imp_time_factor = NULL
)

Arguments

long_data

Longitudinal dataset.

surv_data

Survival dataset.

method

The following methods are available:

  • cox: Cox proportional hazard model with time-varying covariates.

  • JMLD: Joint modeling the longitudinal and disease diagnosis processes.

  • VA_JMLD: Joint modeling the longitudinal and disease diagnosis processes with an adjustment for the historical number of visits in the longitudinal model.

  • Imputation_Cox: Cox proportional hazard model with time-varying covariates after imputation.

  • VAImputation_Cox: Cox proportional hazard model with time-varying covariates after imputation with an adjustment for the historical number of visits in the longitudinal model.

id_var

Variable for the subject ID to indicate the grouping structure.

time

Variable for the observational time.

survTime

Variable for the survival time.

survEvent

Variable for the survival event.

LM_fixedEffect_variables

Vector input of variable names with fixed effects in the longitudinal model. Variables should not contain time.

LM_randomEffect_variables

Vector input of variable names with random effects in the longitudinal model.

SM_timeVarying_variables

Vector input of variable names for time-varying variables in the survival model.

SM_timeInvariant_variables

Vector input of variable names for time-invariant variables in the survival model.

imp_time_factor

Scale factor for the time variable. This argument is only needed in the imputation-based methods, e.g., Imputation_Cox and VAImputation_Cox. The default is NULL (no scale).

Value

alpha_hat: Estimated coefficients for the survival model.

Other output in each method:

References

Rizopoulos, D. (2010). Jm: An r package for the joint modelling of longitudinal and time-to-event data. Journal of statistical software, 35:1–33.

Rizopoulos, D. (2012b). Joint models for longitudinal and time-to-event data: With applications in R. CRC press.

Examples

# Setup arguments

id_var = "id"
time = "time"
survTime = "D"
survEvent = "d"
LM_fixedEffect_variables = c("Age","Sex","SNP")
LM_randomEffect_variables = c("SNP")
SM_timeVarying_variables = c("Y")
SM_timeInvariant_variables = c("Age","Sex","SNP")
imp_time_factor = 1

# Run the cox model
fit_cox = surv_est(surv_data = surv_data,
                   long_data = long_data,
                   method = "cox",
                   id_var = id_var,
                   time = time,
                   survTime = survTime,
                   survEvent = survEvent,
                   LM_fixedEffect_variables = LM_fixedEffect_variables,
                   LM_randomEffect_variables = LM_randomEffect_variables,
                   SM_timeVarying_variables = SM_timeVarying_variables,
                   SM_timeInvariant_variables = SM_timeInvariant_variables,
                   imp_time_factor = imp_time_factor)
# Return the coefficient estimates
fit_cox$alpha_hat

[Package CIMPLE version 0.1.0 Index]