Compute jackknife pseudo values.
jackknife(object, times, cause, keepResponse = FALSE, ...)
Object of class "prodlim"
.
Time points at which to compute pseudo values.
Character (other classes are converted with as.character
).
For competing risks the cause of failure.
If TRUE
add the model response,
i.e. event time, event status, etc. to the result.
not used
Compute jackknife pseudo values based on marginal Kaplan-Meier estimate of survival, or based on marginal Aalen-Johansen estimate of the absolute risks, i.e., the cumulative incidence function.
The R-package pseudo does a similar job, and appears to be a little faster in small samples, but much slower in large samples. See examples.
Andersen PK & Perme MP (2010). Pseudo-observations in survival analysis Statistical Methods in Medical Research, 19(1), 71-99.
## pseudo-values for survival models
d=SimSurv(20)
f=prodlim(Hist(time,status)~1,data=d)
jackknife(f,times=c(3,5))
#> t.3 t.5
#> [1,] 1.00292398 1.07543860
#> [2,] 1.00292398 1.07543860
#> [3,] 1.00292398 0.62682749
#> [4,] 1.00292398 -0.12085770
#> [5,] 1.00292398 -0.12085770
#> [6,] 1.00292398 0.62682749
#> [7,] 1.00292398 1.07543860
#> [8,] 1.00292398 1.07543860
#> [9,] -0.05263158 -0.03289474
#> [10,] 1.00292398 -0.12085770
#> [11,] 1.00292398 1.07543860
#> [12,] 0.94736842 0.59210526
#> [13,] 1.00292398 1.07543860
#> [14,] 1.00292398 -0.12085770
#> [15,] 1.00292398 -0.12085770
#> [16,] 1.00292398 1.07543860
#> [17,] 1.00292398 1.07543860
#> [18,] 1.00292398 1.07543860
#> [19,] 1.00292398 1.07543860
#> [20,] 1.00292398 -0.12085770
## in some situations it may be useful to attach the
## the event time history to the result
jackknife(f,times=c(3,5),keepResponse=TRUE)
#> time status t.3 t.5
#> 1 8.3733291 0 1.00292398 1.07543860
#> 2 6.3113508 0 1.00292398 1.07543860
#> 3 2.4223027 0 1.00292398 0.62682749
#> 4 4.4298022 1 1.00292398 -0.12085770
#> 5 3.3867492 1 1.00292398 -0.12085770
#> 6 2.8236380 0 1.00292398 0.62682749
#> 7 7.2982135 0 1.00292398 1.07543860
#> 8 8.6753027 1 1.00292398 1.07543860
#> 9 2.3606305 1 -0.05263158 -0.03289474
#> 10 3.0289986 1 1.00292398 -0.12085770
#> 11 5.1295880 1 1.00292398 1.07543860
#> 12 0.8597892 0 0.94736842 0.59210526
#> 13 5.2091699 1 1.00292398 1.07543860
#> 14 3.1786010 1 1.00292398 -0.12085770
#> 15 3.7554212 1 1.00292398 -0.12085770
#> 16 5.2177661 1 1.00292398 1.07543860
#> 17 6.7018274 0 1.00292398 1.07543860
#> 18 7.9438634 0 1.00292398 1.07543860
#> 19 8.3566475 1 1.00292398 1.07543860
#> 20 3.2835813 1 1.00292398 -0.12085770
# pseudo-values for competing risk models
set.seed(15)
d=SimCompRisk(15)
f=prodlim(Hist(time,event)~1,data=d)
jackknife(f,times=c(3,5),cause=1)
#> t.3 t.5
#> [1,] -2.380952e-02 -4.761905e-02
#> [2,] 8.881784e-16 0.000000e+00
#> [3,] -2.380952e-02 -4.761905e-02
#> [4,] -2.380952e-02 -4.761905e-02
#> [5,] 1.142857e+00 1.119048e+00
#> [6,] 8.881784e-16 1.776357e-15
#> [7,] -2.380952e-02 1.119048e+00
#> [8,] 1.000000e+00 1.000000e+00
#> [9,] 1.428571e-01 2.857143e-01
#> [10,] 1.000000e+00 1.000000e+00
#> [11,] 1.000000e+00 1.000000e+00
#> [12,] -2.380952e-02 -4.761905e-02
#> [13,] 1.000000e+00 1.000000e+00
#> [14,] -2.380952e-02 -4.761905e-02
#> [15,] 1.000000e+00 1.000000e+00
jackknife(f,times=c(1,3,5),cause=2)
#> t.1 t.3 t.5
#> [1,] 0 4.440892e-16 4.440892e-16
#> [2,] 1 1.000000e+00 1.000000e+00
#> [3,] 0 4.440892e-16 4.440892e-16
#> [4,] 0 4.440892e-16 4.440892e-16
#> [5,] 0 4.440892e-16 4.440892e-16
#> [6,] 0 1.000000e+00 1.000000e+00
#> [7,] 0 4.440892e-16 4.440892e-16
#> [8,] 0 4.440892e-16 4.440892e-16
#> [9,] 0 4.440892e-16 4.440892e-16
#> [10,] 0 4.440892e-16 4.440892e-16
#> [11,] 0 4.440892e-16 4.440892e-16
#> [12,] 0 4.440892e-16 4.440892e-16
#> [13,] 0 4.440892e-16 4.440892e-16
#> [14,] 0 4.440892e-16 4.440892e-16
#> [15,] 0 4.440892e-16 4.440892e-16