Skip to contents

Observed event times define discrete risk intervals; subject i at risk at event time t_k contributes a Bernoulli observation with hazard g^{-1}(alpha_k + beta' x_i). cloglog gives the Prentice-Gloeckler grouped proportional-hazards model, logit gives Cox's discrete proportional-odds model. Klein & Moeschberger (2003), Survival Analysis 2nd ed., Section 8.4.

Usage

Survlnk(time, event, X, link = "cloglog", max_iter = 100L, tol = 1e-10)

Arguments

time

Observed times.

event

Event indicator (1 = event, 0 = censored).

X

Covariate matrix.

"cloglog" or "logit".

max_iter, tol

Newton controls.

Value

List with estimate, se, alpha, event_times, loglik, n_iter, link.

References

Klein, J. P. and Moeschberger, M. L. (2003), Survival Analysis, 2nd ed., Springer, Section 8.4.

Examples

Survlnk(time = c(1, 2, 3, 4, 5, 6, 7, 8), event = c(0, 1, 0, 1, 1, 0, 1, 0),
  X = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] -240.4345
#> 
#> $se
#> [1] 916359.3
#> 
#> $alpha
#> [1]  485.4851  966.3501 1206.7834 1687.6507
#> 
#> $event_times
#> [1] 2 4 5 7
#> 
#> $loglik
#> [1] -1.79996e-11
#> 
#> $n_iter
#> [1] 100
#> 
#> $link
#> [1] "cloglog"
#> 
#> $method
#> [1] "Klein-Moeschberger (2003) sec. 8.4 discrete-time hazard regression"
#>