nearValue: Nearest Value Method

View source: R/nearValue.R

nearValueR Documentation

Nearest Value 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 parameters are estimated using the nearest value to imputate missing values.

Usage

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

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.

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.

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, lastValue

Examples

 data(SurvLongData)
 # A truncated dataset to keep example run time brief
 exp <- nearValue(X = X[1:100,], Z = Z, tau = 1.0)


SurvLong documentation built on Oct. 1, 2023, 1:06 a.m.

Related to nearValue in SurvLong...