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

H_{0}:δ=0 \quad ≤ftrightarrow \quad H_{1}:δ\neq 0,

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

H_{3}:|δ|≥qΔ \quad ≤ftrightarrow \quad H_{4}:|δ|<Δ,

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

L=\hat{δ}-t_{ν,1-α}S, \quad U=\hat{δ}+t_{ν,1-α}S,

\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>

See Also

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
oldpar<-par(no.readonly=TRUE)
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[0])),
     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"),
      lty=1,lwd=3,col=1,n=1000,from=0,to=20,add=TRUE)
curve(pB(x,nu=nu,delta=delta,S=S,alpha=alpha,type="cond_NRej"),
      lty=2,lwd=3,col=2,n=1000,from=0,to=20,add=TRUE)
curve(pB(x,nu=nu,delta=delta,S=S,alpha=alpha,type="cond_Rej"),
      lty=3,lwd=3,col=4,n=1000,from=0,to=20,add=TRUE)
par(fig=c(0,1,0,1),oma=c(0,0,0,0),mar=c(0,2,0,2),new=TRUE)
plot(0,0,type="n",bty="n",xaxt="n",yaxt="n")
legend("bottom",legend=c("marginal","conditional (not reject)","conditional (reject)"),
       xpd=TRUE,horiz=TRUE,inset=c(0,0),col=c(1,2,4),lty=c(1,2,3),lwd=2,bty="n",cex=1.25)
par(oldpar)
############################################

[Package Bvalue version 1.0 Index]