Last updated on 2026-10-22 23:57:00 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.4-3 | 8.03 | 180.08 | 188.11 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.4-3 | 6.32 | 115.78 | 122.10 | OK | |
| r-devel-linux-x86_64-fedora-clang | 0.4-3 | 113.05 | ERROR | |||
| r-devel-linux-x86_64-fedora-gcc | 0.4-3 | 6.00 | 110.62 | 116.62 | ERROR | |
| r-devel-windows-x86_64 | 0.4-3 | 13.00 | 178.00 | 191.00 | OK | |
| r-patched-linux-x86_64 | 0.4-3 | 7.88 | 162.09 | 169.97 | OK | |
| r-release-linux-x86_64 | 0.4-3 | 7.34 | 158.75 | 166.09 | OK | |
| r-release-macos-arm64 | 0.4-3 | 2.00 | 39.00 | 41.00 | OK | |
| r-release-macos-x86_64 | 0.4-3 | 6.00 | 163.00 | 169.00 | OK | |
| r-release-windows-x86_64 | 0.4-3 | 12.00 | 166.00 | 178.00 | OK | |
| r-oldrel-macos-arm64 | 0.4-3 | OK | ||||
| r-oldrel-macos-x86_64 | 0.4-3 | 5.00 | 164.00 | 169.00 | OK | |
| r-oldrel-windows-x86_64 | 0.4-3 | 15.00 | 262.00 | 277.00 | OK |
Version: 0.4-3
Check: tests
Result: ERROR
Running ‘GBSG2-Ex.R’ [33s/38s]
Running ‘regtest-shift-scale.R’
Running ‘regtest-traforest.R’ [18s/18s]
Running ‘regtest-trafotree.R’
Running the tests in ‘tests/GBSG2-Ex.R’ failed.
Complete output:
>
> suppressWarnings(RNGversion("3.5.2"))
>
> library("trtf")
Loading required package: mlt
Loading required package: basefun
Loading required package: variables
Loading required package: partykit
Loading required package: grid
Attaching package: 'grid'
The following object is masked from 'package:variables':
unit
Loading required package: libcoin
Loading required package: mvtnorm
Loading required package: tram
> library("partykit")
> library("survival")
> data("GBSG2", package = "TH.data")
> set.seed(290875)
> ### Make UL and Windooze happy
> options(digits = 5)
>
> yvar <- numeric_var("y", support = c(100, 2000), bounds = c(0, Inf))
> By <- Bernstein_basis(yvar, order = 5, ui = "incre")
> m <- ctm(response = By, todistr = "MinExt")
> GBSG2$y <- with(GBSG2, Surv(time, cens))
>
> ctrl <- ctree_control(splitstat = "quad", teststat = "quad", minsplit = 40, minbucket = 20)
> st2 <- trafotree(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, control = ctrl, data = GBSG2)
>
> coef(st2)
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
3 -3.7203 -0.60359 -0.60359 -0.36105 -0.13307 -0.13307
4 -6.1477 -1.21943 -1.21943 -1.21943 -0.84908 -0.59171
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
7 -2.9301 0.22527 0.22527 0.22527 0.41534 0.62962
> logLik(st2)
'log Lik.' -2571.1 (df=24)
> logLik(st2, newdata = GBSG2)
'log Lik.' -2571.1 (df=24)
>
> predict(st2, newdata = GBSG2[1:3,], type = "node")
1 2 3
4 6 6
> predict(st2, newdata = GBSG2[1:3,], type = "coef")
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
4 -6.1477 -1.21943 -1.21943 -1.21943 -0.84908 -0.59171
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
> predict(st2, newdata = GBSG2[1:3,], type = "hazard")
[,1] [,2] [,3]
[1,] 0.0000e+00 0.00000000 0.00000000
[2,] 2.9353e-05 0.00015119 0.00015119
[3,] 7.8184e-05 0.00030685 0.00030685
[4,] 1.5956e-04 0.00050787 0.00050787
[5,] 2.6013e-04 0.00070891 0.00070891
[6,] 3.5169e-04 0.00085940 0.00085940
[7,] 4.0787e-04 0.00092845 0.00092845
[8,] 4.1869e-04 0.00091453 0.00091453
[9,] 3.9225e-04 0.00083868 0.00083868
[10,] 3.4638e-04 0.00073068 0.00073068
[11,] 2.9897e-04 0.00061774 0.00061774
[12,] 2.6245e-04 0.00051907 0.00051907
[13,] 2.4287e-04 0.00044556 0.00044556
[14,] 2.4126e-04 0.00040207 0.00040207
[15,] 2.5551e-04 0.00039042 0.00039042
[16,] 2.8169e-04 0.00041212 0.00041212
[17,] 3.1448e-04 0.00047070 0.00047070
[18,] 3.4705e-04 0.00057400 0.00057400
[19,] 3.7072e-04 0.00073707 0.00073707
[20,] 3.7479e-04 0.00098692 0.00098692
>
> plot(st2, tp_args = list(type = "survivor"))
>
> class(st2) <- class(st2)[-1L]
> plot(st2)
>
> st1 <- ctree(y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2, control = ctrl)
> plot(st1)
>
> n1 <- predict(st1, type = "node")
> n2 <- predict(st2, type = "node")
>
> table(n1, n2)
n2
n1 3 4 6 7
3 21 227 0 0
4 5 123 0 0
6 2 19 69 54
7 3 33 110 20
>
> tf <- traforest(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2,
+ control = ctree_control(splitstat = "quad", teststat = "quad",
+ testtype = "Teststatistic", mincriterion = 1, minbucket = 50),
+ ntree = 50, trace = FALSE, cores = 1)
>
> w <- predict(tf, newdata = GBSG2[1:3,], type = "weights")
>
> cf <- coef(mlt(m, data = GBSG2))
> coef(m1 <- mlt(m, data = GBSG2, weights = w[,1], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-6.34285 -1.10822 -1.10822 -1.10822 -0.65532 -0.38933
> coef(m2 <- mlt(m, data = GBSG2, weights = w[,2], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.662290 -0.658355 -0.658355 -0.427875 -0.427875 -0.062236
> coef(m3 <- mlt(m, data = GBSG2, weights = w[,3], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.686374 -0.498051 -0.498051 -0.263231 -0.263231 0.074412
>
> layout(matrix(1:3, nr = 1))
> plot(m1, newdata = data.frame(1), type = "survivor")
> plot(m2, newdata = data.frame(1), type = "survivor", add = TRUE)
> plot(m3, newdata = data.frame(1), type = "survivor", add = TRUE)
>
>
> cmod <- coxph(Surv(time, cens) ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2)
>
> plot(survfit(cmod, newdata = GBSG2[1:3,]))
Error in a$specials[[i]] : subscript out of bounds
Calls: plot ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted
Running the tests in ‘tests/regtest-traforest.R’ failed.
Complete output:
>
> suppressWarnings(RNGversion("3.5.2"))
>
> library("trtf")
Loading required package: mlt
Loading required package: basefun
Loading required package: variables
Loading required package: partykit
Loading required package: grid
Attaching package: 'grid'
The following object is masked from 'package:variables':
unit
Loading required package: libcoin
Loading required package: mvtnorm
Loading required package: tram
> library("survival")
> library("partykit")
> data("GBSG2", package = "TH.data")
> set.seed(290875)
> ### Make UL and Windooze happy
> options(digits = 5)
>
> yvar <- numeric_var("y", support = c(100, 2000), bounds = c(0, Inf))
> By <- Bernstein_basis(yvar, order = 5, ui = "incre")
> m <- ctm(response = By, todistr = "MinExt")
> GBSG2$y <- with(GBSG2, Surv(time, cens))
>
> tf <- traforest(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2,
+ control = ctree_control(splitstat = "quad", teststat = "quad",
+ testtype = "Teststatistic", mincriterion = 1, minbucket = 50),
+ ntree = 12, trace = FALSE, cores = 1)
>
> predict(tf, newdata = GBSG2[1:3,], type = "weights")
1 2 3
[1,] 0.098562 0.0000000 0.0000000
[2,] 0.000000 0.0900597 0.0474428
[3,] 0.011765 0.0515449 0.0862935
[4,] 0.033699 0.0221263 0.0221263
[5,] 0.043453 0.0000000 0.0117647
[6,] 0.000000 0.0000000 0.0106383
[7,] 0.084542 0.0298774 0.0144928
[8,] 0.058829 0.0270125 0.0000000
[9,] 0.000000 0.0250039 0.0416706
[10,] 0.015873 0.0524551 0.0267427
[11,] 0.000000 0.0612148 0.0885197
[12,] 0.000000 0.0543763 0.0450146
[13,] 0.013699 0.0144928 0.0268384
[14,] 0.012821 0.0000000 0.0000000
[15,] 0.072299 0.0144928 0.0268384
[16,] 0.011111 0.0000000 0.0000000
[17,] 0.011111 0.0076336 0.0076336
[18,] 0.030633 0.0144928 0.0386031
[19,] 0.032567 0.0000000 0.0000000
[20,] 0.042183 0.0202918 0.0202918
[21,] 0.055004 0.0109890 0.0000000
[22,] 0.063821 0.0000000 0.0123457
[23,] 0.000000 0.0000000 0.0000000
[24,] 0.045852 0.0415053 0.0144928
[25,] 0.000000 0.0140845 0.0247228
[26,] 0.052749 0.0000000 0.0000000
[27,] 0.013333 0.0000000 0.0000000
[28,] 0.032821 0.0000000 0.0140845
[29,] 0.000000 0.0000000 0.0000000
[30,] 0.043932 0.0000000 0.0140845
[31,] 0.000000 0.0000000 0.0000000
[32,] 0.000000 0.0000000 0.0000000
[33,] 0.000000 0.0000000 0.0000000
[34,] 0.041818 0.0000000 0.0140845
[35,] 0.000000 0.0641342 0.0120482
[36,] 0.073255 0.0144928 0.0403420
[37,] 0.015873 0.0326582 0.0126582
[38,] 0.037919 0.0402918 0.0567793
[39,] 0.015152 0.0000000 0.0000000
[40,] 0.013333 0.0916982 0.0553240
[41,] 0.000000 0.0481483 0.0464095
[42,] 0.000000 0.0120482 0.0287149
[43,] 0.000000 0.0000000 0.0000000
[44,] 0.011765 0.0144928 0.0403420
[45,] 0.043453 0.0144928 0.0262575
[46,] 0.100030 0.0000000 0.0258492
[47,] 0.031025 0.0000000 0.0000000
[48,] 0.000000 0.0126582 0.0126582
[49,] 0.034741 0.0823435 0.0482590
[50,] 0.037919 0.0511366 0.0769858
[51,] 0.011765 0.0144928 0.0386031
[52,] 0.000000 0.0000000 0.0000000
[53,] 0.072163 0.0000000 0.0123457
[54,] 0.000000 0.0000000 0.0000000
[55,] 0.012821 0.0320275 0.0461120
[56,] 0.000000 0.0000000 0.0000000
[57,] 0.024585 0.0202918 0.0320565
[58,] 0.000000 0.0126582 0.0126582
[59,] 0.012821 0.0076336 0.0076336
[60,] 0.000000 0.0978673 0.0662394
[61,] 0.000000 0.0594010 0.0500393
[62,] 0.064358 0.0230182 0.0076336
[63,] 0.096276 0.0000000 0.0140845
[64,] 0.000000 0.0000000 0.0106383
[65,] 0.013333 0.0000000 0.0000000
[66,] 0.000000 0.0226169 0.0000000
[67,] 0.012821 0.0076336 0.0076336
[68,] 0.012821 0.0571217 0.0120482
[69,] 0.000000 0.0316279 0.0106383
[70,] 0.000000 0.0270125 0.0000000
[71,] 0.000000 0.0236761 0.0120482
[72,] 0.000000 0.0000000 0.0140845
[73,] 0.000000 0.0471302 0.0637969
[74,] 0.000000 0.0340845 0.0140845
[75,] 0.024585 0.0120482 0.0344512
[76,] 0.000000 0.0383706 0.0267427
[77,] 0.054458 0.0000000 0.0000000
[78,] 0.000000 0.0340072 0.0076336
[79,] 0.000000 0.0270125 0.0106383
[80,] 0.050488 0.0000000 0.0000000
[81,] 0.000000 0.0123457 0.0290123
[82,] 0.000000 0.0263736 0.0000000
[83,] 0.000000 0.0217181 0.0076336
[84,] 0.000000 0.0494674 0.0243939
[85,] 0.000000 0.0461120 0.0320275
[86,] 0.000000 0.0000000 0.0000000
[87,] 0.071797 0.0270125 0.0000000
[88,] 0.000000 0.0276336 0.0076336
[89,] 0.000000 0.0267427 0.0434094
[90,] 0.010526 0.0000000 0.0000000
[91,] 0.000000 0.0394010 0.0500393
[92,] 0.089975 0.0000000 0.0000000
[93,] 0.000000 0.0000000 0.0000000
[94,] 0.055624 0.0000000 0.0258492
[95,] 0.096744 0.0000000 0.0123457
[96,] 0.000000 0.0109890 0.0000000
[97,] 0.000000 0.0267427 0.0267427
[98,] 0.057011 0.0000000 0.0000000
[99,] 0.000000 0.0202918 0.0326375
[100,] 0.011111 0.0000000 0.0000000
[101,] 0.000000 0.0123457 0.0396506
[102,] 0.011111 0.0000000 0.0000000
[103,] 0.000000 0.0337663 0.0337663
[104,] 0.000000 0.0140845 0.0537352
[105,] 0.039011 0.0000000 0.0000000
[106,] 0.000000 0.0140845 0.0166667
[107,] 0.032749 0.0000000 0.0000000
[108,] 0.013333 0.0570521 0.0617749
[109,] 0.070848 0.0000000 0.0258492
[110,] 0.063821 0.0000000 0.0123457
[111,] 0.045535 0.0000000 0.0000000
[112,] 0.053295 0.0263736 0.0000000
[113,] 0.000000 0.0140845 0.0307512
[114,] 0.000000 0.0000000 0.0123457
[115,] 0.000000 0.0649982 0.0556365
[116,] 0.037919 0.0243939 0.0775480
[117,] 0.055043 0.0000000 0.0000000
[118,] 0.013333 0.0000000 0.0000000
[119,] 0.000000 0.0076336 0.0243003
[120,] 0.012821 0.0000000 0.0000000
[121,] 0.000000 0.0000000 0.0000000
[122,] 0.000000 0.0000000 0.0000000
[123,] 0.015152 0.0109890 0.0000000
[124,] 0.000000 0.0000000 0.0000000
[125,] 0.013333 0.0000000 0.0000000
[126,] 0.077739 0.0153846 0.0000000
[127,] 0.000000 0.0126582 0.0126582
[128,] 0.024585 0.0340638 0.0458285
[129,] 0.035624 0.0109890 0.0117647
[130,] 0.000000 0.0109890 0.0000000
[131,] 0.023860 0.0000000 0.0000000
[132,] 0.053295 0.0000000 0.0123457
[133,] 0.015152 0.0226169 0.0000000
[134,] 0.000000 0.0140845 0.0166667
[135,] 0.000000 0.0000000 0.0000000
[136,] 0.010526 0.0000000 0.0000000
[137,] 0.000000 0.0000000 0.0000000
[138,] 0.059185 0.0270125 0.0000000
[139,] 0.000000 0.0000000 0.0000000
[140,] 0.041637 0.0109890 0.0000000
[141,] 0.000000 0.0076336 0.0349386
[142,] 0.065750 0.0000000 0.0000000
[143,] 0.053295 0.0270125 0.0000000
[144,] 0.021637 0.0000000 0.0000000
[145,] 0.027638 0.0000000 0.0117647
[146,] 0.000000 0.0000000 0.0000000
[147,] 0.011111 0.0109890 0.0000000
[148,] 0.000000 0.0144928 0.0409229
[149,] 0.000000 0.0384784 0.0384784
[150,] 0.073114 0.0000000 0.0123457
[151,] 0.000000 0.0316279 0.0000000
[152,] 0.010526 0.0380015 0.0000000
[153,] 0.018868 0.0606255 0.0406255
[154,] 0.000000 0.0217181 0.0217181
[155,] 0.011765 0.0538937 0.0946708
[156,] 0.000000 0.0140845 0.0166667
[157,] 0.039733 0.0000000 0.0000000
[158,] 0.000000 0.0140845 0.0247228
[159,] 0.000000 0.0217181 0.0076336
[160,] 0.000000 0.0340072 0.0076336
[161,] 0.000000 0.0327071 0.0076336
[162,] 0.022876 0.0000000 0.0117647
[163,] 0.012821 0.0247064 0.0494292
[164,] 0.000000 0.0123457 0.0123457
[165,] 0.000000 0.0000000 0.0000000
[166,] 0.000000 0.0387909 0.0494292
[167,] 0.012821 0.0340638 0.0199793
[168,] 0.056123 0.0000000 0.0241104
[169,] 0.000000 0.0120482 0.0287149
[170,] 0.000000 0.0346651 0.0226865
[171,] 0.012821 0.0199793 0.0306176
[172,] 0.000000 0.0243939 0.0614624
[173,] 0.022222 0.0000000 0.0000000
[174,] 0.013333 0.0326375 0.0326375
[175,] 0.000000 0.0000000 0.0000000
[176,] 0.000000 0.0000000 0.0000000
[177,] 0.030633 0.0000000 0.0117647
[178,] 0.041637 0.0000000 0.0000000
[179,] 0.000000 0.0326375 0.0599425
[180,] 0.060204 0.0261207 0.0262575
[181,] 0.039733 0.0000000 0.0000000
[182,] 0.000000 0.0000000 0.0140845
[183,] 0.034741 0.0000000 0.0123457
[184,] 0.060971 0.0144928 0.0262575
[185,] 0.000000 0.0621256 0.0493978
[186,] 0.046154 0.0000000 0.0000000
[187,] 0.000000 0.0384784 0.0491167
[188,] 0.065852 0.0000000 0.0000000
[189,] 0.067282 0.0000000 0.0117647
[190,] 0.000000 0.0337663 0.0196818
[191,] 0.033333 0.0144928 0.0144928
[192,] 0.012821 0.0120482 0.0226865
[193,] 0.000000 0.0217181 0.0076336
[194,] 0.013699 0.0415053 0.0144928
[195,] 0.025098 0.0402172 0.0686486
[196,] 0.043678 0.0126582 0.0250039
[197,] 0.013333 0.0000000 0.0000000
[198,] 0.053295 0.0116279 0.0000000
[199,] 0.000000 0.0309683 0.0306176
[200,] 0.011765 0.0598092 0.0656584
[201,] 0.043347 0.0000000 0.0140845
[202,] 0.000000 0.0109890 0.0123457
[203,] 0.034971 0.0144928 0.0409229
[204,] 0.039733 0.0000000 0.0000000
[205,] 0.011111 0.0000000 0.0000000
[206,] 0.012821 0.0000000 0.0000000
[207,] 0.000000 0.0109890 0.0106383
[208,] 0.065569 0.0109890 0.0000000
[209,] 0.050122 0.0109890 0.0000000
[210,] 0.000000 0.0000000 0.0273050
[211,] 0.064040 0.0000000 0.0000000
[212,] 0.011111 0.0000000 0.0000000
[213,] 0.035336 0.0000000 0.0123457
[214,] 0.040971 0.0805090 0.0581892
[215,] 0.000000 0.0343763 0.0202918
[216,] 0.029572 0.0270125 0.0000000
[217,] 0.000000 0.0000000 0.0000000
[218,] 0.000000 0.0394010 0.0560676
[219,] 0.015873 0.0600887 0.0343763
[220,] 0.015873 0.0000000 0.0000000
[221,] 0.000000 0.0000000 0.0000000
[222,] 0.015152 0.0000000 0.0000000
[223,] 0.000000 0.0000000 0.0000000
[224,] 0.034019 0.0000000 0.0000000
[225,] 0.010526 0.0263736 0.0000000
[226,] 0.000000 0.0000000 0.0000000
[227,] 0.000000 0.0250039 0.0356422
[228,] 0.000000 0.0250039 0.0250039
[229,] 0.015873 0.0000000 0.0000000
[230,] 0.034019 0.0000000 0.0000000
[231,] 0.000000 0.0770899 0.0250039
[232,] 0.000000 0.0109890 0.0000000
[233,] 0.052082 0.0116279 0.0117647
[234,] 0.000000 0.0202918 0.0309301
[235,] 0.000000 0.0000000 0.0000000
[236,] 0.043453 0.0144928 0.0262575
[237,] 0.037919 0.0126582 0.0658124
[238,] 0.000000 0.0123457 0.0264302
[239,] 0.011765 0.0956118 0.0732920
[240,] 0.068583 0.0116279 0.0000000
[241,] 0.020000 0.0144928 0.0144928
[242,] 0.000000 0.0000000 0.0000000
[243,] 0.045900 0.0000000 0.0123457
[244,] 0.000000 0.0461120 0.0443731
[245,] 0.011765 0.0254818 0.0262575
[246,] 0.000000 0.0000000 0.0000000
[247,] 0.040683 0.0076336 0.0199793
[248,] 0.000000 0.0000000 0.0106383
[249,] 0.000000 0.0186226 0.0076336
[250,] 0.000000 0.0076336 0.0076336
[251,] 0.029394 0.0000000 0.0000000
[252,] 0.012821 0.0109890 0.0000000
[253,] 0.011111 0.0226169 0.0000000
[254,] 0.012821 0.0656294 0.1070188
[255,] 0.055043 0.0000000 0.0000000
[256,] 0.012821 0.0076336 0.0076336
[257,] 0.000000 0.0408272 0.0267427
[258,] 0.000000 0.0000000 0.0000000
[259,] 0.013333 0.0000000 0.0000000
[260,] 0.000000 0.0076336 0.0076336
[261,] 0.018868 0.0408272 0.0267427
[262,] 0.000000 0.0329500 0.0602550
[263,] 0.000000 0.0116279 0.0000000
[264,] 0.000000 0.0326582 0.0232965
[265,] 0.000000 0.0000000 0.0000000
[266,] 0.000000 0.0116279 0.0000000
[267,] 0.000000 0.0076336 0.0076336
[268,] 0.011111 0.0000000 0.0000000
[269,] 0.000000 0.0076336 0.0076336
[270,] 0.000000 0.0000000 0.0140845
[271,] 0.000000 0.0226169 0.0000000
[272,] 0.000000 0.0402172 0.0384784
[273,] 0.030633 0.0673682 0.0773941
[274,] 0.021637 0.0000000 0.0123457
[275,] 0.024585 0.0271510 0.0389157
[276,] 0.011765 0.0637948 0.0922262
[277,] 0.000000 0.0076336 0.0076336
[278,] 0.011111 0.0000000 0.0000000
[279,] 0.036209 0.0126582 0.0367686
[280,] 0.079009 0.0000000 0.0117647
[281,] 0.058601 0.0270125 0.0000000
[282,] 0.011111 0.0076336 0.0340638
[283,] 0.029206 0.0116279 0.0000000
[284,] 0.000000 0.0140845 0.0247228
[285,] 0.041637 0.0380015 0.0000000
[286,] 0.000000 0.0126582 0.0126582
[287,] 0.000000 0.0380015 0.0000000
[288,] 0.015873 0.0977282 0.0482590
[289,] 0.011111 0.0000000 0.0123457
[290,] 0.013333 0.0666943 0.0196818
[291,] 0.011765 0.0371217 0.0238129
[292,] 0.078829 0.0000000 0.0000000
[293,] 0.029572 0.0261207 0.0144928
[294,] 0.026263 0.0000000 0.0000000
[295,] 0.013699 0.0415053 0.0144928
[296,] 0.000000 0.0000000 0.0000000
[297,] 0.012821 0.0196818 0.0504330
[298,] 0.020000 0.0270125 0.0000000
[299,] 0.000000 0.0546651 0.0120482
[300,] 0.026263 0.0000000 0.0000000
[301,] 0.000000 0.0076336 0.0182719
[302,] 0.071617 0.0000000 0.0117647
[303,] 0.013333 0.0852211 0.0634823
[304,] 0.000000 0.0271510 0.0668016
[305,] 0.000000 0.0123457 0.0229840
[306,] 0.045022 0.0000000 0.0000000
[307,] 0.000000 0.0263736 0.0000000
[308,] 0.015873 0.0000000 0.0000000
[309,] 0.000000 0.0264302 0.0264302
[310,] 0.031025 0.0000000 0.0000000
[311,] 0.011111 0.0116279 0.0000000
[312,] 0.041637 0.0000000 0.0000000
[313,] 0.012821 0.0243939 0.0551450
[314,] 0.011765 0.0570521 0.0594551
[315,] 0.042876 0.0000000 0.0117647
[316,] 0.000000 0.0109890 0.0000000
[317,] 0.013333 0.0340638 0.0630761
[318,] 0.000000 0.0358026 0.0217181
[319,] 0.044444 0.0000000 0.0000000
[320,] 0.000000 0.0000000 0.0000000
[321,] 0.000000 0.0217181 0.0076336
[322,] 0.000000 0.0264302 0.0123457
[323,] 0.000000 0.0390884 0.0416706
[324,] 0.011111 0.0000000 0.0000000
[325,] 0.055556 0.0000000 0.0000000
[326,] 0.000000 0.0217181 0.0243003
[327,] 0.000000 0.0076336 0.0076336
[328,] 0.000000 0.0000000 0.0000000
[329,] 0.000000 0.0116279 0.0000000
[330,] 0.000000 0.0000000 0.0000000
[331,] 0.000000 0.0828151 0.0217181
[332,] 0.000000 0.0217181 0.0076336
[333,] 0.032567 0.0253165 0.0376621
[334,] 0.039596 0.0000000 0.0000000
[335,] 0.080279 0.0000000 0.0123457
[336,] 0.000000 0.0126582 0.0126582
[337,] 0.000000 0.0000000 0.0000000
[338,] 0.000000 0.0226169 0.0000000
[339,] 0.013333 0.0000000 0.0000000
[340,] 0.000000 0.0000000 0.0000000
[341,] 0.000000 0.0000000 0.0229840
[342,] 0.023347 0.0000000 0.0000000
[343,] 0.000000 0.0217181 0.0076336
[344,] 0.000000 0.0468328 0.0882222
[345,] 0.054458 0.0000000 0.0140845
[346,] 0.012821 0.0320482 0.0367710
[347,] 0.000000 0.0000000 0.0000000
[348,] 0.011765 0.0721549 0.0780041
[349,] 0.000000 0.0593582 0.0229840
[350,] 0.037778 0.0109890 0.0123457
[351,] 0.000000 0.0123457 0.0229840
[352,] 0.000000 0.0270125 0.0000000
[353,] 0.026154 0.0000000 0.0000000
[354,] 0.000000 0.0226169 0.0106383
[355,] 0.039596 0.0202918 0.0202918
[356,] 0.000000 0.0120482 0.0367710
[357,] 0.015873 0.0415053 0.0144928
[358,] 0.021637 0.0000000 0.0000000
[359,] 0.026916 0.0109890 0.0117647
[360,] 0.015873 0.0294691 0.0140845
[361,] 0.000000 0.0000000 0.0000000
[362,] 0.000000 0.0394010 0.0500393
[363,] 0.000000 0.0217181 0.0243003
[364,] 0.000000 0.0109890 0.0000000
[365,] 0.011765 0.0000000 0.0258492
[366,] 0.013333 0.0000000 0.0000000
[367,] 0.013333 0.0343763 0.0510430
[368,] 0.000000 0.0464245 0.0737295
[369,] 0.013333 0.0000000 0.0000000
[370,] 0.000000 0.0408664 0.0144928
[371,] 0.029206 0.0390884 0.0497267
[372,] 0.083596 0.0000000 0.0117647
[373,] 0.011111 0.0000000 0.0123457
[374,] 0.000000 0.0000000 0.0000000
[375,] 0.000000 0.0000000 0.0000000
[376,] 0.083410 0.0116279 0.0000000
[377,] 0.000000 0.0202918 0.0202918
[378,] 0.000000 0.0380015 0.0000000
[379,] 0.000000 0.0000000 0.0000000
[380,] 0.000000 0.0417181 0.0076336
[381,] 0.021637 0.0000000 0.0140845
[382,] 0.011765 0.0461327 0.0626202
[383,] 0.041637 0.0000000 0.0140845
[384,] 0.026154 0.0390884 0.0804779
[385,] 0.000000 0.0270125 0.0000000
[386,] 0.013333 0.0109890 0.0123457
[387,] 0.013699 0.0144928 0.0144928
[388,] 0.013699 0.0000000 0.0000000
[389,] 0.000000 0.0140845 0.0307512
[390,] 0.000000 0.0000000 0.0000000
[391,] 0.000000 0.0464245 0.0490067
[392,] 0.025098 0.0728547 0.0995472
[393,] 0.013333 0.0370521 0.0476904
[394,] 0.000000 0.0153846 0.0000000
[395,] 0.030526 0.0000000 0.0140845
[396,] 0.000000 0.0264302 0.0264302
[397,] 0.036789 0.0000000 0.0123457
[398,] 0.000000 0.0000000 0.0000000
[399,] 0.000000 0.0512808 0.0202918
[400,] 0.000000 0.0000000 0.0000000
[401,] 0.000000 0.0076336 0.0076336
[402,] 0.044546 0.0000000 0.0000000
[403,] 0.099374 0.0000000 0.0117647
[404,] 0.000000 0.0076336 0.0076336
[405,] 0.053431 0.0415053 0.0144928
[406,] 0.011111 0.0000000 0.0000000
[407,] 0.000000 0.0270125 0.0000000
[408,] 0.000000 0.0323400 0.0323400
[409,] 0.000000 0.0126582 0.0399632
[410,] 0.000000 0.0380015 0.0000000
[411,] 0.013333 0.0000000 0.0000000
[412,] 0.000000 0.0343763 0.0616813
[413,] 0.000000 0.0711366 0.0741206
[414,] 0.038143 0.0408664 0.0144928
[415,] 0.000000 0.0787136 0.0429783
[416,] 0.000000 0.0000000 0.0000000
[417,] 0.000000 0.0076336 0.0076336
[418,] 0.011765 0.0247064 0.0505556
[419,] 0.031111 0.0202918 0.0202918
[420,] 0.052749 0.0000000 0.0000000
[421,] 0.000000 0.0202918 0.0309301
[422,] 0.000000 0.0000000 0.0000000
[423,] 0.000000 0.0000000 0.0000000
[424,] 0.000000 0.0000000 0.0106383
[425,] 0.023932 0.0000000 0.0000000
[426,] 0.000000 0.0320275 0.0486941
[427,] 0.012821 0.0000000 0.0000000
[428,] 0.025098 0.0754924 0.0505556
[429,] 0.000000 0.0805090 0.0587702
[430,] 0.055442 0.0144928 0.0386031
[431,] 0.000000 0.0202918 0.0202918
[432,] 0.013333 0.0217181 0.0076336
[433,] 0.000000 0.0076336 0.0076336
[434,] 0.032749 0.0380015 0.0000000
[435,] 0.000000 0.0116279 0.0000000
[436,] 0.023860 0.0270125 0.0000000
[437,] 0.000000 0.0076336 0.0076336
[438,] 0.000000 0.0123457 0.0353297
[439,] 0.000000 0.0200000 0.0106383
[440,] 0.000000 0.0390884 0.0663934
[441,] 0.000000 0.0000000 0.0106383
[442,] 0.012821 0.0000000 0.0000000
[443,] 0.000000 0.0123457 0.0123457
[444,] 0.031111 0.0116279 0.0000000
[445,] 0.011765 0.0633290 0.0564504
[446,] 0.000000 0.0000000 0.0000000
[447,] 0.065781 0.0000000 0.0117647
[448,] 0.000000 0.0000000 0.0000000
[449,] 0.000000 0.0236472 0.0126582
[450,] 0.000000 0.0144928 0.0268384
[451,] 0.067791 0.0109890 0.0000000
[452,] 0.015873 0.0076336 0.0076336
[453,] 0.029572 0.0000000 0.0000000
[454,] 0.047101 0.0000000 0.0241104
[455,] 0.000000 0.0394010 0.0500393
[456,] 0.022222 0.0000000 0.0123457
[457,] 0.012821 0.0000000 0.0140845
[458,] 0.000000 0.0076336 0.0199793
[459,] 0.000000 0.0464245 0.0323400
[460,] 0.034741 0.0261207 0.0144928
[461,] 0.015873 0.1089601 0.0594910
[462,] 0.011765 0.0250039 0.0474069
[463,] 0.053295 0.0380015 0.0000000
[464,] 0.000000 0.0461120 0.0584576
[465,] 0.000000 0.0000000 0.0106383
[466,] 0.024585 0.0202918 0.0320565
[467,] 0.048440 0.0261207 0.0144928
[468,] 0.029572 0.0144928 0.0144928
[469,] 0.000000 0.0123457 0.0229840
[470,] 0.000000 0.0524943 0.0144928
[471,] 0.042222 0.0000000 0.0000000
[472,] 0.000000 0.0000000 0.0106383
[473,] 0.000000 0.0000000 0.0000000
[474,] 0.013333 0.0000000 0.0000000
[475,] 0.000000 0.0000000 0.0000000
[476,] 0.000000 0.0264302 0.0387759
[477,] 0.024585 0.0144928 0.0262575
[478,] 0.000000 0.0711366 0.0370521
[479,] 0.000000 0.0000000 0.0123457
[480,] 0.000000 0.0263736 0.0000000
[481,] 0.011765 0.0347846 0.0465493
[482,] 0.000000 0.0380015 0.0000000
[483,] 0.021637 0.0144928 0.0268384
[484,] 0.000000 0.0376621 0.0543288
[485,] 0.023932 0.0000000 0.0140845
[486,] 0.028485 0.0000000 0.0000000
[487,] 0.018868 0.0347846 0.0514512
[488,] 0.011111 0.0116279 0.0000000
[489,] 0.013699 0.0144928 0.0144928
[490,] 0.012821 0.0000000 0.0000000
[491,] 0.011765 0.0000000 0.0258492
[492,] 0.072270 0.0144928 0.0403420
[493,] 0.000000 0.0000000 0.0000000
[494,] 0.011111 0.0109890 0.0000000
[495,] 0.021637 0.0000000 0.0123457
[496,] 0.000000 0.0000000 0.0000000
[497,] 0.000000 0.0076336 0.0182719
[498,] 0.080101 0.0000000 0.0000000
[499,] 0.079665 0.0109890 0.0117647
[500,] 0.000000 0.0000000 0.0000000
[501,] 0.091866 0.0000000 0.0117647
[502,] 0.010526 0.0000000 0.0000000
[503,] 0.010526 0.0000000 0.0123457
[504,] 0.010526 0.0144928 0.0268384
[505,] 0.000000 0.0243939 0.0410605
[506,] 0.024585 0.0123457 0.0381949
[507,] 0.064109 0.0000000 0.0241104
[508,] 0.011765 0.0247064 0.0735396
[509,] 0.065900 0.0126582 0.0126582
[510,] 0.023860 0.0000000 0.0000000
[511,] 0.011111 0.0000000 0.0123457
[512,] 0.032749 0.0000000 0.0140845
[513,] 0.088881 0.0000000 0.0000000
[514,] 0.000000 0.0126582 0.0232965
[515,] 0.000000 0.0000000 0.0000000
[516,] 0.026263 0.0456351 0.0076336
[517,] 0.000000 0.0000000 0.0106383
[518,] 0.039961 0.0000000 0.0123457
[519,] 0.011111 0.0186226 0.0076336
[520,] 0.000000 0.0706598 0.0232965
[521,] 0.013333 0.0605090 0.0895214
[522,] 0.048440 0.0000000 0.0000000
[523,] 0.054492 0.0144928 0.0262575
[524,] 0.015873 0.0467220 0.0467220
[525,] 0.000000 0.0000000 0.0000000
[526,] 0.048440 0.0116279 0.0000000
[527,] 0.011111 0.0000000 0.0000000
[528,] 0.034741 0.0000000 0.0000000
[529,] 0.038143 0.0000000 0.0123457
[530,] 0.000000 0.0217181 0.0243003
[531,] 0.012821 0.0340638 0.0199793
[532,] 0.036574 0.0202918 0.0320565
[533,] 0.000000 0.0000000 0.0106383
[534,] 0.000000 0.0646857 0.0446857
[535,] 0.000000 0.0263736 0.0000000
[536,] 0.000000 0.0966184 0.0515449
[537,] 0.000000 0.0000000 0.0000000
[538,] 0.060204 0.0116279 0.0117647
[539,] 0.000000 0.0000000 0.0000000
[540,] 0.062588 0.0000000 0.0123457
[541,] 0.032749 0.0153846 0.0000000
[542,] 0.012821 0.0000000 0.0000000
[543,] 0.000000 0.0263736 0.0000000
[544,] 0.000000 0.0264302 0.0264302
[545,] 0.088036 0.0270125 0.0000000
[546,] 0.000000 0.0153846 0.0000000
[547,] 0.012821 0.0000000 0.0000000
[548,] 0.000000 0.0524551 0.0267427
[549,] 0.052749 0.0000000 0.0140845
[550,] 0.000000 0.0140845 0.0247228
[551,] 0.000000 0.0243939 0.0350322
[552,] 0.015873 0.0298774 0.0144928
[553,] 0.013699 0.0144928 0.0144928
[554,] 0.088265 0.0000000 0.0123457
[555,] 0.015873 0.0343763 0.0343763
[556,] 0.012821 0.0243939 0.0516988
[557,] 0.015873 0.0192615 0.0076336
[558,] 0.015873 0.0678508 0.0461120
[559,] 0.000000 0.0337663 0.0363484
[560,] 0.000000 0.0217181 0.0076336
[561,] 0.000000 0.0380015 0.0000000
[562,] 0.000000 0.0126582 0.0232965
[563,] 0.000000 0.0186226 0.0076336
[564,] 0.000000 0.0782933 0.0202918
[565,] 0.049892 0.0000000 0.0000000
[566,] 0.000000 0.0226169 0.0000000
[567,] 0.015873 0.0000000 0.0000000
[568,] 0.000000 0.0000000 0.0000000
[569,] 0.000000 0.0520275 0.0320275
[570,] 0.029206 0.0858035 0.0387909
[571,] 0.010526 0.0000000 0.0000000
[572,] 0.010526 0.0000000 0.0264302
[573,] 0.023932 0.0000000 0.0000000
[574,] 0.000000 0.0202918 0.0202918
[575,] 0.000000 0.0000000 0.0000000
[576,] 0.000000 0.0000000 0.0000000
[577,] 0.000000 0.0000000 0.0123457
[578,] 0.023347 0.0000000 0.0140845
[579,] 0.000000 0.0076336 0.0076336
[580,] 0.000000 0.0000000 0.0000000
[581,] 0.000000 0.0250039 0.0523089
[582,] 0.000000 0.0126582 0.0232965
[583,] 0.042222 0.0000000 0.0000000
[584,] 0.054016 0.0270125 0.0000000
[585,] 0.000000 0.0590827 0.0616649
[586,] 0.010526 0.0263736 0.0000000
[587,] 0.011111 0.0226169 0.0000000
[588,] 0.000000 0.0000000 0.0000000
[589,] 0.000000 0.0000000 0.0000000
[590,] 0.011765 0.0662394 0.0886424
[591,] 0.000000 0.0109890 0.0000000
[592,] 0.031111 0.0076336 0.0076336
[593,] 0.000000 0.0000000 0.0000000
[594,] 0.015152 0.0000000 0.0000000
[595,] 0.026154 0.0000000 0.0140845
[596,] 0.025098 0.0384784 0.0792554
[597,] 0.024585 0.0202918 0.0628077
[598,] 0.015873 0.0116279 0.0000000
[599,] 0.000000 0.0524943 0.0144928
[600,] 0.000000 0.0433347 0.0123457
[601,] 0.000000 0.0000000 0.0273050
[602,] 0.000000 0.0000000 0.0000000
[603,] 0.022876 0.0202918 0.0444022
[604,] 0.011111 0.0000000 0.0000000
[605,] 0.046735 0.0109890 0.0117647
[606,] 0.000000 0.0120482 0.0120482
[607,] 0.015152 0.0000000 0.0000000
[608,] 0.000000 0.0670346 0.0329500
[609,] 0.053295 0.0226169 0.0000000
[610,] 0.000000 0.0000000 0.0000000
[611,] 0.011111 0.0000000 0.0000000
[612,] 0.038027 0.0000000 0.0117647
[613,] 0.023860 0.0000000 0.0000000
[614,] 0.000000 0.0126582 0.0399632
[615,] 0.010526 0.0000000 0.0000000
[616,] 0.018868 0.0000000 0.0123457
[617,] 0.000000 0.0140845 0.0247228
[618,] 0.000000 0.0000000 0.0000000
[619,] 0.011111 0.0000000 0.0000000
[620,] 0.024585 0.0390884 0.0649376
[621,] 0.013333 0.0250039 0.0250039
[622,] 0.000000 0.0000000 0.0000000
[623,] 0.000000 0.0109890 0.0000000
[624,] 0.046082 0.0000000 0.0000000
[625,] 0.012821 0.0553829 0.0350322
[626,] 0.000000 0.0267427 0.0373810
[627,] 0.048669 0.0371097 0.0144928
[628,] 0.000000 0.0000000 0.0000000
[629,] 0.011111 0.0186226 0.0076336
[630,] 0.020000 0.0109890 0.0000000
[631,] 0.021637 0.0000000 0.0000000
[632,] 0.000000 0.0076336 0.0076336
[633,] 0.000000 0.0076336 0.0076336
[634,] 0.000000 0.0202918 0.0202918
[635,] 0.024444 0.0371097 0.0144928
[636,] 0.011765 0.0517466 0.0882342
[637,] 0.021637 0.0000000 0.0000000
[638,] 0.026916 0.0109890 0.0117647
[639,] 0.039011 0.0000000 0.0000000
[640,] 0.000000 0.0116279 0.0000000
[641,] 0.000000 0.0126582 0.0126582
[642,] 0.010526 0.0000000 0.0000000
[643,] 0.049908 0.0000000 0.0258492
[644,] 0.000000 0.0109890 0.0000000
[645,] 0.000000 0.0000000 0.0000000
[646,] 0.011111 0.0000000 0.0000000
[647,] 0.038143 0.0000000 0.0000000
[648,] 0.015152 0.0000000 0.0000000
[649,] 0.012821 0.0109890 0.0000000
[650,] 0.066765 0.0000000 0.0000000
[651,] 0.021637 0.0000000 0.0140845
[652,] 0.000000 0.0000000 0.0000000
[653,] 0.000000 0.0394010 0.0419831
[654,] 0.000000 0.0543763 0.0202918
[655,] 0.021637 0.0116279 0.0000000
[656,] 0.000000 0.0000000 0.0000000
[657,] 0.000000 0.0000000 0.0000000
[658,] 0.040250 0.0000000 0.0381949
[659,] 0.023347 0.0000000 0.0140845
[660,] 0.025098 0.0464245 0.0889404
[661,] 0.033402 0.0000000 0.0241104
[662,] 0.041637 0.0000000 0.0000000
[663,] 0.000000 0.0109890 0.0000000
[664,] 0.024444 0.0000000 0.0000000
[665,] 0.024585 0.0144928 0.0403420
[666,] 0.051072 0.0000000 0.0140845
[667,] 0.011111 0.0263736 0.0000000
[668,] 0.026263 0.0000000 0.0000000
[669,] 0.000000 0.0000000 0.0106383
[670,] 0.013699 0.0000000 0.0000000
[671,] 0.012821 0.0250039 0.0356422
[672,] 0.070964 0.0000000 0.0000000
[673,] 0.041637 0.0000000 0.0000000
[674,] 0.011111 0.0000000 0.0123457
[675,] 0.034971 0.0144928 0.0268384
[676,] 0.011111 0.0000000 0.0123457
[677,] 0.000000 0.0659419 0.0826086
[678,] 0.000000 0.0000000 0.0000000
[679,] 0.000000 0.0735755 0.0718367
[680,] 0.000000 0.0337663 0.0196818
[681,] 0.000000 0.0593802 0.0760469
[682,] 0.000000 0.0000000 0.0000000
[683,] 0.000000 0.0126582 0.0232965
[684,] 0.012821 0.0261327 0.0120482
[685,] 0.048958 0.0000000 0.0117647
[686,] 0.025098 0.0370521 0.0594551
> predict(tf, newdata = GBSG2[1:3,], type = "node")
[[1]]
[1] 10 11 11
[[2]]
[1] 9 2 9
[[3]]
[1] 6 9 10
[[4]]
[1] 8 10 11
[[5]]
[1] 9 10 10
[[6]]
[1] 4 3 9
[[7]]
[1] 9 2 11
[[8]]
[1] 6 11 11
[[9]]
[1] 5 8 8
[[10]]
[1] 5 8 8
[[11]]
[1] 9 13 13
[[12]]
[1] 10 11 11
> (cf <- predict(tf, newdata = GBSG2[1:3,], type = "coef"))
$`1`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-6.41248 -1.09981 -1.09981 -1.09981 -0.77479 -0.46705
$`2`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.396939 -0.777684 -0.777684 -0.388856 -0.340822 -0.094932
$`3`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.793761 -0.599668 -0.599668 -0.331707 -0.196006 0.045225
>
> logLik(tf, newdata = GBSG2[1:3,])
'log Lik.' -24.079 (df=NA)
>
> sapply(1:length(tf$nodes), function(i) logLik(gettree(tf, i)))
[1] -1597.2 -1695.6 -1626.3 -1544.1 -1599.8 -1613.0 -1558.7 -1614.5 -1685.0
[10] -1632.0 -1520.4 -1644.8
>
> varimp(tf)
horTh age menostat tsize tgrade pnodes progrec estrec
-4.1688 1.3406 3.3228 0.7907 2.2123 19.5366 10.2976 8.8829
>
> mod <- mlt(m, data = GBSG2)
> logLik(mod)
'log Lik.' -2618.7 (df=6)
>
> logLik(mod, newdata = GBSG2[1:3,])
'log Lik.' -24.629 (df=NULL)
>
> layout(matrix(1:2, nr = 1))
> coef(mod) <- cf[[1]]
> plot(mod, newdata = data.frame(1), type = "survivor")
> coef(mod) <- cf[[2]]
> plot(mod, newdata = data.frame(1), type = "survivor", add = TRUE)
> coef(mod) <- cf[[3]]
> plot(mod, newdata = data.frame(1), type = "survivor", add = TRUE)
>
> simulate(tf, newdata = GBSG2[1:3,], nsim = 3)
[[1]]
[1] 1136.44 (2000, Inf] 503.29
[[2]]
[1] (2000, Inf] (2000, Inf] 290.26
[[3]]
[1] 925.20 412.52 461.45
>
> cmod <- coxph(Surv(time, cens) ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2)
>
> plot(survfit(cmod, newdata = GBSG2[1:3,]))
Error in a$specials[[i]] : subscript out of bounds
Calls: plot ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.4-3
Check: tests
Result: ERROR
Running ‘GBSG2-Ex.R’ [37s/61s]
Running ‘regtest-shift-scale.R’
Running ‘regtest-traforest.R’ [19s/21s]
Running ‘regtest-trafotree.R’
Running the tests in ‘tests/GBSG2-Ex.R’ failed.
Complete output:
>
> suppressWarnings(RNGversion("3.5.2"))
>
> library("trtf")
Loading required package: mlt
Loading required package: basefun
Loading required package: variables
Loading required package: partykit
Loading required package: grid
Attaching package: 'grid'
The following object is masked from 'package:variables':
unit
Loading required package: libcoin
Loading required package: mvtnorm
Loading required package: tram
> library("partykit")
> library("survival")
> data("GBSG2", package = "TH.data")
> set.seed(290875)
> ### Make UL and Windooze happy
> options(digits = 5)
>
> yvar <- numeric_var("y", support = c(100, 2000), bounds = c(0, Inf))
> By <- Bernstein_basis(yvar, order = 5, ui = "incre")
> m <- ctm(response = By, todistr = "MinExt")
> GBSG2$y <- with(GBSG2, Surv(time, cens))
>
> ctrl <- ctree_control(splitstat = "quad", teststat = "quad", minsplit = 40, minbucket = 20)
> st2 <- trafotree(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, control = ctrl, data = GBSG2)
>
> coef(st2)
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
3 -3.7203 -0.60359 -0.60359 -0.36105 -0.13307 -0.13307
4 -6.1477 -1.21943 -1.21943 -1.21943 -0.84908 -0.59171
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
7 -2.9301 0.22527 0.22527 0.22527 0.41534 0.62962
> logLik(st2)
'log Lik.' -2571.1 (df=24)
> logLik(st2, newdata = GBSG2)
'log Lik.' -2571.1 (df=24)
>
> predict(st2, newdata = GBSG2[1:3,], type = "node")
1 2 3
4 6 6
> predict(st2, newdata = GBSG2[1:3,], type = "coef")
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
4 -6.1477 -1.21943 -1.21943 -1.21943 -0.84908 -0.59171
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
6 -4.2363 -0.42459 -0.42459 -0.16975 -0.16975 0.15230
> predict(st2, newdata = GBSG2[1:3,], type = "hazard")
[,1] [,2] [,3]
[1,] 0.0000e+00 0.00000000 0.00000000
[2,] 2.9353e-05 0.00015119 0.00015119
[3,] 7.8184e-05 0.00030685 0.00030685
[4,] 1.5956e-04 0.00050787 0.00050787
[5,] 2.6013e-04 0.00070891 0.00070891
[6,] 3.5169e-04 0.00085940 0.00085940
[7,] 4.0787e-04 0.00092845 0.00092845
[8,] 4.1869e-04 0.00091453 0.00091453
[9,] 3.9225e-04 0.00083868 0.00083868
[10,] 3.4638e-04 0.00073068 0.00073068
[11,] 2.9897e-04 0.00061774 0.00061774
[12,] 2.6245e-04 0.00051907 0.00051907
[13,] 2.4287e-04 0.00044556 0.00044556
[14,] 2.4126e-04 0.00040207 0.00040207
[15,] 2.5551e-04 0.00039042 0.00039042
[16,] 2.8169e-04 0.00041212 0.00041212
[17,] 3.1448e-04 0.00047070 0.00047070
[18,] 3.4705e-04 0.00057400 0.00057400
[19,] 3.7072e-04 0.00073707 0.00073707
[20,] 3.7479e-04 0.00098692 0.00098692
>
> plot(st2, tp_args = list(type = "survivor"))
>
> class(st2) <- class(st2)[-1L]
> plot(st2)
>
> st1 <- ctree(y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2, control = ctrl)
> plot(st1)
>
> n1 <- predict(st1, type = "node")
> n2 <- predict(st2, type = "node")
>
> table(n1, n2)
n2
n1 3 4 6 7
3 21 227 0 0
4 5 123 0 0
6 2 19 69 54
7 3 33 110 20
>
> tf <- traforest(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2,
+ control = ctree_control(splitstat = "quad", teststat = "quad",
+ testtype = "Teststatistic", mincriterion = 1, minbucket = 50),
+ ntree = 50, trace = FALSE, cores = 1)
>
> w <- predict(tf, newdata = GBSG2[1:3,], type = "weights")
>
> cf <- coef(mlt(m, data = GBSG2))
> coef(m1 <- mlt(m, data = GBSG2, weights = w[,1], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-6.34285 -1.10822 -1.10822 -1.10822 -0.65532 -0.38933
> coef(m2 <- mlt(m, data = GBSG2, weights = w[,2], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.662290 -0.658355 -0.658355 -0.427875 -0.427875 -0.062236
> coef(m3 <- mlt(m, data = GBSG2, weights = w[,3], theta = cf))
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.686374 -0.498051 -0.498051 -0.263231 -0.263231 0.074412
>
> layout(matrix(1:3, nr = 1))
> plot(m1, newdata = data.frame(1), type = "survivor")
> plot(m2, newdata = data.frame(1), type = "survivor", add = TRUE)
> plot(m3, newdata = data.frame(1), type = "survivor", add = TRUE)
>
>
> cmod <- coxph(Surv(time, cens) ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2)
>
> plot(survfit(cmod, newdata = GBSG2[1:3,]))
Error in a$specials[[i]] : subscript out of bounds
Calls: plot ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted
Running the tests in ‘tests/regtest-traforest.R’ failed.
Complete output:
>
> suppressWarnings(RNGversion("3.5.2"))
>
> library("trtf")
Loading required package: mlt
Loading required package: basefun
Loading required package: variables
Loading required package: partykit
Loading required package: grid
Attaching package: 'grid'
The following object is masked from 'package:variables':
unit
Loading required package: libcoin
Loading required package: mvtnorm
Loading required package: tram
> library("survival")
> library("partykit")
> data("GBSG2", package = "TH.data")
> set.seed(290875)
> ### Make UL and Windooze happy
> options(digits = 5)
>
> yvar <- numeric_var("y", support = c(100, 2000), bounds = c(0, Inf))
> By <- Bernstein_basis(yvar, order = 5, ui = "incre")
> m <- ctm(response = By, todistr = "MinExt")
> GBSG2$y <- with(GBSG2, Surv(time, cens))
>
> tf <- traforest(m, formula = y ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2,
+ control = ctree_control(splitstat = "quad", teststat = "quad",
+ testtype = "Teststatistic", mincriterion = 1, minbucket = 50),
+ ntree = 12, trace = FALSE, cores = 1)
>
> predict(tf, newdata = GBSG2[1:3,], type = "weights")
1 2 3
[1,] 0.098562 0.0000000 0.0000000
[2,] 0.000000 0.0900597 0.0474428
[3,] 0.011765 0.0515449 0.0862935
[4,] 0.033699 0.0221263 0.0221263
[5,] 0.043453 0.0000000 0.0117647
[6,] 0.000000 0.0000000 0.0106383
[7,] 0.084542 0.0298774 0.0144928
[8,] 0.058829 0.0270125 0.0000000
[9,] 0.000000 0.0250039 0.0416706
[10,] 0.015873 0.0524551 0.0267427
[11,] 0.000000 0.0612148 0.0885197
[12,] 0.000000 0.0543763 0.0450146
[13,] 0.013699 0.0144928 0.0268384
[14,] 0.012821 0.0000000 0.0000000
[15,] 0.072299 0.0144928 0.0268384
[16,] 0.011111 0.0000000 0.0000000
[17,] 0.011111 0.0076336 0.0076336
[18,] 0.030633 0.0144928 0.0386031
[19,] 0.032567 0.0000000 0.0000000
[20,] 0.042183 0.0202918 0.0202918
[21,] 0.055004 0.0109890 0.0000000
[22,] 0.063821 0.0000000 0.0123457
[23,] 0.000000 0.0000000 0.0000000
[24,] 0.045852 0.0415053 0.0144928
[25,] 0.000000 0.0140845 0.0247228
[26,] 0.052749 0.0000000 0.0000000
[27,] 0.013333 0.0000000 0.0000000
[28,] 0.032821 0.0000000 0.0140845
[29,] 0.000000 0.0000000 0.0000000
[30,] 0.043932 0.0000000 0.0140845
[31,] 0.000000 0.0000000 0.0000000
[32,] 0.000000 0.0000000 0.0000000
[33,] 0.000000 0.0000000 0.0000000
[34,] 0.041818 0.0000000 0.0140845
[35,] 0.000000 0.0641342 0.0120482
[36,] 0.073255 0.0144928 0.0403420
[37,] 0.015873 0.0326582 0.0126582
[38,] 0.037919 0.0402918 0.0567793
[39,] 0.015152 0.0000000 0.0000000
[40,] 0.013333 0.0916982 0.0553240
[41,] 0.000000 0.0481483 0.0464095
[42,] 0.000000 0.0120482 0.0287149
[43,] 0.000000 0.0000000 0.0000000
[44,] 0.011765 0.0144928 0.0403420
[45,] 0.043453 0.0144928 0.0262575
[46,] 0.100030 0.0000000 0.0258492
[47,] 0.031025 0.0000000 0.0000000
[48,] 0.000000 0.0126582 0.0126582
[49,] 0.034741 0.0823435 0.0482590
[50,] 0.037919 0.0511366 0.0769858
[51,] 0.011765 0.0144928 0.0386031
[52,] 0.000000 0.0000000 0.0000000
[53,] 0.072163 0.0000000 0.0123457
[54,] 0.000000 0.0000000 0.0000000
[55,] 0.012821 0.0320275 0.0461120
[56,] 0.000000 0.0000000 0.0000000
[57,] 0.024585 0.0202918 0.0320565
[58,] 0.000000 0.0126582 0.0126582
[59,] 0.012821 0.0076336 0.0076336
[60,] 0.000000 0.0978673 0.0662394
[61,] 0.000000 0.0594010 0.0500393
[62,] 0.064358 0.0230182 0.0076336
[63,] 0.096276 0.0000000 0.0140845
[64,] 0.000000 0.0000000 0.0106383
[65,] 0.013333 0.0000000 0.0000000
[66,] 0.000000 0.0226169 0.0000000
[67,] 0.012821 0.0076336 0.0076336
[68,] 0.012821 0.0571217 0.0120482
[69,] 0.000000 0.0316279 0.0106383
[70,] 0.000000 0.0270125 0.0000000
[71,] 0.000000 0.0236761 0.0120482
[72,] 0.000000 0.0000000 0.0140845
[73,] 0.000000 0.0471302 0.0637969
[74,] 0.000000 0.0340845 0.0140845
[75,] 0.024585 0.0120482 0.0344512
[76,] 0.000000 0.0383706 0.0267427
[77,] 0.054458 0.0000000 0.0000000
[78,] 0.000000 0.0340072 0.0076336
[79,] 0.000000 0.0270125 0.0106383
[80,] 0.050488 0.0000000 0.0000000
[81,] 0.000000 0.0123457 0.0290123
[82,] 0.000000 0.0263736 0.0000000
[83,] 0.000000 0.0217181 0.0076336
[84,] 0.000000 0.0494674 0.0243939
[85,] 0.000000 0.0461120 0.0320275
[86,] 0.000000 0.0000000 0.0000000
[87,] 0.071797 0.0270125 0.0000000
[88,] 0.000000 0.0276336 0.0076336
[89,] 0.000000 0.0267427 0.0434094
[90,] 0.010526 0.0000000 0.0000000
[91,] 0.000000 0.0394010 0.0500393
[92,] 0.089975 0.0000000 0.0000000
[93,] 0.000000 0.0000000 0.0000000
[94,] 0.055624 0.0000000 0.0258492
[95,] 0.096744 0.0000000 0.0123457
[96,] 0.000000 0.0109890 0.0000000
[97,] 0.000000 0.0267427 0.0267427
[98,] 0.057011 0.0000000 0.0000000
[99,] 0.000000 0.0202918 0.0326375
[100,] 0.011111 0.0000000 0.0000000
[101,] 0.000000 0.0123457 0.0396506
[102,] 0.011111 0.0000000 0.0000000
[103,] 0.000000 0.0337663 0.0337663
[104,] 0.000000 0.0140845 0.0537352
[105,] 0.039011 0.0000000 0.0000000
[106,] 0.000000 0.0140845 0.0166667
[107,] 0.032749 0.0000000 0.0000000
[108,] 0.013333 0.0570521 0.0617749
[109,] 0.070848 0.0000000 0.0258492
[110,] 0.063821 0.0000000 0.0123457
[111,] 0.045535 0.0000000 0.0000000
[112,] 0.053295 0.0263736 0.0000000
[113,] 0.000000 0.0140845 0.0307512
[114,] 0.000000 0.0000000 0.0123457
[115,] 0.000000 0.0649982 0.0556365
[116,] 0.037919 0.0243939 0.0775480
[117,] 0.055043 0.0000000 0.0000000
[118,] 0.013333 0.0000000 0.0000000
[119,] 0.000000 0.0076336 0.0243003
[120,] 0.012821 0.0000000 0.0000000
[121,] 0.000000 0.0000000 0.0000000
[122,] 0.000000 0.0000000 0.0000000
[123,] 0.015152 0.0109890 0.0000000
[124,] 0.000000 0.0000000 0.0000000
[125,] 0.013333 0.0000000 0.0000000
[126,] 0.077739 0.0153846 0.0000000
[127,] 0.000000 0.0126582 0.0126582
[128,] 0.024585 0.0340638 0.0458285
[129,] 0.035624 0.0109890 0.0117647
[130,] 0.000000 0.0109890 0.0000000
[131,] 0.023860 0.0000000 0.0000000
[132,] 0.053295 0.0000000 0.0123457
[133,] 0.015152 0.0226169 0.0000000
[134,] 0.000000 0.0140845 0.0166667
[135,] 0.000000 0.0000000 0.0000000
[136,] 0.010526 0.0000000 0.0000000
[137,] 0.000000 0.0000000 0.0000000
[138,] 0.059185 0.0270125 0.0000000
[139,] 0.000000 0.0000000 0.0000000
[140,] 0.041637 0.0109890 0.0000000
[141,] 0.000000 0.0076336 0.0349386
[142,] 0.065750 0.0000000 0.0000000
[143,] 0.053295 0.0270125 0.0000000
[144,] 0.021637 0.0000000 0.0000000
[145,] 0.027638 0.0000000 0.0117647
[146,] 0.000000 0.0000000 0.0000000
[147,] 0.011111 0.0109890 0.0000000
[148,] 0.000000 0.0144928 0.0409229
[149,] 0.000000 0.0384784 0.0384784
[150,] 0.073114 0.0000000 0.0123457
[151,] 0.000000 0.0316279 0.0000000
[152,] 0.010526 0.0380015 0.0000000
[153,] 0.018868 0.0606255 0.0406255
[154,] 0.000000 0.0217181 0.0217181
[155,] 0.011765 0.0538937 0.0946708
[156,] 0.000000 0.0140845 0.0166667
[157,] 0.039733 0.0000000 0.0000000
[158,] 0.000000 0.0140845 0.0247228
[159,] 0.000000 0.0217181 0.0076336
[160,] 0.000000 0.0340072 0.0076336
[161,] 0.000000 0.0327071 0.0076336
[162,] 0.022876 0.0000000 0.0117647
[163,] 0.012821 0.0247064 0.0494292
[164,] 0.000000 0.0123457 0.0123457
[165,] 0.000000 0.0000000 0.0000000
[166,] 0.000000 0.0387909 0.0494292
[167,] 0.012821 0.0340638 0.0199793
[168,] 0.056123 0.0000000 0.0241104
[169,] 0.000000 0.0120482 0.0287149
[170,] 0.000000 0.0346651 0.0226865
[171,] 0.012821 0.0199793 0.0306176
[172,] 0.000000 0.0243939 0.0614624
[173,] 0.022222 0.0000000 0.0000000
[174,] 0.013333 0.0326375 0.0326375
[175,] 0.000000 0.0000000 0.0000000
[176,] 0.000000 0.0000000 0.0000000
[177,] 0.030633 0.0000000 0.0117647
[178,] 0.041637 0.0000000 0.0000000
[179,] 0.000000 0.0326375 0.0599425
[180,] 0.060204 0.0261207 0.0262575
[181,] 0.039733 0.0000000 0.0000000
[182,] 0.000000 0.0000000 0.0140845
[183,] 0.034741 0.0000000 0.0123457
[184,] 0.060971 0.0144928 0.0262575
[185,] 0.000000 0.0621256 0.0493978
[186,] 0.046154 0.0000000 0.0000000
[187,] 0.000000 0.0384784 0.0491167
[188,] 0.065852 0.0000000 0.0000000
[189,] 0.067282 0.0000000 0.0117647
[190,] 0.000000 0.0337663 0.0196818
[191,] 0.033333 0.0144928 0.0144928
[192,] 0.012821 0.0120482 0.0226865
[193,] 0.000000 0.0217181 0.0076336
[194,] 0.013699 0.0415053 0.0144928
[195,] 0.025098 0.0402172 0.0686486
[196,] 0.043678 0.0126582 0.0250039
[197,] 0.013333 0.0000000 0.0000000
[198,] 0.053295 0.0116279 0.0000000
[199,] 0.000000 0.0309683 0.0306176
[200,] 0.011765 0.0598092 0.0656584
[201,] 0.043347 0.0000000 0.0140845
[202,] 0.000000 0.0109890 0.0123457
[203,] 0.034971 0.0144928 0.0409229
[204,] 0.039733 0.0000000 0.0000000
[205,] 0.011111 0.0000000 0.0000000
[206,] 0.012821 0.0000000 0.0000000
[207,] 0.000000 0.0109890 0.0106383
[208,] 0.065569 0.0109890 0.0000000
[209,] 0.050122 0.0109890 0.0000000
[210,] 0.000000 0.0000000 0.0273050
[211,] 0.064040 0.0000000 0.0000000
[212,] 0.011111 0.0000000 0.0000000
[213,] 0.035336 0.0000000 0.0123457
[214,] 0.040971 0.0805090 0.0581892
[215,] 0.000000 0.0343763 0.0202918
[216,] 0.029572 0.0270125 0.0000000
[217,] 0.000000 0.0000000 0.0000000
[218,] 0.000000 0.0394010 0.0560676
[219,] 0.015873 0.0600887 0.0343763
[220,] 0.015873 0.0000000 0.0000000
[221,] 0.000000 0.0000000 0.0000000
[222,] 0.015152 0.0000000 0.0000000
[223,] 0.000000 0.0000000 0.0000000
[224,] 0.034019 0.0000000 0.0000000
[225,] 0.010526 0.0263736 0.0000000
[226,] 0.000000 0.0000000 0.0000000
[227,] 0.000000 0.0250039 0.0356422
[228,] 0.000000 0.0250039 0.0250039
[229,] 0.015873 0.0000000 0.0000000
[230,] 0.034019 0.0000000 0.0000000
[231,] 0.000000 0.0770899 0.0250039
[232,] 0.000000 0.0109890 0.0000000
[233,] 0.052082 0.0116279 0.0117647
[234,] 0.000000 0.0202918 0.0309301
[235,] 0.000000 0.0000000 0.0000000
[236,] 0.043453 0.0144928 0.0262575
[237,] 0.037919 0.0126582 0.0658124
[238,] 0.000000 0.0123457 0.0264302
[239,] 0.011765 0.0956118 0.0732920
[240,] 0.068583 0.0116279 0.0000000
[241,] 0.020000 0.0144928 0.0144928
[242,] 0.000000 0.0000000 0.0000000
[243,] 0.045900 0.0000000 0.0123457
[244,] 0.000000 0.0461120 0.0443731
[245,] 0.011765 0.0254818 0.0262575
[246,] 0.000000 0.0000000 0.0000000
[247,] 0.040683 0.0076336 0.0199793
[248,] 0.000000 0.0000000 0.0106383
[249,] 0.000000 0.0186226 0.0076336
[250,] 0.000000 0.0076336 0.0076336
[251,] 0.029394 0.0000000 0.0000000
[252,] 0.012821 0.0109890 0.0000000
[253,] 0.011111 0.0226169 0.0000000
[254,] 0.012821 0.0656294 0.1070188
[255,] 0.055043 0.0000000 0.0000000
[256,] 0.012821 0.0076336 0.0076336
[257,] 0.000000 0.0408272 0.0267427
[258,] 0.000000 0.0000000 0.0000000
[259,] 0.013333 0.0000000 0.0000000
[260,] 0.000000 0.0076336 0.0076336
[261,] 0.018868 0.0408272 0.0267427
[262,] 0.000000 0.0329500 0.0602550
[263,] 0.000000 0.0116279 0.0000000
[264,] 0.000000 0.0326582 0.0232965
[265,] 0.000000 0.0000000 0.0000000
[266,] 0.000000 0.0116279 0.0000000
[267,] 0.000000 0.0076336 0.0076336
[268,] 0.011111 0.0000000 0.0000000
[269,] 0.000000 0.0076336 0.0076336
[270,] 0.000000 0.0000000 0.0140845
[271,] 0.000000 0.0226169 0.0000000
[272,] 0.000000 0.0402172 0.0384784
[273,] 0.030633 0.0673682 0.0773941
[274,] 0.021637 0.0000000 0.0123457
[275,] 0.024585 0.0271510 0.0389157
[276,] 0.011765 0.0637948 0.0922262
[277,] 0.000000 0.0076336 0.0076336
[278,] 0.011111 0.0000000 0.0000000
[279,] 0.036209 0.0126582 0.0367686
[280,] 0.079009 0.0000000 0.0117647
[281,] 0.058601 0.0270125 0.0000000
[282,] 0.011111 0.0076336 0.0340638
[283,] 0.029206 0.0116279 0.0000000
[284,] 0.000000 0.0140845 0.0247228
[285,] 0.041637 0.0380015 0.0000000
[286,] 0.000000 0.0126582 0.0126582
[287,] 0.000000 0.0380015 0.0000000
[288,] 0.015873 0.0977282 0.0482590
[289,] 0.011111 0.0000000 0.0123457
[290,] 0.013333 0.0666943 0.0196818
[291,] 0.011765 0.0371217 0.0238129
[292,] 0.078829 0.0000000 0.0000000
[293,] 0.029572 0.0261207 0.0144928
[294,] 0.026263 0.0000000 0.0000000
[295,] 0.013699 0.0415053 0.0144928
[296,] 0.000000 0.0000000 0.0000000
[297,] 0.012821 0.0196818 0.0504330
[298,] 0.020000 0.0270125 0.0000000
[299,] 0.000000 0.0546651 0.0120482
[300,] 0.026263 0.0000000 0.0000000
[301,] 0.000000 0.0076336 0.0182719
[302,] 0.071617 0.0000000 0.0117647
[303,] 0.013333 0.0852211 0.0634823
[304,] 0.000000 0.0271510 0.0668016
[305,] 0.000000 0.0123457 0.0229840
[306,] 0.045022 0.0000000 0.0000000
[307,] 0.000000 0.0263736 0.0000000
[308,] 0.015873 0.0000000 0.0000000
[309,] 0.000000 0.0264302 0.0264302
[310,] 0.031025 0.0000000 0.0000000
[311,] 0.011111 0.0116279 0.0000000
[312,] 0.041637 0.0000000 0.0000000
[313,] 0.012821 0.0243939 0.0551450
[314,] 0.011765 0.0570521 0.0594551
[315,] 0.042876 0.0000000 0.0117647
[316,] 0.000000 0.0109890 0.0000000
[317,] 0.013333 0.0340638 0.0630761
[318,] 0.000000 0.0358026 0.0217181
[319,] 0.044444 0.0000000 0.0000000
[320,] 0.000000 0.0000000 0.0000000
[321,] 0.000000 0.0217181 0.0076336
[322,] 0.000000 0.0264302 0.0123457
[323,] 0.000000 0.0390884 0.0416706
[324,] 0.011111 0.0000000 0.0000000
[325,] 0.055556 0.0000000 0.0000000
[326,] 0.000000 0.0217181 0.0243003
[327,] 0.000000 0.0076336 0.0076336
[328,] 0.000000 0.0000000 0.0000000
[329,] 0.000000 0.0116279 0.0000000
[330,] 0.000000 0.0000000 0.0000000
[331,] 0.000000 0.0828151 0.0217181
[332,] 0.000000 0.0217181 0.0076336
[333,] 0.032567 0.0253165 0.0376621
[334,] 0.039596 0.0000000 0.0000000
[335,] 0.080279 0.0000000 0.0123457
[336,] 0.000000 0.0126582 0.0126582
[337,] 0.000000 0.0000000 0.0000000
[338,] 0.000000 0.0226169 0.0000000
[339,] 0.013333 0.0000000 0.0000000
[340,] 0.000000 0.0000000 0.0000000
[341,] 0.000000 0.0000000 0.0229840
[342,] 0.023347 0.0000000 0.0000000
[343,] 0.000000 0.0217181 0.0076336
[344,] 0.000000 0.0468328 0.0882222
[345,] 0.054458 0.0000000 0.0140845
[346,] 0.012821 0.0320482 0.0367710
[347,] 0.000000 0.0000000 0.0000000
[348,] 0.011765 0.0721549 0.0780041
[349,] 0.000000 0.0593582 0.0229840
[350,] 0.037778 0.0109890 0.0123457
[351,] 0.000000 0.0123457 0.0229840
[352,] 0.000000 0.0270125 0.0000000
[353,] 0.026154 0.0000000 0.0000000
[354,] 0.000000 0.0226169 0.0106383
[355,] 0.039596 0.0202918 0.0202918
[356,] 0.000000 0.0120482 0.0367710
[357,] 0.015873 0.0415053 0.0144928
[358,] 0.021637 0.0000000 0.0000000
[359,] 0.026916 0.0109890 0.0117647
[360,] 0.015873 0.0294691 0.0140845
[361,] 0.000000 0.0000000 0.0000000
[362,] 0.000000 0.0394010 0.0500393
[363,] 0.000000 0.0217181 0.0243003
[364,] 0.000000 0.0109890 0.0000000
[365,] 0.011765 0.0000000 0.0258492
[366,] 0.013333 0.0000000 0.0000000
[367,] 0.013333 0.0343763 0.0510430
[368,] 0.000000 0.0464245 0.0737295
[369,] 0.013333 0.0000000 0.0000000
[370,] 0.000000 0.0408664 0.0144928
[371,] 0.029206 0.0390884 0.0497267
[372,] 0.083596 0.0000000 0.0117647
[373,] 0.011111 0.0000000 0.0123457
[374,] 0.000000 0.0000000 0.0000000
[375,] 0.000000 0.0000000 0.0000000
[376,] 0.083410 0.0116279 0.0000000
[377,] 0.000000 0.0202918 0.0202918
[378,] 0.000000 0.0380015 0.0000000
[379,] 0.000000 0.0000000 0.0000000
[380,] 0.000000 0.0417181 0.0076336
[381,] 0.021637 0.0000000 0.0140845
[382,] 0.011765 0.0461327 0.0626202
[383,] 0.041637 0.0000000 0.0140845
[384,] 0.026154 0.0390884 0.0804779
[385,] 0.000000 0.0270125 0.0000000
[386,] 0.013333 0.0109890 0.0123457
[387,] 0.013699 0.0144928 0.0144928
[388,] 0.013699 0.0000000 0.0000000
[389,] 0.000000 0.0140845 0.0307512
[390,] 0.000000 0.0000000 0.0000000
[391,] 0.000000 0.0464245 0.0490067
[392,] 0.025098 0.0728547 0.0995472
[393,] 0.013333 0.0370521 0.0476904
[394,] 0.000000 0.0153846 0.0000000
[395,] 0.030526 0.0000000 0.0140845
[396,] 0.000000 0.0264302 0.0264302
[397,] 0.036789 0.0000000 0.0123457
[398,] 0.000000 0.0000000 0.0000000
[399,] 0.000000 0.0512808 0.0202918
[400,] 0.000000 0.0000000 0.0000000
[401,] 0.000000 0.0076336 0.0076336
[402,] 0.044546 0.0000000 0.0000000
[403,] 0.099374 0.0000000 0.0117647
[404,] 0.000000 0.0076336 0.0076336
[405,] 0.053431 0.0415053 0.0144928
[406,] 0.011111 0.0000000 0.0000000
[407,] 0.000000 0.0270125 0.0000000
[408,] 0.000000 0.0323400 0.0323400
[409,] 0.000000 0.0126582 0.0399632
[410,] 0.000000 0.0380015 0.0000000
[411,] 0.013333 0.0000000 0.0000000
[412,] 0.000000 0.0343763 0.0616813
[413,] 0.000000 0.0711366 0.0741206
[414,] 0.038143 0.0408664 0.0144928
[415,] 0.000000 0.0787136 0.0429783
[416,] 0.000000 0.0000000 0.0000000
[417,] 0.000000 0.0076336 0.0076336
[418,] 0.011765 0.0247064 0.0505556
[419,] 0.031111 0.0202918 0.0202918
[420,] 0.052749 0.0000000 0.0000000
[421,] 0.000000 0.0202918 0.0309301
[422,] 0.000000 0.0000000 0.0000000
[423,] 0.000000 0.0000000 0.0000000
[424,] 0.000000 0.0000000 0.0106383
[425,] 0.023932 0.0000000 0.0000000
[426,] 0.000000 0.0320275 0.0486941
[427,] 0.012821 0.0000000 0.0000000
[428,] 0.025098 0.0754924 0.0505556
[429,] 0.000000 0.0805090 0.0587702
[430,] 0.055442 0.0144928 0.0386031
[431,] 0.000000 0.0202918 0.0202918
[432,] 0.013333 0.0217181 0.0076336
[433,] 0.000000 0.0076336 0.0076336
[434,] 0.032749 0.0380015 0.0000000
[435,] 0.000000 0.0116279 0.0000000
[436,] 0.023860 0.0270125 0.0000000
[437,] 0.000000 0.0076336 0.0076336
[438,] 0.000000 0.0123457 0.0353297
[439,] 0.000000 0.0200000 0.0106383
[440,] 0.000000 0.0390884 0.0663934
[441,] 0.000000 0.0000000 0.0106383
[442,] 0.012821 0.0000000 0.0000000
[443,] 0.000000 0.0123457 0.0123457
[444,] 0.031111 0.0116279 0.0000000
[445,] 0.011765 0.0633290 0.0564504
[446,] 0.000000 0.0000000 0.0000000
[447,] 0.065781 0.0000000 0.0117647
[448,] 0.000000 0.0000000 0.0000000
[449,] 0.000000 0.0236472 0.0126582
[450,] 0.000000 0.0144928 0.0268384
[451,] 0.067791 0.0109890 0.0000000
[452,] 0.015873 0.0076336 0.0076336
[453,] 0.029572 0.0000000 0.0000000
[454,] 0.047101 0.0000000 0.0241104
[455,] 0.000000 0.0394010 0.0500393
[456,] 0.022222 0.0000000 0.0123457
[457,] 0.012821 0.0000000 0.0140845
[458,] 0.000000 0.0076336 0.0199793
[459,] 0.000000 0.0464245 0.0323400
[460,] 0.034741 0.0261207 0.0144928
[461,] 0.015873 0.1089601 0.0594910
[462,] 0.011765 0.0250039 0.0474069
[463,] 0.053295 0.0380015 0.0000000
[464,] 0.000000 0.0461120 0.0584576
[465,] 0.000000 0.0000000 0.0106383
[466,] 0.024585 0.0202918 0.0320565
[467,] 0.048440 0.0261207 0.0144928
[468,] 0.029572 0.0144928 0.0144928
[469,] 0.000000 0.0123457 0.0229840
[470,] 0.000000 0.0524943 0.0144928
[471,] 0.042222 0.0000000 0.0000000
[472,] 0.000000 0.0000000 0.0106383
[473,] 0.000000 0.0000000 0.0000000
[474,] 0.013333 0.0000000 0.0000000
[475,] 0.000000 0.0000000 0.0000000
[476,] 0.000000 0.0264302 0.0387759
[477,] 0.024585 0.0144928 0.0262575
[478,] 0.000000 0.0711366 0.0370521
[479,] 0.000000 0.0000000 0.0123457
[480,] 0.000000 0.0263736 0.0000000
[481,] 0.011765 0.0347846 0.0465493
[482,] 0.000000 0.0380015 0.0000000
[483,] 0.021637 0.0144928 0.0268384
[484,] 0.000000 0.0376621 0.0543288
[485,] 0.023932 0.0000000 0.0140845
[486,] 0.028485 0.0000000 0.0000000
[487,] 0.018868 0.0347846 0.0514512
[488,] 0.011111 0.0116279 0.0000000
[489,] 0.013699 0.0144928 0.0144928
[490,] 0.012821 0.0000000 0.0000000
[491,] 0.011765 0.0000000 0.0258492
[492,] 0.072270 0.0144928 0.0403420
[493,] 0.000000 0.0000000 0.0000000
[494,] 0.011111 0.0109890 0.0000000
[495,] 0.021637 0.0000000 0.0123457
[496,] 0.000000 0.0000000 0.0000000
[497,] 0.000000 0.0076336 0.0182719
[498,] 0.080101 0.0000000 0.0000000
[499,] 0.079665 0.0109890 0.0117647
[500,] 0.000000 0.0000000 0.0000000
[501,] 0.091866 0.0000000 0.0117647
[502,] 0.010526 0.0000000 0.0000000
[503,] 0.010526 0.0000000 0.0123457
[504,] 0.010526 0.0144928 0.0268384
[505,] 0.000000 0.0243939 0.0410605
[506,] 0.024585 0.0123457 0.0381949
[507,] 0.064109 0.0000000 0.0241104
[508,] 0.011765 0.0247064 0.0735396
[509,] 0.065900 0.0126582 0.0126582
[510,] 0.023860 0.0000000 0.0000000
[511,] 0.011111 0.0000000 0.0123457
[512,] 0.032749 0.0000000 0.0140845
[513,] 0.088881 0.0000000 0.0000000
[514,] 0.000000 0.0126582 0.0232965
[515,] 0.000000 0.0000000 0.0000000
[516,] 0.026263 0.0456351 0.0076336
[517,] 0.000000 0.0000000 0.0106383
[518,] 0.039961 0.0000000 0.0123457
[519,] 0.011111 0.0186226 0.0076336
[520,] 0.000000 0.0706598 0.0232965
[521,] 0.013333 0.0605090 0.0895214
[522,] 0.048440 0.0000000 0.0000000
[523,] 0.054492 0.0144928 0.0262575
[524,] 0.015873 0.0467220 0.0467220
[525,] 0.000000 0.0000000 0.0000000
[526,] 0.048440 0.0116279 0.0000000
[527,] 0.011111 0.0000000 0.0000000
[528,] 0.034741 0.0000000 0.0000000
[529,] 0.038143 0.0000000 0.0123457
[530,] 0.000000 0.0217181 0.0243003
[531,] 0.012821 0.0340638 0.0199793
[532,] 0.036574 0.0202918 0.0320565
[533,] 0.000000 0.0000000 0.0106383
[534,] 0.000000 0.0646857 0.0446857
[535,] 0.000000 0.0263736 0.0000000
[536,] 0.000000 0.0966184 0.0515449
[537,] 0.000000 0.0000000 0.0000000
[538,] 0.060204 0.0116279 0.0117647
[539,] 0.000000 0.0000000 0.0000000
[540,] 0.062588 0.0000000 0.0123457
[541,] 0.032749 0.0153846 0.0000000
[542,] 0.012821 0.0000000 0.0000000
[543,] 0.000000 0.0263736 0.0000000
[544,] 0.000000 0.0264302 0.0264302
[545,] 0.088036 0.0270125 0.0000000
[546,] 0.000000 0.0153846 0.0000000
[547,] 0.012821 0.0000000 0.0000000
[548,] 0.000000 0.0524551 0.0267427
[549,] 0.052749 0.0000000 0.0140845
[550,] 0.000000 0.0140845 0.0247228
[551,] 0.000000 0.0243939 0.0350322
[552,] 0.015873 0.0298774 0.0144928
[553,] 0.013699 0.0144928 0.0144928
[554,] 0.088265 0.0000000 0.0123457
[555,] 0.015873 0.0343763 0.0343763
[556,] 0.012821 0.0243939 0.0516988
[557,] 0.015873 0.0192615 0.0076336
[558,] 0.015873 0.0678508 0.0461120
[559,] 0.000000 0.0337663 0.0363484
[560,] 0.000000 0.0217181 0.0076336
[561,] 0.000000 0.0380015 0.0000000
[562,] 0.000000 0.0126582 0.0232965
[563,] 0.000000 0.0186226 0.0076336
[564,] 0.000000 0.0782933 0.0202918
[565,] 0.049892 0.0000000 0.0000000
[566,] 0.000000 0.0226169 0.0000000
[567,] 0.015873 0.0000000 0.0000000
[568,] 0.000000 0.0000000 0.0000000
[569,] 0.000000 0.0520275 0.0320275
[570,] 0.029206 0.0858035 0.0387909
[571,] 0.010526 0.0000000 0.0000000
[572,] 0.010526 0.0000000 0.0264302
[573,] 0.023932 0.0000000 0.0000000
[574,] 0.000000 0.0202918 0.0202918
[575,] 0.000000 0.0000000 0.0000000
[576,] 0.000000 0.0000000 0.0000000
[577,] 0.000000 0.0000000 0.0123457
[578,] 0.023347 0.0000000 0.0140845
[579,] 0.000000 0.0076336 0.0076336
[580,] 0.000000 0.0000000 0.0000000
[581,] 0.000000 0.0250039 0.0523089
[582,] 0.000000 0.0126582 0.0232965
[583,] 0.042222 0.0000000 0.0000000
[584,] 0.054016 0.0270125 0.0000000
[585,] 0.000000 0.0590827 0.0616649
[586,] 0.010526 0.0263736 0.0000000
[587,] 0.011111 0.0226169 0.0000000
[588,] 0.000000 0.0000000 0.0000000
[589,] 0.000000 0.0000000 0.0000000
[590,] 0.011765 0.0662394 0.0886424
[591,] 0.000000 0.0109890 0.0000000
[592,] 0.031111 0.0076336 0.0076336
[593,] 0.000000 0.0000000 0.0000000
[594,] 0.015152 0.0000000 0.0000000
[595,] 0.026154 0.0000000 0.0140845
[596,] 0.025098 0.0384784 0.0792554
[597,] 0.024585 0.0202918 0.0628077
[598,] 0.015873 0.0116279 0.0000000
[599,] 0.000000 0.0524943 0.0144928
[600,] 0.000000 0.0433347 0.0123457
[601,] 0.000000 0.0000000 0.0273050
[602,] 0.000000 0.0000000 0.0000000
[603,] 0.022876 0.0202918 0.0444022
[604,] 0.011111 0.0000000 0.0000000
[605,] 0.046735 0.0109890 0.0117647
[606,] 0.000000 0.0120482 0.0120482
[607,] 0.015152 0.0000000 0.0000000
[608,] 0.000000 0.0670346 0.0329500
[609,] 0.053295 0.0226169 0.0000000
[610,] 0.000000 0.0000000 0.0000000
[611,] 0.011111 0.0000000 0.0000000
[612,] 0.038027 0.0000000 0.0117647
[613,] 0.023860 0.0000000 0.0000000
[614,] 0.000000 0.0126582 0.0399632
[615,] 0.010526 0.0000000 0.0000000
[616,] 0.018868 0.0000000 0.0123457
[617,] 0.000000 0.0140845 0.0247228
[618,] 0.000000 0.0000000 0.0000000
[619,] 0.011111 0.0000000 0.0000000
[620,] 0.024585 0.0390884 0.0649376
[621,] 0.013333 0.0250039 0.0250039
[622,] 0.000000 0.0000000 0.0000000
[623,] 0.000000 0.0109890 0.0000000
[624,] 0.046082 0.0000000 0.0000000
[625,] 0.012821 0.0553829 0.0350322
[626,] 0.000000 0.0267427 0.0373810
[627,] 0.048669 0.0371097 0.0144928
[628,] 0.000000 0.0000000 0.0000000
[629,] 0.011111 0.0186226 0.0076336
[630,] 0.020000 0.0109890 0.0000000
[631,] 0.021637 0.0000000 0.0000000
[632,] 0.000000 0.0076336 0.0076336
[633,] 0.000000 0.0076336 0.0076336
[634,] 0.000000 0.0202918 0.0202918
[635,] 0.024444 0.0371097 0.0144928
[636,] 0.011765 0.0517466 0.0882342
[637,] 0.021637 0.0000000 0.0000000
[638,] 0.026916 0.0109890 0.0117647
[639,] 0.039011 0.0000000 0.0000000
[640,] 0.000000 0.0116279 0.0000000
[641,] 0.000000 0.0126582 0.0126582
[642,] 0.010526 0.0000000 0.0000000
[643,] 0.049908 0.0000000 0.0258492
[644,] 0.000000 0.0109890 0.0000000
[645,] 0.000000 0.0000000 0.0000000
[646,] 0.011111 0.0000000 0.0000000
[647,] 0.038143 0.0000000 0.0000000
[648,] 0.015152 0.0000000 0.0000000
[649,] 0.012821 0.0109890 0.0000000
[650,] 0.066765 0.0000000 0.0000000
[651,] 0.021637 0.0000000 0.0140845
[652,] 0.000000 0.0000000 0.0000000
[653,] 0.000000 0.0394010 0.0419831
[654,] 0.000000 0.0543763 0.0202918
[655,] 0.021637 0.0116279 0.0000000
[656,] 0.000000 0.0000000 0.0000000
[657,] 0.000000 0.0000000 0.0000000
[658,] 0.040250 0.0000000 0.0381949
[659,] 0.023347 0.0000000 0.0140845
[660,] 0.025098 0.0464245 0.0889404
[661,] 0.033402 0.0000000 0.0241104
[662,] 0.041637 0.0000000 0.0000000
[663,] 0.000000 0.0109890 0.0000000
[664,] 0.024444 0.0000000 0.0000000
[665,] 0.024585 0.0144928 0.0403420
[666,] 0.051072 0.0000000 0.0140845
[667,] 0.011111 0.0263736 0.0000000
[668,] 0.026263 0.0000000 0.0000000
[669,] 0.000000 0.0000000 0.0106383
[670,] 0.013699 0.0000000 0.0000000
[671,] 0.012821 0.0250039 0.0356422
[672,] 0.070964 0.0000000 0.0000000
[673,] 0.041637 0.0000000 0.0000000
[674,] 0.011111 0.0000000 0.0123457
[675,] 0.034971 0.0144928 0.0268384
[676,] 0.011111 0.0000000 0.0123457
[677,] 0.000000 0.0659419 0.0826086
[678,] 0.000000 0.0000000 0.0000000
[679,] 0.000000 0.0735755 0.0718367
[680,] 0.000000 0.0337663 0.0196818
[681,] 0.000000 0.0593802 0.0760469
[682,] 0.000000 0.0000000 0.0000000
[683,] 0.000000 0.0126582 0.0232965
[684,] 0.012821 0.0261327 0.0120482
[685,] 0.048958 0.0000000 0.0117647
[686,] 0.025098 0.0370521 0.0594551
> predict(tf, newdata = GBSG2[1:3,], type = "node")
[[1]]
[1] 10 11 11
[[2]]
[1] 9 2 9
[[3]]
[1] 6 9 10
[[4]]
[1] 8 10 11
[[5]]
[1] 9 10 10
[[6]]
[1] 4 3 9
[[7]]
[1] 9 2 11
[[8]]
[1] 6 11 11
[[9]]
[1] 5 8 8
[[10]]
[1] 5 8 8
[[11]]
[1] 9 13 13
[[12]]
[1] 10 11 11
> (cf <- predict(tf, newdata = GBSG2[1:3,], type = "coef"))
$`1`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-6.41248 -1.09981 -1.09981 -1.09981 -0.77479 -0.46705
$`2`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.396939 -0.777684 -0.777684 -0.388856 -0.340822 -0.094932
$`3`
Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y)
-4.793761 -0.599668 -0.599668 -0.331707 -0.196006 0.045225
>
> logLik(tf, newdata = GBSG2[1:3,])
'log Lik.' -24.079 (df=NA)
>
> sapply(1:length(tf$nodes), function(i) logLik(gettree(tf, i)))
[1] -1597.2 -1695.6 -1626.3 -1544.1 -1599.8 -1613.0 -1558.7 -1614.5 -1685.0
[10] -1632.0 -1520.4 -1644.8
>
> varimp(tf)
horTh age menostat tsize tgrade pnodes progrec estrec
-4.1688 1.3406 3.3228 0.7907 2.2123 19.5366 10.2976 8.8829
>
> mod <- mlt(m, data = GBSG2)
> logLik(mod)
'log Lik.' -2618.7 (df=6)
>
> logLik(mod, newdata = GBSG2[1:3,])
'log Lik.' -24.629 (df=NULL)
>
> layout(matrix(1:2, nr = 1))
> coef(mod) <- cf[[1]]
> plot(mod, newdata = data.frame(1), type = "survivor")
> coef(mod) <- cf[[2]]
> plot(mod, newdata = data.frame(1), type = "survivor", add = TRUE)
> coef(mod) <- cf[[3]]
> plot(mod, newdata = data.frame(1), type = "survivor", add = TRUE)
>
> simulate(tf, newdata = GBSG2[1:3,], nsim = 3)
[[1]]
[1] 1136.44 (2000, Inf] 503.29
[[2]]
[1] (2000, Inf] (2000, Inf] 290.26
[[3]]
[1] 925.20 412.52 461.45
>
> cmod <- coxph(Surv(time, cens) ~ horTh + age + menostat + tsize + tgrade +
+ pnodes + progrec + estrec, data = GBSG2)
>
> plot(survfit(cmod, newdata = GBSG2[1:3,]))
Error in a$specials[[i]] : subscript out of bounds
Calls: plot ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc