CRAN Package Check Results for Package pmcalibration

Last updated on 2026-10-24 01:51:42 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2.0 2.42 37.10 39.52 OK
r-devel-linux-x86_64-debian-gcc 0.2.0 2.01 28.47 30.48 ERROR
r-devel-linux-x86_64-fedora-clang 0.2.0 30.99 OK
r-devel-linux-x86_64-fedora-gcc 0.2.0 25.04 OK
r-devel-windows-x86_64 0.2.0 5.00 58.00 63.00 OK
r-patched-linux-x86_64 0.2.0 2.56 32.83 35.39 OK
r-release-linux-x86_64 0.2.0 2.81 32.80 35.61 OK
r-release-macos-arm64 0.2.0 1.00 12.00 13.00 OK
r-release-macos-x86_64 0.2.0 2.00 37.00 39.00 OK
r-release-windows-x86_64 0.2.0 6.00 57.00 63.00 OK
r-oldrel-macos-arm64 0.2.0 OK
r-oldrel-macos-x86_64 0.2.0 2.00 40.00 42.00 OK
r-oldrel-windows-x86_64 0.2.0 6.00 64.00 70.00 OK

Check Details

Version: 0.2.0
Check: examples
Result: ERROR Running examples in ‘pmcalibration-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: pmcalibration > ### Title: Create a calibration curve > ### Aliases: pmcalibration > > ### ** Examples > > # binary outcome ------------------------------------- > library(pmcalibration) > # simulate some data > n <- 500 > dat <- sim_dat(N = n, a1 = .5, a3 = .2) > head(dat) x1 x2 y LP 1 -0.6264538 0.07730312 1 -0.05883606 2 0.1836433 -0.29686864 0 0.37587109 3 -0.8356286 -1.18324224 1 -1.32112064 4 1.5952808 0.01129269 1 2.11017649 5 0.3295078 0.99160104 1 1.88645686 6 -0.8204684 1.59396745 1 1.01193909 > # predictions > p <- with(dat, invlogit(.5 + x1 + x2 + x1*x2*.1)) > > # fit calibration curve > cal <- pmcalibration(y = dat$y, p = p, smooth = "gam", k = 20, ci = "pw") > > summary(cal) Calibration metrics based on a calibration curve estimated for a binary outcome via a generalized additive model (see ?mgcv::s) using logit transformed predicted probabilities. Estimate Eavg 0.022 E50 0.025 E90 0.033 Emax 0.034 ECI 0.058 > > plot(cal) > > # time to event outcome ------------------------------------- > library(pmcalibration) > if (requireNamespace("survival", quietly = TRUE)){ + library(survival) + + data('transplant', package="survival") + transplant <- na.omit(transplant) + transplant = subset(transplant, futime > 0) + transplant$ltx <- as.numeric(transplant$event == "ltx") + + # get predictions from coxph model at time = 100 + # note that as we are fitting and evaluating the model on the same data + cph <- coxph(Surv(futime, ltx) ~ age + sex + abo + year, data = transplant) + + time <- 100 + newd <- transplant; newd$futime <- time; newd$ltx <- 1 + p <- 1 - exp(-predict(cph, type = "expected", newdata=newd)) + y <- with(transplant, Surv(futime, ltx)) + + cal <- pmcalibration(y = y, p = p, smooth = "rcs", nk=5, ci = "pw", time = time) + + summary(cal) + + plot(cal) + + } Error in a$specials[[i]] : subscript out of bounds Calls: predict ... model.matrix -> model.matrix.coxph -> delete.response -> off Execution halted Flavor: r-devel-linux-x86_64-debian-gcc