Last updated on 2026-10-24 21:51:42 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.18.1 | 26.71 | 146.74 | 173.45 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.18.1 | 14.30 | 101.10 | 115.40 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 0.18.1 | 21.00 | 116.67 | 137.67 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 0.18.1 | 15.00 | 91.28 | 106.28 | OK | |
| r-devel-windows-x86_64 | 0.18.1 | 28.00 | 204.00 | 232.00 | OK | |
| r-patched-linux-x86_64 | 0.18.1 | 21.51 | 130.43 | 151.94 | OK | |
| r-release-linux-x86_64 | 0.18.1 | 19.29 | 130.12 | 149.41 | OK | |
| r-release-macos-arm64 | 0.18.1 | 5.00 | 33.00 | 38.00 | OK | |
| r-release-macos-x86_64 | 0.18.1 | 16.00 | 94.00 | 110.00 | OK | |
| r-release-windows-x86_64 | 0.18.1 | 25.00 | 137.00 | 162.00 | OK | |
| r-oldrel-macos-arm64 | 0.18.1 | 5.00 | 36.00 | 41.00 | OK | |
| r-oldrel-macos-x86_64 | 0.18.1 | 16.00 | 86.00 | 102.00 | OK | |
| r-oldrel-windows-x86_64 | 0.18.1 | 33.00 | 171.00 | 204.00 | OK |
Version: 0.18.1
Check: examples
Result: ERROR
Running examples in ‘multipleOutcomes-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: jointCovariance
> ### Title: Fitting Regression Models for Multiple Outcomes and Returning
> ### the Matrix of Covariance
> ### Aliases: jointCovariance
>
> ### ** Examples
>
> ## More examples can be found in the vignettes.
> library(survival)
> library(mvtnorm)
> library(tidyr)
> genData <- function(seed = NULL){
+
+ set.seed(seed)
+ n <- 300
+ sigma <- matrix(.7, 4, 4)
+ diag(sigma) <- 1
+ v <- rmvnorm(n, sigma = sigma)
+ x1 <- v[, 1]
+ x2 <- v[, 2]
+ z1 <- (v[, 3] > 0) + 0
+ z2 <- v[, 4]
+
+ trt <- rbinom(n, 1, .5)
+
+ bet <- c(-.3,.3)
+ y <- -log(runif(n))/
+ exp(-.3 * x1 + .3 * x2 + z1 * .5 - z2 * .3 + .1 * trt + rnorm(n))
+
+ z1[sample.int(n, 50)] <- NA
+ z2[sample.int(n, 50)] <- NA
+ x1[sample.int(n, 50)] <- NA
+ x2[sample.int(n, 50)] <- NA
+ death <- ifelse(y > 2, 0, 1)
+ y[y > 2] <- 2
+
+ pid <- paste0('pid-', 1:n)
+ ret <- data.frame(
+ y = y, trt = trt,
+ z1 = z1, z2 = z2,
+ x1 = x1, x2 = x2,
+ death, pid)
+ ret
+ }
>
> dat1 <- genData()
>
> ## create a dataset with repeated measurements x
> dat2 <- dat1 %>% pivot_longer(c(x1, x2), names_to='visit', values_to='x') %>%
+ dplyr::select(x, trt, visit, pid) %>% as.data.frame()
>
> dat2$visit <- as.factor(dat2$visit)
> dat2$pid <- as.factor(dat2$pid)
>
> fit <- jointCovariance(
+ coxph_(Surv(time = y, event = death) ~ trt, data_index = 1),
+ logrank_(Surv(time = y, event=death) ~ trt, data_index = 1),
+ glm_(z1 ~ trt, family = 'binomial', data_index = 1),
+ glm_(z2 ~ trt, family = 'gaussian', data_index = 1),
+ mmrm_(x ~ trt + us(visit | pid), reml = TRUE, data_index = 2),
+ gee_(x ~ trt, family = 'gaussian', corstr = 'independence', data_index = 2),
+ data = list(dat1, dat2))
mmrm() registered as car::Anova extension
method in mmrm_control is re-set to be "Residual"
vcov in mmrm_control is re-set to be "Empirical"
Error in a$specials[[i]] : subscript out of bounds
Calls: jointCovariance ... model.matrix -> model.matrix.coxph -> delete.response -> off
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.18.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [21s/29s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(multipleOutcomes)
>
> test_check("multipleOutcomes")
Saving _problems/test-coverage-110.R
Saving _problems/test-coverage-142.R
Saving _problems/test-inplace-formula-50.R
Saving _problems/test-inplace-formula-71.R
Saving _problems/test-inplace-formula-90.R
Saving _problems/test-inplace-formula-109.R
Saving _problems/test-inplace-formula-128.R
Saving _problems/test-models-fast-72.R
Saving _problems/test-models-fast-92.R
[ FAIL 9 | WARN 4 | SKIP 18 | PASS 311 ]
══ Skipped tests (18) ══════════════════════════════════════════════════════════
• On CRAN (18): 'test-mc-covariance.R:14:3', 'test-mc-covariance.R:34:3',
'test-mc-covariance.R:55:3', 'test-mc-covariance.R:75:3',
'test-mc-covariance.R:108:3', 'test-mc-covariance.R:130:3',
'test-mc-cross-engine.R:27:3', 'test-mc-cross-engine.R:50:3',
'test-mc-cross-engine.R:73:3', 'test-mc-cross-engine.R:102:3',
'test-mc-cross-engine.R:135:3', 'test-mc-pated-cross.R:30:3',
'test-mc-pated-cross.R:62:3', 'test-netbenefit-vs-fit_win_ratio.R:82:3',
'test-netbenefit-vs-fit_win_ratio.R:97:3',
'test-netbenefit-vs-fit_win_ratio.R:117:3',
'test-netbenefit-vs-fit_win_ratio.R:135:3', 'test-winratio.R:336:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-coverage.R:104:3'): bootstrap-mode coxph_ refits cleanly ───────
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─multipleOutcomes::jointCovariance(...) at test-coverage.R:104:3
2. └─multipleOutcomes:::jointCovariance.default(...)
3. └─multipleOutcomes:::bootstrapJointCovariance(...)
4. └─base::lapply(...)
5. └─multipleOutcomes (local) FUN(X[[i]], ...)
6. └─ad$fit_model()
7. ├─base::as.matrix(resid(self$fit, type = "score"))
8. ├─stats::resid(self$fit, type = "score")
9. └─survival:::residuals.coxph(self$fit, type = "score")
10. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
11. ├─stats::model.matrix(fit, data = mf)
12. └─survival:::model.matrix.coxph(fit, data = mf)
13. └─stats::delete.response(object$terms)
14. └─stats (local) off(a$specials[[i]])
── Error ('test-coverage.R:136:3'): bootstrap-mode logrank_ refits cleanly ─────
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─multipleOutcomes::jointCovariance(...) at test-coverage.R:136:3
2. └─multipleOutcomes:::jointCovariance.default(...)
3. └─multipleOutcomes:::bootstrapJointCovariance(...)
4. └─base::lapply(...)
5. └─multipleOutcomes (local) FUN(X[[i]], ...)
6. └─ad$fit_model()
7. ├─base::as.matrix(stats::resid(self$fit, type = "score"))
8. ├─stats::resid(self$fit, type = "score")
9. └─survival:::residuals.coxph(self$fit, type = "score")
10. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
11. ├─stats::model.matrix(fit, data = mf)
12. └─survival:::model.matrix.coxph(fit, data = mf)
13. └─stats::delete.response(object$terms)
14. └─stats (local) off(a$specials[[i]])
── Error ('test-inplace-formula.R:45:3'): baseline: 3 prognostic specs with mixed in-place transformations ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─multipleOutcomes::pated(...) at test-inplace-formula.R:45:3
2. ├─multipleOutcomes::jointCovariance(...)
3. └─multipleOutcomes:::jointCovariance.default(...)
4. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
5. └─base::lapply(...)
6. └─multipleOutcomes (local) FUN(X[[i]], ...)
7. └─ad$fit_model()
8. ├─base::as.matrix(resid(self$fit, type = "score"))
9. ├─stats::resid(self$fit, type = "score")
10. └─survival:::residuals.coxph(self$fit, type = "score")
11. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
12. ├─stats::model.matrix(fit, data = mf)
13. └─survival:::model.matrix.coxph(fit, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('test-inplace-formula.R:68:3'): arithmetic on the LHS of a glm spec ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─multipleOutcomes::pated(...) at test-inplace-formula.R:68:3
2. ├─multipleOutcomes::jointCovariance(...)
3. └─multipleOutcomes:::jointCovariance.default(...)
4. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
5. └─base::lapply(...)
6. └─multipleOutcomes (local) FUN(X[[i]], ...)
7. └─ad$fit_model()
8. ├─base::as.matrix(resid(self$fit, type = "score"))
9. ├─stats::resid(self$fit, type = "score")
10. └─survival:::residuals.coxph(self$fit, type = "score")
11. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
12. ├─stats::model.matrix(fit, data = mf)
13. └─survival:::model.matrix.coxph(fit, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('test-inplace-formula.R:87:3'): scale() on the RHS of the primary Cox spec ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─multipleOutcomes::pated(...) at test-inplace-formula.R:87:3
2. ├─multipleOutcomes::jointCovariance(...)
3. └─multipleOutcomes:::jointCovariance.default(...)
4. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
5. └─base::lapply(...)
6. └─multipleOutcomes (local) FUN(X[[i]], ...)
7. └─ad$fit_model()
8. ├─base::as.matrix(resid(self$fit, type = "score"))
9. ├─stats::resid(self$fit, type = "score")
10. └─survival:::residuals.coxph(self$fit, type = "score")
11. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
12. ├─stats::model.matrix(fit, data = mf)
13. └─survival:::model.matrix.coxph(fit, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('test-inplace-formula.R:106:3'): Surv() with arithmetic in both time and event arguments ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─multipleOutcomes::pated(...) at test-inplace-formula.R:106:3
2. ├─multipleOutcomes::jointCovariance(...)
3. └─multipleOutcomes:::jointCovariance.default(...)
4. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
5. └─base::lapply(...)
6. └─multipleOutcomes (local) FUN(X[[i]], ...)
7. └─ad$fit_model()
8. ├─base::as.matrix(resid(self$fit, type = "score"))
9. ├─stats::resid(self$fit, type = "score")
10. └─survival:::residuals.coxph(self$fit, type = "score")
11. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
12. ├─stats::model.matrix(fit, data = mf)
13. └─survival:::model.matrix.coxph(fit, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('test-inplace-formula.R:125:3'): factor() on an integer covariate ────
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. └─multipleOutcomes::pated(...) at test-inplace-formula.R:125:3
2. ├─multipleOutcomes::jointCovariance(...)
3. └─multipleOutcomes:::jointCovariance.default(...)
4. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
5. └─base::lapply(...)
6. └─multipleOutcomes (local) FUN(X[[i]], ...)
7. └─ad$fit_model()
8. ├─base::as.matrix(resid(self$fit, type = "score"))
9. ├─stats::resid(self$fit, type = "score")
10. └─survival:::residuals.coxph(self$fit, type = "score")
11. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
12. ├─stats::model.matrix(fit, data = mf)
13. └─survival:::model.matrix.coxph(fit, data = mf)
14. └─stats::delete.response(object$terms)
15. └─stats (local) off(a$specials[[i]])
── Error ('test-models-fast.R:68:3'): coxph_ works through jointCovariance + pated ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─multipleOutcomes::jointCovariance(...) at test-models-fast.R:68:3
2. └─multipleOutcomes:::jointCovariance.default(...)
3. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
4. └─base::lapply(...)
5. └─multipleOutcomes (local) FUN(X[[i]], ...)
6. └─ad$fit_model()
7. ├─base::as.matrix(resid(self$fit, type = "score"))
8. ├─stats::resid(self$fit, type = "score")
9. └─survival:::residuals.coxph(self$fit, type = "score")
10. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
11. ├─stats::model.matrix(fit, data = mf)
12. └─survival:::model.matrix.coxph(fit, data = mf)
13. └─stats::delete.response(object$terms)
14. └─stats (local) off(a$specials[[i]])
── Error ('test-models-fast.R:88:3'): logrank_ works through jointCovariance + pated ──
<subscriptOutOfBoundsError/error/condition>
Error in `a$specials[[i]]`: subscript out of bounds
Backtrace:
▆
1. ├─multipleOutcomes::jointCovariance(...) at test-models-fast.R:88:3
2. └─multipleOutcomes:::jointCovariance.default(...)
3. └─multipleOutcomes:::asymptoticJointCovariance(..., data = data)
4. └─base::lapply(...)
5. └─multipleOutcomes (local) FUN(X[[i]], ...)
6. └─ad$fit_model()
7. ├─base::as.matrix(stats::resid(self$fit, type = "score"))
8. ├─stats::resid(self$fit, type = "score")
9. └─survival:::residuals.coxph(self$fit, type = "score")
10. └─survival:::coxph.getdata(object, y = TRUE, x = TRUE, stratax = TRUE)
11. ├─stats::model.matrix(fit, data = mf)
12. └─survival:::model.matrix.coxph(fit, data = mf)
13. └─stats::delete.response(object$terms)
14. └─stats (local) off(a$specials[[i]])
[ FAIL 9 | WARN 4 | SKIP 18 | PASS 311 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc