R Under development (unstable) (2025-01-28 r87664 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > 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.101430 0.0293086 0.0000000 [2,] 0.029309 0.1096379 0.0803293 [3,] 0.000000 0.0402241 0.0983695 [4,] 0.027748 0.0586568 0.0232558 [5,] 0.061081 0.0000000 0.0000000 [6,] 0.000000 0.0097087 0.0202351 [7,] 0.018182 0.0294850 0.0116279 [8,] 0.049089 0.0354010 0.0000000 [9,] 0.014286 0.0213366 0.0569014 [10,] 0.035726 0.0466370 0.0112360 [11,] 0.000000 0.0178571 0.0428955 [12,] 0.031830 0.0520356 0.0344918 [13,] 0.000000 0.0116279 0.0116279 [14,] 0.025356 0.0000000 0.0000000 [15,] 0.029947 0.0233926 0.0223806 [16,] 0.030679 0.0000000 0.0000000 [17,] 0.010204 0.0000000 0.0166667 [18,] 0.011765 0.0117647 0.0166667 [19,] 0.011765 0.0233926 0.0390473 [20,] 0.024387 0.0000000 0.0417051 [21,] 0.066968 0.0000000 0.0000000 [22,] 0.044038 0.0175439 0.0000000 [23,] 0.000000 0.0000000 0.0000000 [24,] 0.036412 0.0480397 0.0116279 [25,] 0.000000 0.0097087 0.0202351 [26,] 0.000000 0.0000000 0.0000000 [27,] 0.018182 0.0188679 0.0000000 [28,] 0.010101 0.0116279 0.0116279 [29,] 0.000000 0.0116279 0.0116279 [30,] 0.000000 0.0000000 0.0000000 [31,] 0.000000 0.0000000 0.0000000 [32,] 0.010101 0.0000000 0.0000000 [33,] 0.000000 0.0000000 0.0000000 [34,] 0.085037 0.0117647 0.0107527 [35,] 0.018868 0.0301039 0.0112360 [36,] 0.000000 0.0188679 0.0000000 [37,] 0.018182 0.0213366 0.0426156 [38,] 0.018868 0.0589732 0.0613842 [39,] 0.077372 0.0000000 0.0000000 [40,] 0.030633 0.0820927 0.0336029 [41,] 0.017544 0.0508443 0.0508443 [42,] 0.000000 0.0172414 0.0277677 [43,] 0.000000 0.0000000 0.0000000 [44,] 0.010204 0.0188679 0.0000000 [45,] 0.036255 0.0306326 0.0107527 [46,] 0.096930 0.0117647 0.0000000 [47,] 0.069663 0.0175439 0.0000000 [48,] 0.000000 0.0178571 0.0283835 [49,] 0.011765 0.0651439 0.0533792 [50,] 0.032468 0.0415275 0.0830062 [51,] 0.021969 0.0422605 0.0390473 [52,] 0.034575 0.0000000 0.0000000 [53,] 0.053514 0.0117647 0.0166667 [54,] 0.000000 0.0116279 0.0116279 [55,] 0.000000 0.0112360 0.0255217 [56,] 0.047619 0.0000000 0.0107527 [57,] 0.000000 0.0223670 0.0223670 [58,] 0.014286 0.0116279 0.0116279 [59,] 0.020305 0.0116279 0.0116279 [60,] 0.036412 0.0704067 0.0339949 [61,] 0.000000 0.0294850 0.0437708 [62,] 0.125813 0.0587936 0.0116279 [63,] 0.085769 0.0000000 0.0000000 [64,] 0.018868 0.0701042 0.0617626 [65,] 0.000000 0.0116279 0.0116279 [66,] 0.010204 0.0000000 0.0000000 [67,] 0.000000 0.0116279 0.0116279 [68,] 0.018868 0.0640988 0.0452308 [69,] 0.000000 0.0116279 0.0116279 [70,] 0.000000 0.0000000 0.0000000 [71,] 0.018868 0.0398126 0.0209447 [72,] 0.010204 0.0000000 0.0000000 [73,] 0.014286 0.0407210 0.0550067 [74,] 0.014286 0.0213366 0.0320893 [75,] 0.000000 0.0116279 0.0221542 [76,] 0.035726 0.0354010 0.0105263 [77,] 0.037050 0.0188679 0.0000000 [78,] 0.010101 0.0000000 0.0000000 [79,] 0.000000 0.0000000 0.0105263 [80,] 0.047151 0.0188679 0.0107527 [81,] 0.000000 0.0116279 0.0259136 [82,] 0.000000 0.0000000 0.0000000 [83,] 0.000000 0.0000000 0.0000000 [84,] 0.018868 0.0487675 0.0298996 [85,] 0.000000 0.0477568 0.0644234 [86,] 0.014286 0.0000000 0.0107527 [87,] 0.132916 0.0542689 0.0000000 [88,] 0.000000 0.0112360 0.0112360 [89,] 0.000000 0.0213366 0.0735680 [90,] 0.010101 0.0000000 0.0000000 [91,] 0.014286 0.0000000 0.0212790 [92,] 0.035457 0.0000000 0.0000000 [93,] 0.000000 0.0000000 0.0000000 [94,] 0.071820 0.0000000 0.0000000 [95,] 0.061280 0.0175439 0.0000000 [96,] 0.000000 0.0000000 0.0000000 [97,] 0.032468 0.0000000 0.0105263 [98,] 0.033635 0.0000000 0.0000000 [99,] 0.000000 0.0000000 0.0000000 [100,] 0.010101 0.0000000 0.0000000 [101,] 0.000000 0.0000000 0.0105263 [102,] 0.020305 0.0000000 0.0166667 [103,] 0.000000 0.0112360 0.0279026 [104,] 0.000000 0.0298996 0.0987977 [105,] 0.052119 0.0000000 0.0000000 [106,] 0.000000 0.0228639 0.0228639 [107,] 0.010101 0.0000000 0.0166667 [108,] 0.011765 0.0117647 0.0271930 [109,] 0.062749 0.0117647 0.0000000 [110,] 0.029006 0.0117647 0.0107527 [111,] 0.063581 0.0117647 0.0107527 [112,] 0.017241 0.0000000 0.0000000 [113,] 0.018182 0.0213366 0.0356224 [114,] 0.000000 0.0000000 0.0000000 [115,] 0.014286 0.0508217 0.0508217 [116,] 0.000000 0.0242861 0.0514791 [117,] 0.029072 0.0188679 0.0000000 [118,] 0.032468 0.0304958 0.0223806 [119,] 0.000000 0.0116279 0.0116279 [120,] 0.000000 0.0000000 0.0000000 [121,] 0.030679 0.0000000 0.0000000 [122,] 0.000000 0.0000000 0.0000000 [123,] 0.000000 0.0000000 0.0000000 [124,] 0.000000 0.0000000 0.0000000 [125,] 0.014286 0.0188679 0.0107527 [126,] 0.059931 0.0178571 0.0000000 [127,] 0.000000 0.0178571 0.0283835 [128,] 0.014286 0.0415275 0.0665659 [129,] 0.035726 0.0175439 0.0000000 [130,] 0.011765 0.0306326 0.0000000 [131,] 0.000000 0.0188679 0.0107527 [132,] 0.016393 0.0000000 0.0000000 [133,] 0.089239 0.0296218 0.0000000 [134,] 0.000000 0.0396083 0.0562750 [135,] 0.000000 0.0000000 0.0000000 [136,] 0.014286 0.0304958 0.0116279 [137,] 0.000000 0.0000000 0.0000000 [138,] 0.028158 0.0296218 0.0000000 [139,] 0.000000 0.0000000 0.0000000 [140,] 0.018868 0.0188679 0.0000000 [141,] 0.000000 0.0112360 0.0360480 [142,] 0.112795 0.0354010 0.0000000 [143,] 0.062943 0.0471657 0.0000000 [144,] 0.000000 0.0000000 0.0000000 [145,] 0.029309 0.0598044 0.0116279 [146,] 0.000000 0.0000000 0.0000000 [147,] 0.047151 0.0188679 0.0000000 [148,] 0.010204 0.0188679 0.0274194 [149,] 0.000000 0.0284773 0.0451440 [150,] 0.032393 0.0000000 0.0274194 [151,] 0.011765 0.0443373 0.0325726 [152,] 0.061616 0.0178571 0.0000000 [153,] 0.000000 0.0097087 0.0263754 [154,] 0.017544 0.0000000 0.0000000 [155,] 0.000000 0.0650071 0.1067122 [156,] 0.000000 0.0213366 0.0213366 [157,] 0.035726 0.0291718 0.0116279 [158,] 0.000000 0.0000000 0.0000000 [159,] 0.017544 0.0112360 0.0112360 [160,] 0.020305 0.0116279 0.0116279 [161,] 0.018868 0.0398126 0.0209447 [162,] 0.027445 0.0000000 0.0000000 [163,] 0.000000 0.0298996 0.0404259 [164,] 0.000000 0.0298996 0.0298996 [165,] 0.000000 0.0000000 0.0000000 [166,] 0.014286 0.0298996 0.0654643 [167,] 0.017544 0.0112360 0.0112360 [168,] 0.072122 0.0000000 0.0166667 [169,] 0.000000 0.0126582 0.0436106 [170,] 0.018868 0.0412349 0.0328933 [171,] 0.000000 0.0209447 0.0314710 [172,] 0.000000 0.0396083 0.0562750 [173,] 0.010101 0.0000000 0.0000000 [174,] 0.000000 0.0508443 0.0651300 [175,] 0.000000 0.0000000 0.0000000 [176,] 0.010204 0.0000000 0.0000000 [177,] 0.017544 0.0364118 0.0000000 [178,] 0.000000 0.0116279 0.0282946 [179,] 0.018182 0.0112360 0.0217623 [180,] 0.011765 0.0412498 0.0116279 [181,] 0.029947 0.0422605 0.0390473 [182,] 0.010204 0.0000000 0.0000000 [183,] 0.000000 0.0294850 0.0116279 [184,] 0.028386 0.0116279 0.0116279 [185,] 0.030633 0.0885950 0.0579624 [186,] 0.000000 0.0000000 0.0000000 [187,] 0.000000 0.0298996 0.0298996 [188,] 0.047254 0.0377358 0.0000000 [189,] 0.066984 0.0000000 0.0000000 [190,] 0.017544 0.0284773 0.0284773 [191,] 0.028386 0.0178571 0.0000000 [192,] 0.000000 0.0000000 0.0105263 [193,] 0.000000 0.0126582 0.0126582 [194,] 0.029309 0.0587936 0.0116279 [195,] 0.014286 0.0213366 0.0630417 [196,] 0.000000 0.0116279 0.0259136 [197,] 0.027645 0.0000000 0.0000000 [198,] 0.066330 0.0178571 0.0000000 [199,] 0.000000 0.0385780 0.0491043 [200,] 0.000000 0.0402241 0.0568908 [201,] 0.010101 0.0000000 0.0000000 [202,] 0.000000 0.0000000 0.0000000 [203,] 0.021969 0.0117647 0.0107527 [204,] 0.095553 0.0000000 0.0000000 [205,] 0.010204 0.0000000 0.0000000 [206,] 0.000000 0.0000000 0.0000000 [207,] 0.000000 0.0097087 0.0202351 [208,] 0.020305 0.0000000 0.0000000 [209,] 0.046210 0.0188679 0.0000000 [210,] 0.018182 0.0000000 0.0000000 [211,] 0.058887 0.0000000 0.0274194 [212,] 0.017241 0.0000000 0.0000000 [213,] 0.000000 0.0000000 0.0440860 [214,] 0.029309 0.0648307 0.0355221 [215,] 0.000000 0.0388018 0.0388018 [216,] 0.033937 0.0354010 0.0000000 [217,] 0.017544 0.0000000 0.0000000 [218,] 0.014286 0.0407210 0.0657594 [219,] 0.017544 0.0178571 0.0000000 [220,] 0.000000 0.0188679 0.0000000 [221,] 0.017544 0.0291718 0.0116279 [222,] 0.049727 0.0000000 0.0107527 [223,] 0.000000 0.0000000 0.0000000 [224,] 0.066405 0.0000000 0.0000000 [225,] 0.018182 0.0000000 0.0000000 [226,] 0.000000 0.0483530 0.0116279 [227,] 0.000000 0.0000000 0.0105263 [228,] 0.014286 0.0329646 0.0577766 [229,] 0.035726 0.0000000 0.0000000 [230,] 0.044460 0.0293086 0.0166667 [231,] 0.029309 0.0505665 0.0209447 [232,] 0.000000 0.0000000 0.0000000 [233,] 0.048814 0.0484898 0.0000000 [234,] 0.000000 0.0178571 0.0178571 [235,] 0.017544 0.0000000 0.0000000 [236,] 0.000000 0.0304958 0.0116279 [237,] 0.032468 0.0512363 0.0927149 [238,] 0.018868 0.0398126 0.0314710 [239,] 0.011765 0.0829815 0.0344918 [240,] 0.062642 0.0293086 0.0000000 [241,] 0.000000 0.0000000 0.0000000 [242,] 0.011765 0.0117647 0.0000000 [243,] 0.010204 0.0188679 0.0000000 [244,] 0.017544 0.0336029 0.0336029 [245,] 0.000000 0.0000000 0.0000000 [246,] 0.033937 0.0178571 0.0000000 [247,] 0.017241 0.0000000 0.0000000 [248,] 0.000000 0.0178571 0.0426692 [249,] 0.000000 0.0116279 0.0116279 [250,] 0.000000 0.0000000 0.0000000 [251,] 0.011765 0.0117647 0.0274194 [252,] 0.010204 0.0000000 0.0000000 [253,] 0.000000 0.0000000 0.0000000 [254,] 0.014286 0.0209447 0.0316974 [255,] 0.010204 0.0000000 0.0000000 [256,] 0.050252 0.0233926 0.0116279 [257,] 0.000000 0.0290931 0.0290931 [258,] 0.011765 0.0117647 0.0000000 [259,] 0.014286 0.0304958 0.0116279 [260,] 0.000000 0.0000000 0.0000000 [261,] 0.000000 0.0696896 0.0651074 [262,] 0.000000 0.0407210 0.0620000 [263,] 0.028283 0.0000000 0.0000000 [264,] 0.014286 0.0294850 0.0400114 [265,] 0.000000 0.0000000 0.0000000 [266,] 0.000000 0.0178571 0.0000000 [267,] 0.017544 0.0000000 0.0000000 [268,] 0.010101 0.0000000 0.0000000 [269,] 0.000000 0.0112360 0.0112360 [270,] 0.000000 0.0000000 0.0000000 [271,] 0.011765 0.0117647 0.0000000 [272,] 0.018868 0.0188679 0.0000000 [273,] 0.000000 0.0533792 0.0700459 [274,] 0.000000 0.0000000 0.0000000 [275,] 0.028386 0.0116279 0.0116279 [276,] 0.000000 0.0634799 0.0906729 [277,] 0.000000 0.0000000 0.0000000 [278,] 0.000000 0.0000000 0.0000000 [279,] 0.061081 0.0000000 0.0476190 [280,] 0.138845 0.0117647 0.0107527 [281,] 0.039513 0.0587936 0.0116279 [282,] 0.000000 0.0000000 0.0000000 [283,] 0.042796 0.0000000 0.0000000 [284,] 0.000000 0.0178571 0.0283835 [285,] 0.055728 0.0000000 0.0000000 [286,] 0.000000 0.0000000 0.0000000 [287,] 0.017544 0.0658968 0.0116279 [288,] 0.017544 0.0816426 0.0452308 [289,] 0.011765 0.0117647 0.0000000 [290,] 0.029006 0.0117647 0.0000000 [291,] 0.018868 0.0703280 0.0514601 [292,] 0.041628 0.0000000 0.0417051 [293,] 0.017544 0.0354010 0.0000000 [294,] 0.031545 0.0000000 0.0000000 [295,] 0.029309 0.0587936 0.0116279 [296,] 0.000000 0.0000000 0.0000000 [297,] 0.000000 0.0228639 0.0228639 [298,] 0.037050 0.0188679 0.0000000 [299,] 0.000000 0.0126582 0.0231845 [300,] 0.017241 0.0000000 0.0000000 [301,] 0.000000 0.0000000 0.0000000 [302,] 0.029947 0.0306326 0.0000000 [303,] 0.000000 0.0223670 0.0474054 [304,] 0.000000 0.0518520 0.0790450 [305,] 0.000000 0.0396083 0.0810870 [306,] 0.042597 0.0000000 0.0000000 [307,] 0.000000 0.0000000 0.0000000 [308,] 0.017544 0.0470289 0.0116279 [309,] 0.000000 0.0097087 0.0097087 [310,] 0.052119 0.0175439 0.0000000 [311,] 0.021969 0.0117647 0.0000000 [312,] 0.010101 0.0000000 0.0166667 [313,] 0.000000 0.0415275 0.0520538 [314,] 0.000000 0.0269501 0.0684288 [315,] 0.037546 0.0000000 0.0000000 [316,] 0.000000 0.0294850 0.0116279 [317,] 0.000000 0.0411356 0.0887546 [318,] 0.000000 0.0367251 0.0178571 [319,] 0.000000 0.0000000 0.0000000 [320,] 0.017544 0.0000000 0.0000000 [321,] 0.000000 0.0112360 0.0112360 [322,] 0.000000 0.0209447 0.0209447 [323,] 0.000000 0.0687014 0.0996538 [324,] 0.010101 0.0000000 0.0000000 [325,] 0.010101 0.0000000 0.0000000 [326,] 0.000000 0.0228639 0.0371496 [327,] 0.000000 0.0000000 0.0000000 [328,] 0.000000 0.0000000 0.0000000 [329,] 0.010204 0.0116279 0.0116279 [330,] 0.000000 0.0000000 0.0000000 [331,] 0.035726 0.0470289 0.0116279 [332,] 0.000000 0.0112360 0.0112360 [333,] 0.000000 0.0116279 0.0699996 [334,] 0.031545 0.0000000 0.0107527 [335,] 0.077069 0.0000000 0.0000000 [336,] 0.000000 0.0000000 0.0105263 [337,] 0.000000 0.0000000 0.0000000 [338,] 0.000000 0.0000000 0.0000000 [339,] 0.027645 0.0000000 0.0000000 [340,] 0.000000 0.0000000 0.0000000 [341,] 0.000000 0.0396083 0.0668013 [342,] 0.032070 0.0117647 0.0000000 [343,] 0.018182 0.0097087 0.0347471 [344,] 0.014286 0.0508443 0.0756563 [345,] 0.020305 0.0000000 0.0000000 [346,] 0.000000 0.0116279 0.0221542 [347,] 0.020305 0.0000000 0.0000000 [348,] 0.033154 0.0514405 0.0430989 [349,] 0.000000 0.0097087 0.0202351 [350,] 0.049727 0.0000000 0.0000000 [351,] 0.000000 0.0116279 0.0221542 [352,] 0.010204 0.0000000 0.0000000 [353,] 0.053000 0.0000000 0.0000000 [354,] 0.000000 0.0112360 0.0217623 [355,] 0.042494 0.0000000 0.0476190 [356,] 0.018868 0.0584763 0.0501347 [357,] 0.000000 0.0000000 0.0000000 [358,] 0.000000 0.0000000 0.0166667 [359,] 0.029006 0.0117647 0.0000000 [360,] 0.000000 0.0112360 0.0112360 [361,] 0.010101 0.0000000 0.0000000 [362,] 0.000000 0.0415275 0.0856135 [363,] 0.000000 0.0336029 0.0645553 [364,] 0.000000 0.0000000 0.0000000 [365,] 0.000000 0.0116279 0.0223806 [366,] 0.027645 0.0000000 0.0000000 [367,] 0.017241 0.0209447 0.0626498 [368,] 0.000000 0.0533792 0.0913249 [369,] 0.037050 0.0188679 0.0000000 [370,] 0.017544 0.0175439 0.0000000 [371,] 0.030633 0.0814769 0.0887900 [372,] 0.121577 0.0188679 0.0107527 [373,] 0.010204 0.0000000 0.0000000 [374,] 0.000000 0.0000000 0.0000000 [375,] 0.010101 0.0000000 0.0000000 [376,] 0.108534 0.0367251 0.0000000 [377,] 0.057720 0.0116279 0.0259136 [378,] 0.028283 0.0000000 0.0000000 [379,] 0.017241 0.0000000 0.0000000 [380,] 0.000000 0.0228639 0.0371496 [381,] 0.010204 0.0000000 0.0000000 [382,] 0.018182 0.0385780 0.0741427 [383,] 0.000000 0.0000000 0.0000000 [384,] 0.000000 0.0000000 0.0355647 [385,] 0.000000 0.0000000 0.0000000 [386,] 0.030633 0.0783894 0.0404259 [387,] 0.021969 0.0422605 0.0116279 [388,] 0.000000 0.0000000 0.0000000 [389,] 0.050011 0.0213366 0.0463750 [390,] 0.000000 0.0000000 0.0000000 [391,] 0.000000 0.0097087 0.0406611 [392,] 0.000000 0.0298996 0.0882713 [393,] 0.000000 0.0411356 0.0554213 [394,] 0.000000 0.0000000 0.0000000 [395,] 0.020305 0.0000000 0.0000000 [396,] 0.000000 0.0223670 0.0390336 [397,] 0.027342 0.0000000 0.0000000 [398,] 0.000000 0.0000000 0.0000000 [399,] 0.050011 0.0228639 0.0228639 [400,] 0.017544 0.0000000 0.0000000 [401,] 0.010101 0.0000000 0.0000000 [402,] 0.059828 0.0000000 0.0000000 [403,] 0.091760 0.0000000 0.0107527 [404,] 0.000000 0.0000000 0.0000000 [405,] 0.047490 0.0471657 0.0000000 [406,] 0.000000 0.0000000 0.0000000 [407,] 0.050877 0.0000000 0.0000000 [408,] 0.000000 0.0269501 0.0541431 [409,] 0.000000 0.0126582 0.0400776 [410,] 0.010204 0.0000000 0.0000000 [411,] 0.010101 0.0000000 0.0000000 [412,] 0.018182 0.0112360 0.0217623 [413,] 0.030633 0.0581985 0.0655116 [414,] 0.028386 0.0294850 0.0116279 [415,] 0.018868 0.0398126 0.0209447 [416,] 0.000000 0.0000000 0.0000000 [417,] 0.000000 0.0112360 0.0112360 [418,] 0.000000 0.0498140 0.0807664 [419,] 0.000000 0.0000000 0.0309524 [420,] 0.047151 0.0188679 0.0000000 [421,] 0.000000 0.0000000 0.0105263 [422,] 0.010204 0.0000000 0.0000000 [423,] 0.010101 0.0000000 0.0000000 [424,] 0.000000 0.0000000 0.0000000 [425,] 0.010204 0.0000000 0.0000000 [426,] 0.000000 0.0238942 0.0548466 [427,] 0.000000 0.0000000 0.0000000 [428,] 0.046852 0.0770653 0.0298996 [429,] 0.030633 0.0713536 0.0407210 [430,] 0.000000 0.0116279 0.0116279 [431,] 0.000000 0.0000000 0.0000000 [432,] 0.014286 0.0000000 0.0000000 [433,] 0.000000 0.0223670 0.0390336 [434,] 0.010101 0.0000000 0.0000000 [435,] 0.000000 0.0000000 0.0000000 [436,] 0.017544 0.0542689 0.0000000 [437,] 0.000000 0.0116279 0.0116279 [438,] 0.000000 0.0097087 0.0202351 [439,] 0.000000 0.0116279 0.0116279 [440,] 0.014286 0.0391938 0.0497201 [441,] 0.000000 0.0000000 0.0105263 [442,] 0.000000 0.0000000 0.0000000 [443,] 0.000000 0.0000000 0.0105263 [444,] 0.028283 0.0000000 0.0000000 [445,] 0.030633 0.0642356 0.0502696 [446,] 0.000000 0.0188679 0.0000000 [447,] 0.078625 0.0175439 0.0166667 [448,] 0.000000 0.0000000 0.0000000 [449,] 0.042672 0.0000000 0.0000000 [450,] 0.017544 0.0470289 0.0116279 [451,] 0.061081 0.0000000 0.0000000 [452,] 0.053270 0.0291718 0.0116279 [453,] 0.010204 0.0188679 0.0000000 [454,] 0.010204 0.0116279 0.0390473 [455,] 0.000000 0.0116279 0.0259136 [456,] 0.010101 0.0000000 0.0000000 [457,] 0.010204 0.0000000 0.0000000 [458,] 0.010101 0.0000000 0.0000000 [459,] 0.018868 0.0479610 0.0290931 [460,] 0.017544 0.0354010 0.0000000 [461,] 0.048176 0.0884006 0.0223670 [462,] 0.000000 0.0385780 0.0633901 [463,] 0.032695 0.0354010 0.0000000 [464,] 0.000000 0.0508443 0.0675110 [465,] 0.000000 0.0000000 0.0000000 [466,] 0.024490 0.0116279 0.0366663 [467,] 0.011765 0.0117647 0.0000000 [468,] 0.000000 0.0116279 0.0116279 [469,] 0.000000 0.0391938 0.0640058 [470,] 0.010204 0.0367251 0.0000000 [471,] 0.018868 0.0188679 0.0000000 [472,] 0.000000 0.0000000 0.0105263 [473,] 0.000000 0.0000000 0.0000000 [474,] 0.032393 0.0000000 0.0000000 [475,] 0.000000 0.0000000 0.0000000 [476,] 0.000000 0.0402241 0.0507504 [477,] 0.010204 0.0188679 0.0000000 [478,] 0.000000 0.0112360 0.0112360 [479,] 0.000000 0.0000000 0.0000000 [480,] 0.000000 0.0000000 0.0000000 [481,] 0.010204 0.0188679 0.0107527 [482,] 0.000000 0.0000000 0.0000000 [483,] 0.011765 0.0117647 0.0166667 [484,] 0.014286 0.0391938 0.0534795 [485,] 0.046679 0.0000000 0.0107527 [486,] 0.050011 0.0000000 0.0000000 [487,] 0.000000 0.0178571 0.0452765 [488,] 0.000000 0.0000000 0.0000000 [489,] 0.021969 0.0117647 0.0107527 [490,] 0.011765 0.0117647 0.0000000 [491,] 0.014286 0.0188679 0.0107527 [492,] 0.010204 0.0304958 0.0223806 [493,] 0.000000 0.0000000 0.0000000 [494,] 0.010101 0.0000000 0.0000000 [495,] 0.011765 0.0233926 0.0282946 [496,] 0.000000 0.0304958 0.0223806 [497,] 0.000000 0.0112360 0.0217623 [498,] 0.062220 0.0354010 0.0000000 [499,] 0.038487 0.0000000 0.0000000 [500,] 0.000000 0.0188679 0.0000000 [501,] 0.043839 0.0000000 0.0166667 [502,] 0.000000 0.0188679 0.0000000 [503,] 0.000000 0.0000000 0.0166667 [504,] 0.000000 0.0000000 0.0166667 [505,] 0.000000 0.0097087 0.0097087 [506,] 0.000000 0.0512363 0.0617626 [507,] 0.078095 0.0117647 0.0000000 [508,] 0.011765 0.0406340 0.0668150 [509,] 0.042494 0.0000000 0.0250384 [510,] 0.000000 0.0116279 0.0390473 [511,] 0.000000 0.0000000 0.0166667 [512,] 0.000000 0.0000000 0.0000000 [513,] 0.060978 0.0000000 0.0107527 [514,] 0.000000 0.0294850 0.0294850 [515,] 0.000000 0.0000000 0.0105263 [516,] 0.051261 0.0367251 0.0000000 [517,] 0.000000 0.0000000 0.0105263 [518,] 0.066330 0.0000000 0.0107527 [519,] 0.044120 0.0188679 0.0166667 [520,] 0.018182 0.0116279 0.0221542 [521,] 0.000000 0.0172414 0.0422798 [522,] 0.081510 0.0481765 0.0000000 [523,] 0.039513 0.0598044 0.0116279 [524,] 0.017544 0.0679736 0.0430989 [525,] 0.000000 0.0000000 0.0000000 [526,] 0.000000 0.0294850 0.0116279 [527,] 0.000000 0.0000000 0.0000000 [528,] 0.000000 0.0000000 0.0000000 [529,] 0.000000 0.0116279 0.0557139 [530,] 0.000000 0.0097087 0.0239945 [531,] 0.000000 0.0325726 0.0468583 [532,] 0.044232 0.0233926 0.0223806 [533,] 0.000000 0.0112360 0.0112360 [534,] 0.033154 0.0570540 0.0489388 [535,] 0.010204 0.0000000 0.0000000 [536,] 0.011765 0.0808581 0.0690934 [537,] 0.000000 0.0000000 0.0142857 [538,] 0.027748 0.0658968 0.0116279 [539,] 0.000000 0.0000000 0.0000000 [540,] 0.041646 0.0000000 0.0274194 [541,] 0.010101 0.0000000 0.0000000 [542,] 0.010101 0.0000000 0.0000000 [543,] 0.000000 0.0000000 0.0000000 [544,] 0.000000 0.0574655 0.0679918 [545,] 0.028158 0.0117647 0.0000000 [546,] 0.000000 0.0097087 0.0097087 [547,] 0.020305 0.0000000 0.0000000 [548,] 0.017544 0.0984694 0.0442005 [549,] 0.000000 0.0000000 0.0000000 [550,] 0.000000 0.0275659 0.0380922 [551,] 0.000000 0.0269501 0.0374764 [552,] 0.017544 0.0354010 0.0000000 [553,] 0.014286 0.0116279 0.0223806 [554,] 0.028158 0.0117647 0.0166667 [555,] 0.032468 0.0116279 0.0116279 [556,] 0.000000 0.0242861 0.0242861 [557,] 0.010101 0.0000000 0.0000000 [558,] 0.030633 0.0833961 0.0801828 [559,] 0.000000 0.0336029 0.0645553 [560,] 0.000000 0.0367251 0.0178571 [561,] 0.000000 0.0000000 0.0000000 [562,] 0.000000 0.0097087 0.0202351 [563,] 0.000000 0.0000000 0.0105263 [564,] 0.018868 0.0464338 0.0275659 [565,] 0.060112 0.0116279 0.0223806 [566,] 0.000000 0.0000000 0.0000000 [567,] 0.045702 0.0293086 0.0166667 [568,] 0.000000 0.0188679 0.0000000 [569,] 0.018868 0.0524708 0.0336029 [570,] 0.048176 0.0817794 0.0336029 [571,] 0.000000 0.0000000 0.0000000 [572,] 0.010101 0.0000000 0.0000000 [573,] 0.000000 0.0000000 0.0000000 [574,] 0.000000 0.0116279 0.0116279 [575,] 0.000000 0.0000000 0.0000000 [576,] 0.000000 0.0000000 0.0000000 [577,] 0.032393 0.0000000 0.0000000 [578,] 0.010204 0.0000000 0.0000000 [579,] 0.000000 0.0325726 0.0325726 [580,] 0.000000 0.0000000 0.0000000 [581,] 0.014286 0.0178571 0.0321429 [582,] 0.000000 0.0178571 0.0283835 [583,] 0.014286 0.0000000 0.0000000 [584,] 0.071802 0.0293086 0.0000000 [585,] 0.014286 0.0290931 0.0457598 [586,] 0.020305 0.0000000 0.0000000 [587,] 0.017241 0.0000000 0.0000000 [588,] 0.011765 0.0422605 0.0282946 [589,] 0.017544 0.0000000 0.0000000 [590,] 0.014286 0.0178571 0.0283835 [591,] 0.000000 0.0097087 0.0202351 [592,] 0.000000 0.0000000 0.0166667 [593,] 0.010101 0.0000000 0.0000000 [594,] 0.033333 0.0000000 0.0000000 [595,] 0.058125 0.0000000 0.0000000 [596,] 0.000000 0.0298996 0.0775187 [597,] 0.014286 0.0898805 0.0710126 [598,] 0.000000 0.0000000 0.0000000 [599,] 0.030633 0.0484898 0.0000000 [600,] 0.000000 0.0213366 0.0318630 [601,] 0.000000 0.0116279 0.0259136 [602,] 0.030679 0.0000000 0.0000000 [603,] 0.010204 0.0421237 0.0649609 [604,] 0.000000 0.0000000 0.0000000 [605,] 0.078733 0.0117647 0.0000000 [606,] 0.000000 0.0298996 0.0404259 [607,] 0.033937 0.0000000 0.0107527 [608,] 0.017544 0.0291718 0.0116279 [609,] 0.051179 0.0175439 0.0000000 [610,] 0.010101 0.0000000 0.0000000 [611,] 0.010204 0.0000000 0.0166667 [612,] 0.017241 0.0000000 0.0000000 [613,] 0.075264 0.0000000 0.0000000 [614,] 0.000000 0.0294850 0.0294850 [615,] 0.000000 0.0000000 0.0000000 [616,] 0.027748 0.0000000 0.0274194 [617,] 0.000000 0.0298996 0.0404259 [618,] 0.000000 0.0097087 0.0097087 [619,] 0.000000 0.0000000 0.0000000 [620,] 0.000000 0.0593847 0.0844231 [621,] 0.000000 0.0097087 0.0097087 [622,] 0.010101 0.0000000 0.0000000 [623,] 0.010101 0.0000000 0.0000000 [624,] 0.015152 0.0000000 0.0000000 [625,] 0.018868 0.0584763 0.0501347 [626,] 0.014286 0.0000000 0.0355647 [627,] 0.011765 0.0296218 0.0000000 [628,] 0.000000 0.0000000 0.0000000 [629,] 0.032468 0.0116279 0.0116279 [630,] 0.010204 0.0000000 0.0000000 [631,] 0.010101 0.0000000 0.0000000 [632,] 0.000000 0.0325726 0.0325726 [633,] 0.000000 0.0112360 0.0217623 [634,] 0.035726 0.0116279 0.0223806 [635,] 0.018182 0.0178571 0.0000000 [636,] 0.000000 0.0512363 0.0760483 [637,] 0.027342 0.0000000 0.0000000 [638,] 0.011765 0.0117647 0.0000000 [639,] 0.020305 0.0000000 0.0000000 [640,] 0.000000 0.0000000 0.0000000 [641,] 0.029947 0.0717456 0.0232558 [642,] 0.018182 0.0304958 0.0116279 [643,] 0.010204 0.0304958 0.0282946 [644,] 0.000000 0.0000000 0.0000000 [645,] 0.000000 0.0000000 0.0000000 [646,] 0.000000 0.0000000 0.0000000 [647,] 0.000000 0.0116279 0.0390473 [648,] 0.081556 0.0000000 0.0000000 [649,] 0.010204 0.0000000 0.0000000 [650,] 0.070955 0.0293086 0.0166667 [651,] 0.000000 0.0000000 0.0166667 [652,] 0.011765 0.0117647 0.0000000 [653,] 0.014286 0.0367251 0.0178571 [654,] 0.000000 0.0407210 0.0407210 [655,] 0.011765 0.0117647 0.0000000 [656,] 0.000000 0.0000000 0.0000000 [657,] 0.014286 0.0304958 0.0116279 [658,] 0.081125 0.0117647 0.0166667 [659,] 0.020305 0.0000000 0.0000000 [660,] 0.000000 0.0223670 0.0807387 [661,] 0.027445 0.0000000 0.0166667 [662,] 0.018868 0.0188679 0.0000000 [663,] 0.064012 0.0000000 0.0000000 [664,] 0.031545 0.0000000 0.0166667 [665,] 0.010204 0.0304958 0.0223806 [666,] 0.016393 0.0000000 0.0440860 [667,] 0.000000 0.0000000 0.0000000 [668,] 0.033635 0.0000000 0.0000000 [669,] 0.000000 0.0116279 0.0221542 [670,] 0.000000 0.0000000 0.0000000 [671,] 0.000000 0.0448073 0.0720002 [672,] 0.042494 0.0000000 0.0000000 [673,] 0.010101 0.0000000 0.0000000 [674,] 0.025253 0.0000000 0.0166667 [675,] 0.010204 0.0304958 0.0390473 [676,] 0.060551 0.0117647 0.0274194 [677,] 0.000000 0.0533792 0.0950843 [678,] 0.000000 0.0000000 0.0000000 [679,] 0.000000 0.0238942 0.0679802 [680,] 0.000000 0.0298996 0.0465663 [681,] 0.014286 0.0290931 0.0290931 [682,] 0.010101 0.0000000 0.0000000 [683,] 0.000000 0.0178571 0.0283835 [684,] 0.018868 0.0301039 0.0112360 [685,] 0.120043 0.0000000 0.0000000 [686,] 0.018868 0.0398126 0.0316974 > predict(tf, newdata = GBSG2[1:3,], type = "node") [[1]] [1] 7 7 10 [[2]] [1] 6 7 11 [[3]] [1] 6 9 9 [[4]] [1] 10 10 11 [[5]] [1] 5 9 9 [[6]] [1] 11 13 13 [[7]] [1] 9 11 11 [[8]] [1] 9 13 13 [[9]] [1] 7 7 8 [[10]] [1] 5 10 10 [[11]] [1] 9 7 10 [[12]] [1] 10 12 12 > (cf <- predict(tf, newdata = GBSG2[1:3,], type = "coef")) $`1` Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y) -5.30204 -0.93807 -0.93807 -0.93807 -0.52402 -0.24351 $`2` Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y) -4.66470 -0.85975 -0.85975 -0.58941 -0.58941 -0.14940 $`3` Bs1(y) Bs2(y) Bs3(y) Bs4(y) Bs5(y) Bs6(y) -4.676788 -0.508100 -0.508098 -0.395122 -0.395122 0.043903 > > logLik(tf, newdata = GBSG2[1:3,]) 'log Lik.' -23.41 (df=NA) > > sapply(1:length(tf$nodes), function(i) logLik(gettree(tf, i))) [1] -1616.1 -1684.9 -1656.5 -1560.3 -1604.8 -1610.9 -1513.0 -1562.0 -1673.2 [10] -1614.4 -1613.8 -1669.7 > > varimp(tf) horTh age menostat tsize tgrade pnodes progrec estrec -8.88580 0.62224 1.61547 -1.43766 -3.70355 17.46893 8.48912 4.61486 > > 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] (2000, Inf] 754.86 509.08 [[2]] [1] 1093.9 772.7 312.8 [[3]] [1] 869.24 (2000, Inf] 805.33 > > cmod <- coxph(Surv(time, cens) ~ horTh + age + menostat + tsize + tgrade + + pnodes + progrec + estrec, data = GBSG2) > > plot(survfit(cmod, newdata = GBSG2[1:3,])) > > ### sanity checks; no mclapply on Windows > if (.Platform$OS.type != "windows") { + + p11 <- predict(tf, newdata = GBSG2[1:11,], type = "weights") + p12 <- predict(tf, newdata = GBSG2[1:11,], type = "weights", cores = 2) + stopifnot(all.equal(p11, p12)) + + p21 <- predict(tf, newdata = GBSG2[1:11,], type = "node") + p22 <- predict(tf, newdata = GBSG2[1:11,], type = "node", cores = 2) + stopifnot(all.equal(p21, p22)) + + p31 <- predict(tf, newdata = GBSG2[1:11,]) + p32 <- predict(tf, newdata = GBSG2[1:11,], cores = 2) + stopifnot(all.equal(p31, p32)) + + p41 <- predict(tf, newdata = GBSG2[1:11,], type = "coef") + p42 <- predict(tf, newdata = GBSG2[1:11,], cores = 2, type = "coef") + stopifnot(all.equal(p41, p42)) + + } > > proc.time() user system elapsed 18.68 1.70 20.37