pB {Bvalue} R Documentation

## The B-Value Distribution

### Description

This function gives the cumulative distribution function of the B-value.

### Usage

pB(b, nu, delta = 0, S = 1, alpha = 0.05, type = c("marginal", "cond_NRej", "cond_Rej"))


### Arguments

 b vector of quantiles nu an integer, the degrees of freedom in the conventional t-test. delta a numeric value. Considering testing for difference of two population means, delta is the null value of the difference. Default is 0. S a numeric value. The standard error in the conventional t-test. alpha a numeric between 0 and 1. The Type I error rate aiming to control in the conventional t-test. type a character to specify the type of EEB to be calculated. type = "marginal" gives the marginal EEB; type = "cond_NRej" gives the EEB under the condition that one cannot reject the first-stage conventional t-test; type = "cond_Rej" gives the EEB under the condition that the first-stage conventional t-test is rejected.

### Details

Consider a two-sample t-test setting with hypotheses

where δ=μ_{1}-μ_{2} is the difference of two population means. If the testing result is failure to reject the null, one cannot directly conclude equivalence of the two groups. In this case, an equivalence test is suggested by testing the hypotheses

where Δ is a pre-specified equivalence bound. A 100(1-2α)\% confidence interval is formulated, denoted as [L,U], to test for equivalence, where

\hat{δ} is the estimate of δ, t_{ν,1-α} is the 100(1-α)\% quantile of a t-distribution with degrees of freedom ν, and S is the standard error. We define the B-value as

B=\max\{|L|,|U|\}.

The cumulative distribution function of the B-value is defined under three conditions: (1) the marginal distribution (type = "marginal"); (2) the conditional distribution given that one cannot reject H_{0} in the conventional t-test (type = "cond_NRej"); and (3) the conditional distribution given that H_{0} is rejected in the conventional t-test (type = "cond_Rej").

### Value

Gives the cumulative distribution function of the B-value.

### Author(s)

Yi Zhao, Indiana University, <zhaoyi1026@gmail.com>

Brian Caffo, Johns Hopkins University, <bcaffo@gmail.com>

Joshua Ewen, Kennedy Krieger Institute and Johns Hopkins University, <ewen@kennedykrieger.org>

### References

Zhao et al. (2019) "B-Value and Empirical Equivalence Bound: A New Procedure of Hypothesis Testing" <arXiv:1912.13084>

EEB

### Examples

############################################
# An Example: demonstration of marginal/conditional distribution of the B-value
alpha<-0.05

delta<-0
n1=n2=n<-10
S<-0.325
nu<-n1+n2-2

# compare three types of B-value distributions
par(mar=c(6,5,2,2))
plot(c(0,2),c(0,1),type="n",xlab=expression(b),ylab=expression(F[B](b*~"|"*~C,H)),
cex.lab=1.25,cex.axis=1.25,cex.main=1.25)
abline(h=1,lty=1,lwd=2,col=8)
abline(h=0,lty=1,lwd=2,col=8)
curve(pB(x,nu=nu,delta=delta,S=S,alpha=alpha,type="marginal"),