Skip to content

Commit

Permalink
added BCEA:: to evppi() calls in @examples so doesnt clash with voi v…
Browse files Browse the repository at this point in the history
…ersion of evppi()
  • Loading branch information
n8thangreen committed Jan 13, 2025
1 parent 7a8ced5 commit 04ad98d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 24 deletions.
15 changes: 8 additions & 7 deletions R/evppi.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,27 @@
#' # Compute the EVPPI for a bunch of parameters
#' inp <- createInputs(vaccine_mat)
#'
#' EVPPI <- evppi(m, c("beta.1." , "beta.2."), inp$mat)
#' # explicitly use BCEA package namespace to avoid voi package conflict
#' EVPPI <- BCEA::evppi(m, c("beta.1." , "beta.2."), inp$mat)
#'
#' plot(EVPPI)
#'
#' # deprecated (single parameter) methods
#' EVPPI.so <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "so", n.blocks = 50)
#' EVPPI.sad <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "sad", n.seps = 1)
#' EVPPI.so <- BCEA::evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "so", n.blocks = 50)
#' EVPPI.sad <- BCEA::evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "sad", n.seps = 1)
#'
#' plot(EVPPI.so)
#' plot(EVPPI.sad)
#'
#' # Compute the EVPPI using INLA/SPDE
#' if (require("INLA"))
#' x_inla <- evppi(he = m, 39:40, input = inp$mat)
#' x_inla <- BCEA::evppi(he = m, 39:40, input = inp$mat)
#'
#' # using GAM regression
#' x_gam <- evppi(he = m, 39:40, input = inp$mat, method = "GAM")
#' x_gam <- BCEA::evppi(he = m, 39:40, input = inp$mat, method = "GAM")
#'
#' # using Strong et al GP regression
#' x_gp <- evppi(he = m, 39:40, input = inp$mat, method = "GP")
#' x_gp <- BCEA::evppi(he = m, 39:40, input = inp$mat, method = "GP")
#'
#' # plot results
#' if (require("INLA")) plot(x_inla)
Expand All @@ -199,7 +200,7 @@
#' "Individual counselling", "Group counselling")
#' m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500)
#' inp <- createInputs(smoking_output)
#' EVPPI <- evppi(m, c(2,3), inp$mat, h.value = 0.0000005)
#' EVPPI <- BCEA::evppi(m, c(2,3), inp$mat, h.value = 0.0000005)
#' plot(EVPPI)
#' }
#'
Expand Down
3 changes: 2 additions & 1 deletion R/evppi.default.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ evppi.default <- function(he, ...) {
#' treats <- c("Status quo", "Vaccination")
#' bcea_vacc <- bcea(e.pts, c.pts, ref = 2, interventions = treats)
#' inp <- createInputs(vaccine_mat)
#' evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat)
#' BCEA::evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat)
#'
#' @export
#'
evppi.bcea <- function(he,
Expand Down
8 changes: 4 additions & 4 deletions R/inforank_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ inforank_params <- function(he,
for (i in seq_along(chk2)) {
x[[i]] <-
quiet(
evppi(he = m,
param_idx = chk2[i],
input = input,
N = N))
BCEA::evppi(he = m,
param_idx = chk2[i],
input = input,
N = N))
}

scores <-
Expand Down
4 changes: 2 additions & 2 deletions R/plot.evppi.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
#'
#' # Compute the EVPPI using INLA/SPDE
#' if (require("INLA")) {
#' x0 <- evppi(m, c("beta.1." , "beta.2."), input = inp$mat)
#' x0 <- BCEA::evppi(m, c("beta.1." , "beta.2."), input = inp$mat)
#'
#' plot(x0, pos = c(0,1))
#'
#' x1 <- evppi(m, c(32,48,49), input = inp$mat)
#' x1 <- BCEA::evppi(m, c(32,48,49), input = inp$mat)
#' plot(x1, pos = "topright")
#'
#' plot(x0, col = c("black", "red"), pos = "topright")
Expand Down
18 changes: 10 additions & 8 deletions man/evppi.Rd

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

4 changes: 2 additions & 2 deletions man/plot.evppi.Rd

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

0 comments on commit 04ad98d

Please sign in to comment.