Skip to contents

Kalbfleisch put a gamma process \( ~ GP(c, H_0)\) on the baseline cumulative hazard and left the regression coefficient unconstrained. The posterior-mean increment at an observed event time pools the prior increment and the observed count by their weights, \(dH(t_k) = (c dH_0(t_k) + dN_k) / (c + sum_{j in R_k} exp(x_j'b))\), with \(_k\) the risk set. As c -> 0 this is exactly the Breslow estimator; with b = 0 as well it is Nelson-Aalen.

Usage

Npbcox(time, event, X, c = 1, lam0 = NULL, n_iter = 50L, tol = 1e-12)

Arguments

time

Observation times.

event

1 = event, 0 = right-censored.

X

Covariates, no intercept.

c

Gamma-process prior weight; c = 0 gives Breslow.

lam0

Constant base hazard rate; 1 / mean(time) if NULL.

n_iter

Newton iteration cap.

tol

Gradient-norm stopping rule.

Value

List with beta, se, estimate, loglik, times, dH, H, S, grad_norm, iterations, converged, n, n_events, c, lam0.

Details

b maximises the Breslow partial log-likelihood \(l(b) = sum_k [sum_{i in D_k} x_i'b - d_k log sum_{j in R_k} exp(x_j'b)]\), which is concave, so the Newton step is taken against the observed information and no line search is needed

References

Kalbfleisch, J. D. (1978). Non-parametric Bayesian analysis of survival time data. Journal of the Royal Statistical Society Series B, 40(2), 214-221. Cox, D. R. (1972). Regression models and life-tables. JRSS B, 34(2), 187-220.

Examples

Npbcox(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))
#> $beta
#> [1] -29.51193
#> 
#> $se
#> [1] 1276471
#> 
#> $estimate
#> [1] -29.51193
#> 
#> $loglik
#> [1] -5.968559e-13
#> 
#> $times
#> [1] 2 4 5 7
#> 
#> $dH
#> [1] 1.444444 1.444444 1.222222 1.444444
#> 
#> $H
#> [1] 1.444444 2.888889 4.111111 5.555556
#> 
#> $S
#> [1] 1e-15 1e-30 1e-45 1e-60
#> 
#> $grad_norm
#> [1] 6.110668e-13
#> 
#> $iterations
#> [1] 30
#> 
#> $converged
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $n_events
#> [1] 4
#> 
#> $c
#> [1] 1
#> 
#> $lam0
#> [1] 0.2222222
#> 
#> $method
#> [1] "Cox model with a gamma-process baseline (Kalbfleisch 1978)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"