Skip to content

Commit

Permalink
improve root search intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Dec 4, 2024
1 parent eb6dc4d commit 6459a49
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions R/PBA.R
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,11 @@ PBA <- function(f, interval, ..., p = .6,
probs = c(.05, .95)),
max.interval=interval,median=med, CI=predCI)
predCIs_root[1L] <- SimSolveUniroot(SimMod=SimMod, b=predCIs[2L],
interval=quantile(medhistory[medhistory != 0],
probs = c(.05, .95)),
max.interval=interval,median=med, CI=predCI)[1L]
interval=c(min(medhistory[medhistory != 0]), predCIs[1]),
max.interval=c(interval[1], predCIs[1]), median=med, CI=predCI)[1L]
predCIs_root[2L] <- SimSolveUniroot(SimMod=SimMod, b=predCIs[3L],
interval=quantile(medhistory[medhistory != 0],
probs = c(.05, .95)),
max.interval=interval,median=med, CI=predCI)[1L]
interval=c(predCIs[1], max(medhistory[medhistory != 0])),
max.interval=c(predCIs[1], interval[2]), median=med, CI=predCI)[1L]
}
if(verbose)
cat("\n")
Expand Down

0 comments on commit 6459a49

Please sign in to comment.