Skip to contents

Per-occurrence marginal Cox models on the total-time scale plus the common-effect summary: the stratified fit with a single beta across occurrence strata (WLW Section 3).

Usage

Wlwmm(time, event, X, occurrence, max_iter = 50L, tol = 1e-09)

Arguments

time

Total time on study for each row.

event

1 if the row's occurrence was observed, else 0.

X

Covariate matrix, one row per (subject, occurrence).

occurrence

Occurrence number of each row.

max_iter, tol

Newton-Raphson controls.

Value

List with estimate (common beta), se, cov, per_event_beta (named list), loglik, n_iter, n_events, method.

References

Wei, L. J., Lin, D. Y. and Weissfeld, L. (1989), JASA 84(408), 1065-1073.

Examples

set.seed(1)
occ <- rep(1:3, times = 20)
stop <- occ * 10 - runif(60, 0, 3)
event <- rbinom(60, 1, 0.6)
X <- matrix(rnorm(60 * 2), 60, 2)
fit <- Wlwmm(time = stop, event, X, occurrence = occ)
is.list(fit)
#> [1] TRUE