* using log directory ‘/data/gannet/ripley/R/packages/tests-OpenBLAS/mlt.docreg.Rcheck’ * using R Under development (unstable) (2025-04-19 r88162) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘mlt.docreg/DESCRIPTION’ ... OK * this is package ‘mlt.docreg’ version ‘1.1-10’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘mlt.docreg’ can be installed ... [17s/31s] OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... [5s/10s] OK * checking loading without being on the library search path ... [5s/11s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [21s/28s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in shell scripts ... OK * checking sizes of PDF files under ‘inst/doc’ ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... NONE * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘AFT-Ex.R’ Comparing ‘AFT-Ex.Rout’ to ‘AFT-Ex.Rout.save’ ... OK Running ‘GBSG2.R’ Running ‘KM-Ex.R’ Comparing ‘KM-Ex.Rout’ to ‘KM-Ex.Rout.save’ ... OK Running ‘faithful.R’ [9s/23s] Comparing ‘faithful.Rout’ to ‘faithful.Rout.save’ ... OK Running ‘orm-Ex.R’ [45s/83s] Comparing ‘orm-Ex.Rout’ to ‘orm-Ex.Rout.save’ ... OK Running ‘timedep_covar.R’ [11s/17s] Running ‘truncreg-Ex.R’ [6s/12s] Comparing ‘truncreg-Ex.Rout’ to ‘truncreg-Ex.Rout.save’ ... OK [85s/159s] ERROR Running the tests in ‘tests/timedep_covar.R’ failed. Complete output: > > library("mlt") Loading required package: basefun Loading required package: variables > library("survival") > library("flexsurv") > > chk <- function(x, y, ...) { + + ret <- all.equal(x, y, ...) + if (isTRUE(ret)) return(ret) + print(ret) + return(TRUE) + } > tol <- .001 > > ### right-censored veteran data > ### exponential model > fit1 <- coxph(Surv(time, status) ~ karno + age + trt, veteran) > fit2 <- survreg(Surv(time, status) ~ karno + age + trt, veteran, dist = "exponential") > fit3 <- flexsurvreg(Surv(time, status) ~ karno + age + trt, data= veteran, dist = "exponential") > > veteran$ytime <- with(veteran, Surv(time, status)) > dy <- numeric_var("ytime", support = c(0.1, 1000)) > by <- log_basis(dy, ui = "increasing") > m <- mlt(ctm(by, shift = ~ karno + age + trt, data = veteran, todistr = "MinExtr"), + data = veteran, fixed = c("log(ytime)" = 1)) > > stopifnot(chk(fit3$logliki, m$logliki(coef(m)[-2], weights(m)), + tol = tol, check.attributes = FALSE)) > > stopifnot(chk(logLik(fit2), logLik(m), tol = tol)) > stopifnot(chk(logLik(fit3), logLik(m), tol = tol, + check.attributes = FALSE)) > > ### Weibull model > fit2 <- survreg(Surv(time, status) ~ karno + age + trt, veteran, dist = "weibull") > fit3 <- flexsurvreg(Surv(time, status) ~ karno + age + trt, data= veteran, dist = "weibull") > > veteran$ytime <- with(veteran, Surv(time, status)) > dy <- numeric_var("ytime", support = c(0.1, 1000)) > # by <- Bernstein_basis(dy, order = 10, ui = "increasing") > by <- log_basis(dy, ui = "increasing") > m <- mlt(ctm(by, shift = ~ karno + age + trt, data = veteran, todistr = "MinExtr"), + data = veteran) > > stopifnot(chk(fit3$logliki, m$logliki(coef(m), weights(m)), + tol = tol, check.attributes = FALSE)) > > stopifnot(chk(logLik(fit2), logLik(m), tol = tol)) > stopifnot(chk(logLik(fit3), logLik(m), tol = tol, + check.attributes = FALSE)) > > ### now with time-dependent covariates > vet2 <- survSplit(Surv(time, status) ~., veteran, + cut=c(60, 120), episode ="timegroup") > vet2$timegroup <- factor(vet2$timegroup) > vet2$ytime <- with(vet2, Surv(tstart, time, status)) > > ## exponential model > suppressWarnings(fit3 <- flexsurvreg(Surv(tstart, time, status) ~ + karno + karno:timegroup + age + trt, data= vet2, dist = "exponential")) > m <- mlt(ctm(by, shift = ~ karno + karno:timegroup + age + trt, data = vet2, todistr = "MinExtr"), + data = vet2, fixed = c("log(ytime)" = 1)) > > stopifnot(chk(fit3$logliki, m$logliki(coef(m)[-2], weights(m)), + tol = tol, check.attributes = FALSE)) > stopifnot(chk(logLik(fit3), logLik(m), tol = tol, check.attributes = FALSE)) > > ### Weibull model > fit3 <- flexsurvreg(Surv(tstart, time, status) ~ karno + karno:timegroup + + age + trt, data= vet2, dist = "weibull") > m <- mlt(ctm(by, shift = ~ karno + karno:timegroup + age + trt, data = vet2, todistr = "MinExtr"), + data = vet2, scale = TRUE) > > stopifnot(chk(fit3$logliki, m$logliki(coef(m), weights(m)), + tol = tol, check.attributes = FALSE)) > stopifnot(chk(logLik(fit3), logLik(m), tol = tol, check.attributes = FALSE)) > > ## Cox model, see ?survival::survSplit > fit1 <- coxph(Surv(tstart, time, status) ~ karno + karno:strata(timegroup) + + age + trt, data= vet2) > > ### refit this model using mlt > btg <- as.basis(vet2$timegroup) > by <- Bernstein_basis(dy, order = 3, ui = "increasing") > m <- mlt(ctm(by, interacting = btg, + shift = ~ karno + karno:timegroup + age + trt, data = vet2, todistr = "MinExtr"), + data = vet2, scale = TRUE) Error in optim(par = par, fn = fun, gr = gradient, control = control.optim, : non-finite value supplied by optim Error in ret$convergence : $ operator is invalid for atomic vectors Error in ret$par : $ operator is invalid for atomic vectors Calls: mlt -> do.call -> .mlt_fit -> Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [199s/325s] OK * checking PDF version of manual ... OK * checking HTML version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/data/gannet/ripley/R/packages/tests-OpenBLAS/mlt.docreg.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 11:52.33, 395.14 + 28.49