Suppose x$estimate and y$estimate estimate the parameters xParm and yParm. Let Delta=yParm-xParm. This function tests hypotheses of the form,
alternative="two.sided" tests H0: Delta=delta versus H1: Delta != delta
alternative="less" tests H0: Delta >= delta versus H1: Delta< delta
alternative="greater" tests H0: Delta <= delta versus H1: Delta> delta
The test uses the theory of melding (Fay, Proschan and Brittain, 2015). The idea is to use confidence distribution random variables (CD-RVs). It is easiest to understand the melding confidence intervals by looking at the Monte Carlo implementation. Let nmc be the number of Monte Carlo replicates, then the simulated CD-RV associated with x are
Bx = x$estimate + x$stderr * rt(nmc,df=x$df). Similarly define By. Then the 95 percent melded confidence interval for Delta=yParm-xParm is estimated by
quantile(By-Bx, probs=c(0.025,0.975)).
When the estimates are means from normal distributions, then the meldtTest reduces to the Behrens-Fisher solution (see bfTest
).
Only one of x$stderr
or y$stderr
may be zero.