Skip to content

Commit a7b19d8

Browse files
committed
clean
1 parent 7ccf3d9 commit a7b19d8

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

R/plotBeta.R

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ plotBeta <- function(alpha, beta) {
6363
#' @export
6464
#' @keywords graphics
6565
plotBetaDiff <- function(
66-
parX, # parameters of control or SOC
67-
parY, # parameters of experimental arm
68-
go_cut = 0.20, # a meaningful improvement threshold
69-
stop_cut = 0.1, # a poor improvement threshold
70-
shade = TRUE, # paint the two areas under the curve
71-
note = TRUE) {
66+
parX, # parameters of control or SOC
67+
parY, # parameters of experimental arm
68+
go_cut = 0.20, # a meaningful improvement threshold
69+
stop_cut = 0.1, # a poor improvement threshold
70+
shade = TRUE, # paint the two areas under the curve
71+
note = TRUE
72+
) {
7273
# show values of the colored area
7374
assert_numeric(parX, lower = 0, finite = TRUE, any.missing = FALSE)
7475
assert_numeric(parY, lower = 0, finite = TRUE, any.missing = FALSE)
@@ -80,12 +81,12 @@ plotBetaDiff <- function(
8081
diff <- seq(from = -1, to = 1, length = 1000)
8182
data <- data.frame(
8283
grid = diff,
83-
density = phase1b::dbetadiff(z = diff, parY = parY, parX = parX)
84+
density = dbetadiff(z = diff, parY = parY, parX = parX)
8485
)
8586
data$stop <- ifelse(diff > -1 & diff < stop_cut, TRUE, FALSE)
8687
data$go <- ifelse(diff > go_cut & diff < 1, TRUE, FALSE)
8788

88-
temp <- phase1b::sumBetaDiff(
89+
temp <- sumBetaDiff(
8990
parX = parX,
9091
parY = parY,
9192
go_cut = go_cut, # in response rate

man/sumBetaDiff.Rd

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)