R Under development (unstable) (2024-04-27 r86487 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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. > > library("mlt") Loading required package: basefun Loading required package: variables > library("survival") > options(digits = 3) > > data("GBSG2", package = "TH.data") > > xvar <- names(GBSG2) > xvar <- xvar[!(xvar %in% c("time", "cens"))] > GBSG2$y <- with(GBSG2, Surv(time, cens)) > > fm <- as.formula(paste("Surv(time, cens) ~ ", paste(xvar, collapse = "+"))) > cmod <- coxph(fm, data = GBSG2) > > order <- 10 > by <- Bernstein_basis(numeric_var("y", support = c(0, max(GBSG2$time))), order = order, + ui = "incre") > bx <- as.basis(as.formula(paste("~", paste(xvar, collapse = "+"))), data = GBSG2, + remove_intercept = TRUE) > > m <- ctm(by, shift = bx, todist = "MinEx") > > mod <- mlt(m, data = GBSG2, scale = TRUE) > > n <- names(coef(cmod)) > cf <- coef(mod)[n] > v <- vcov(mod)[n, n] > coef(cmod) / cf horThyes age menostatPost tsize tgrade.L tgrade.Q 0.993 0.953 0.964 1.003 0.983 0.995 pnodes progrec estrec 1.000 1.003 1.081 > diag(vcov(cmod)) / diag(v) horThyes age menostatPost tsize tgrade.L tgrade.Q 0.995 0.997 0.998 1.000 0.999 0.999 pnodes progrec estrec 1.009 0.998 0.994 > range(vcov(cmod) / v) [1] 0.671 1.894 > > proc.time() user system elapsed 1.28 0.21 1.48