Skip to content

Commit

Permalink
Fixed bug in AUC computation
Browse files Browse the repository at this point in the history
  • Loading branch information
BartJanvanRossum committed Aug 3, 2021
1 parent 30f1731 commit db1d410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/estimateSplineParameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ estimateSplineParameters <- function(HTPSpline,
genotypes = NULL,
plotIds = NULL) {
estimate <- match.arg(estimate)
AUCScale <- match.arg(AUCScale)
estVar <- if (estimate == "predictions") "pred.value" else if
(estimate == "derivatives") "deriv" else "deriv2"
useTimeNumber <- attr(HTPSpline, which = "useTimeNumber")
Expand Down Expand Up @@ -135,8 +136,7 @@ estimateSplineParameters <- function(HTPSpline,
intWidth <- diff(predDat[1:2, timeVar])
if (timeVar == "timePoint") {
## x-axis scale for time variables as computed by diff is in minutes.
## For conversino to hours/days divide by appropriate factor.
AUCScale <- match.arg(AUCScale)
## For converting to hours/days divide by appropriate factor.
if (AUCScale == "hour") {
intWidth <- intWidth / 60
} else if (AUCScale == "day") {
Expand Down

0 comments on commit db1d410

Please sign in to comment.