This function will plot the PDF of a difference between two Beta distributions
Arguments
- parX
(
numeric
):
non-negative parameters of the control Beta distribution- parY
(
numeric
):
non-negative parameters of the treatment Beta distribution.- go_cut
(
number
):
a meaningful improvement threshold, the lower boundary of a meaningfully improvement in response rate- stop_cut
(
number
):
a poor improvement threshold, the upper boundary of a meaningfully poor improvement in response rate- shade
(
flag
):
paint the two areas under the curve, default value = TRUE- note
(
flag
):
show values of the colored area, default value = TRUE
Examples
# The following examples use these parameters:
parX <- c(1, 52)
parY <- c(5.5, 20.5)
# Calculate probability based on quantile `Q(Z) =< 0.122838`
pbetadiff(
q = 0.122838,
parY = parY,
parX = parX
)
#> [1] 0.2000019
# Calculate probability based on quantile `Q(Z) =< 0.5`
pbetadiff(
q = 0.5,
parY = parY,
parX = parX
)
#> [1] 0.9993969