From 2dafdaf2844a66e8e6c310533888aa93ff6a92fe Mon Sep 17 00:00:00 2001 From: Thomas Alexander Gerds Date: Wed, 23 Oct 2024 11:01:43 +0200 Subject: [PATCH] fixing bugs --- R/Score.R | 4 ---- R/plotCalibration.R | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/R/Score.R b/R/Score.R index 4897696..817f8c3 100644 --- a/R/Score.R +++ b/R/Score.R @@ -1471,10 +1471,6 @@ c.f., Chapter 7, Section 5 in Gerds & Kattan 2021. Medical risk prediction model if (keep.residuals[[1]]==FALSE && split.method$name[[1]]=="LeaveOneOutBoot"){ crossvalPerf$Brier$Residuals <- NULL } -<<<<<<< HEAD - ## browser() [BRICE: comment browser] -======= ->>>>>>> d4d6e60 (jack and glmnet) if (cens.type=="rightCensored") crossvalPerf[["Calibration"]]$plotframe <- merge(jack,crossvalPerf[["Calibration"]]$plotframe,by=c("riskRegression_ID","times")) } diff --git a/R/plotCalibration.R b/R/plotCalibration.R index 2bbd589..839da21 100644 --- a/R/plotCalibration.R +++ b/R/plotCalibration.R @@ -3,9 +3,9 @@ ## author: Thomas Alexander Gerds ## created: Feb 23 2017 (11:15) ## Version: -## last-updated: Oct 22 2024 (12:07) +## last-updated: Oct 23 2024 (11:01) ## By: Thomas Alexander Gerds -## Update #: 411 +## Update #: 412 #---------------------------------------------------------------------- ## ### Commentary: @@ -197,7 +197,7 @@ plotCalibration <- function(x, pframe <- x$Calibration$plotframe if (is.null(pframe)) stop("Object has no information for calibration plot.\nYou should call the function \"riskRegression::Score\" with plots=\"calibration\".") - if (response.type %in% c("binary", "competing.risks")) + if (x$response.type %in% c("binary", "competing.risks")) Rvar <- grep("^(riskRegression_event|pseudovalue)$",names(pframe),value=TRUE)[[1]] else Rvar <- grep("^(riskRegression_status|pseudovalue)$",names(pframe),value=TRUE)[[1]]