Skip to content

Commit

Permalink
keep names consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Feb 6, 2025
1 parent bae015e commit 810b812
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions R/PBA.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' approximately when \code{check.interval=TRUE}).
#' See Waeber, Frazier, and Henderson (2013) for details.
#'
#' @param f noisy function for which the root is sought
#' @param f.root noisy function for which the root is sought
#'
#' @param f.prior density function indicating the likely location of the prior
#' (e.g., if root is within [0,1] then \code{\link{dunif}} works, otherwise custom
Expand Down Expand Up @@ -126,7 +126,7 @@
#'
#' }
#'
PBA <- function(f, interval, ..., p = .6,
PBA <- function(f.root, interval, ..., p = .6,
integer = FALSE, tol = if(integer) .01 else .0001,
maxiter = 300L, miniter = 100L, wait.time = NULL,
f.prior = NULL, resolution = 10000L,
Expand Down Expand Up @@ -204,13 +204,13 @@ PBA <- function(f, interval, ..., p = .6,

if(check.interval){
if(!is.null(FromSimSolve)){
upper <- bool.f(f.root=f, interval[2L], replications=replications[1L],
upper <- bool.f(f.root=f.root, interval[2L], replications=replications[1L],
store = FALSE, ...)
lower <- bool.f(f.root=f, interval[1L], replications=replications[1L],
lower <- bool.f(f.root=f.root, interval[1L], replications=replications[1L],
store = FALSE, ...)
} else {
upper <- bool.f(f.root=f, interval[2L], ...)
lower <- bool.f(f.root=f, interval[1L], ...)
upper <- bool.f(f.root=f.root, interval[2L], ...)
lower <- bool.f(f.root=f.root, interval[1L], ...)
}
no_root <- (upper[1L] + lower[1L]) != 1L
if(no_root){
Expand Down Expand Up @@ -246,8 +246,8 @@ PBA <- function(f, interval, ..., p = .6,
}
medhistory[iter] <- med
feval <- if(!is.null(FromSimSolve))
bool.f(f.root=f, med, replications=replications[iter], ...)
else bool.f(f.root=f, med, ...)
bool.f(f.root=f.root, med, replications=replications[iter], ...)
else bool.f(f.root=f.root, med, ...)
z <- feval[1]
roothistory[iter] <- feval[2]
if(z){
Expand Down
4 changes: 2 additions & 2 deletions man/PBA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 810b812

Please sign in to comment.