Skip to contents

Convenience over morie_cox_dfbeta_influence for when there is no fit in hand yet. The arithmetic is identical.

Usage

morie_dfbeta_cox(time, event, X, ties = c("efron", "breslow"))

Arguments

time

follow-up times, non-negative.

event

1 for an event, 0 for right-censored.

X

covariate matrix, one row per subject.

ties

"efron" or "breslow".

Value

list with dfbeta, dfbetas, score_residuals, beta, se.

References

Cain, K. C. and Lange, N. T. (1984). Approximate case influence for the proportional hazards regression model with censored data. Biometrics, 40(2), 493-499.

Examples

set.seed(1)
X <- matrix(rnorm(60), ncol = 1)
tt <- rexp(60, exp(X * 0.5))
dim(morie_dfbeta_cox(tt, rep(1, 60), X)$dfbeta)
#> [1] 60  1