cumulative_coefficients() gives the cumulative regression coefficients of a model whose
effects change over time, at every distinct time, with standard errors and confidence limits.
Usage
cumulative_coefficients(object, ...)
# S3 method for class 'aalen_additive'
cumulative_coefficients(object, conf_level = object$conf_level, ...)Methods (by class)
cumulative_coefficients(aalen_additive): For anaalen_additive()fit, \(B_j(t)\) for the intercept and each covariate, at each distinct event time used. The standard errors are the square roots of the summed squared increments, and the limits are \(B_j(t) \pm z\) standard errors. The table has the columnsterm,time,n_risk,n_event,estimate,std_error,conf_low, andconf_high, one block of rows per term.
Examples
lung <- data.frame(
time = c(306, 455, 1010, 210, 883, 1022, 310, 361, 218, 166, 170, 654, 728, 71, 567),
status = c(2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2),
age = c(74, 68, 56, 57, 60, 74, 68, 71, 53, 61, 57, 68, 68, 60, 57),
sex = c(1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1)
)
fit <- aalen_additive(Surv(time, status) ~ age + sex, data = lung)
cumulative_coefficients(fit)
#> term time n_risk n_event estimate std_error conf_low
#> 1 Intercept 71 15 1 0.340430098 0.340430098 -0.326800634
#> 2 Intercept 166 14 1 0.613040898 0.436129912 -0.241758022
#> 3 Intercept 170 13 1 1.332785449 0.841570863 -0.316663134
#> 4 Intercept 210 12 1 2.184033888 1.197023569 -0.162089195
#> 5 Intercept 218 11 1 3.717754197 1.945549642 -0.095453031
#> 6 Intercept 306 10 1 2.444558321 2.325121749 -2.112596567
#> 7 Intercept 310 9 1 2.368570479 2.326363106 -2.191017424
#> 8 Intercept 361 8 1 1.571822511 2.459018630 -3.247765441
#> 9 Intercept 455 7 1 0.763489178 2.588469703 -4.309818214
#> 10 Intercept 567 6 1 2.526363429 3.131756860 -3.611767224
#> 11 age 71 15 1 -0.002918831 0.002918831 -0.008639634
#> 12 age 166 14 1 -0.004247482 0.003207006 -0.010533098
#> 13 age 170 13 1 -0.013325436 0.009627780 -0.032195538
#> 14 age 210 12 1 -0.024062016 0.014421105 -0.052326863
#> 15 age 218 11 1 -0.045752996 0.026047397 -0.096804955
#> 16 age 306 10 1 -0.019380423 0.037067229 -0.092030857
#> 17 age 310 9 1 -0.022419937 0.037191640 -0.095314212
#> 18 age 361 8 1 -0.014289856 0.038069887 -0.088905464
#> 19 age 455 7 1 0.006543478 0.043397513 -0.078514084
#> 20 age 567 6 1 -0.016211013 0.049001132 -0.112251468
#> 21 sex 71 15 1 -0.069880242 0.069880242 -0.206843000
#> 22 sex 166 14 1 -0.160513250 0.114444704 -0.384820748
#> 23 sex 170 13 1 -0.208330846 0.124032709 -0.451430488
#> 24 sex 210 12 1 -0.264885153 0.136317653 -0.532062843
#> 25 sex 218 11 1 -0.286117873 0.137961338 -0.556517127
#> 26 sex 306 10 1 -0.556077115 0.303168803 -1.150277051
#> 27 sex 310 9 1 -0.288599912 0.404296151 -1.081005807
#> 28 sex 361 8 1 -0.004047066 0.494394276 -0.973042041
#> 29 sex 455 7 1 -0.308213733 0.580467967 -1.445910043
#> 30 sex 567 6 1 -0.415998164 0.590390163 -1.573141620
#> conf_high
#> 1 1.007660830
#> 2 1.467839818
#> 3 2.982234032
#> 4 4.530156972
#> 5 7.530961425
#> 6 7.001713209
#> 7 6.928158381
#> 8 6.391410464
#> 9 5.836796570
#> 10 8.664494083
#> 11 0.002801972
#> 12 0.002038134
#> 13 0.005544665
#> 14 0.004202831
#> 15 0.005298964
#> 16 0.053270011
#> 17 0.050474339
#> 18 0.060325753
#> 19 0.091601040
#> 20 0.079829441
#> 21 0.067082516
#> 22 0.063794249
#> 23 0.034768796
#> 24 0.002292537
#> 25 -0.015718619
#> 26 0.038122821
#> 27 0.503805984
#> 28 0.964947908
#> 29 0.829482577
#> 30 0.741145292