Skip to content

Commit

Permalink
Fix warning message for no efficacy stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael J. Grayling committed May 19, 2019
1 parent 10cbc88 commit 8d17022
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ LinkingTo: Rcpp
Date: 2018-05-14
URL: http://github.com/mjg211/singlearm
BugReports: http://github.com/mjg211/singlearm/issues
RoxygenNote: 6.1.0
RoxygenNote: 6.1.1
15 changes: 12 additions & 3 deletions R/des_bayesfreq.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' @param PL Predictive probability value used in determining when to stop the
#' trial early for futility.
#' @param PU Predictive probability value used in determining when to stop the
#' trial early for futility.
#' trial early for efficacy.
#' @param PT Terminal predictie probability value used in determining when the
#' trial is a success.
#' @param summary A logical variable indicating a summary of the function's
Expand Down Expand Up @@ -344,8 +344,17 @@ des_bayesfreq <- function(J = 2, pi0 = 0.1, pi1 = 0.3, alpha = 0.05, beta = 0.2,
pi0 = pi0, pi1 = pi1, alpha = alpha, beta = beta,
mu = mu, nu = nu,
opchar = feasible[1, ])
feasible[, c(1:6, 17)] <- dplyr::mutate_if(feasible[, c(1:6, 17)],
is.double, as.integer)
if (PL >= 0 & PU <= 1) {
range <- c(1:6, 17)
} else if (PL >= 0 & PU > 1) {
range <- c(1:4, 6, 17)
} else if (PL < 0 & PU <= 1) {
range <- c(1:2, 4:6, 17)
} else {
range <- c(1:2, 4, 6, 17)
}
feasible[, range] <- dplyr::mutate_if(feasible[, range], is.double,
as.integer)
}
}

Expand Down
2 changes: 1 addition & 1 deletion man/des_bayesfreq.Rd

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

0 comments on commit 8d17022

Please sign in to comment.