Learn R Programming

SurvLong (version 1.4)

lastValue: Last Value Carried Forward Method

Description

A simple approach to evaluate the effects of longitudinal covariates on the occurrence of events when the time-dependent covariates are measured intermittently. Regression parameter are estimated using last value carried forward imputation of missing values.

Usage

lastValue(X, Z, tau, tol = 0.001, maxiter = 100L, verbose = TRUE)

Value

A list

  • betaHat: The estimated model coefficients.

  • stdErr: The standard error for each coefficient.

  • zValue: The estimated z-value for each coefficient.

  • pValue: The p-value for each coefficient.

Arguments

X

An object of class data.frame. The structure of the data.frame must be {patient ID, event time, event indicator}. Patient IDs must be of class integer or be able to be coerced to class integer without loss of information. Missing values must be indicated as NA. The event indicator is 1 if the event occurred; 0 if censored.

Z

An object of class data.frame. The structure of the data.frame must be {patient ID, time of measurement, measurement(s)}. Patient IDs must be of class integer or be able to be coerced to class integer without loss of information. Missing values must be indicated as NA.

tau

An object of class numeric. The desired time point.

tol

An object of class numeric. The minimum change in the regression parameters deemed to indicate convergence of the Newton-Raphson method.

maxiter

An object of class integer. The maximum number of iterations used to estimate regression parameters.

verbose

An object of class logical. TRUE results in progress screen prints.

References

Cao H., Churpek M. M., Zeng D., Fine J. P. (2015). Analysis of the proportional hazards model with sparse longitudinal covariates. Journal of the American Statistical Association, 110, 1187-1196.

See Also

fullKernel, halfKernel, nearValue

Examples

Run this code
 data(SurvLongData)
 # A truncated dataset to keep example run time brief
 exp <- lastValue(X = X[1:200,], Z = Z, tau = 1.0)
 

Run the code above in your browser using DataLab