Learn R Programming

MSPRT (version 2.1)

LR.twoT: Bayes factor in two-sample T-tests

Description

Given the simple null equals to 0 and a simple alternative hypothesis, this function calculates the bayes factor (BF) in favor of the alternative based on an observed data in two-sample T-tests.

Usage

LR.twoT(m1, m2, suff.stat1, suff.stat2, alt, s)

Arguments

m1

a postive numeric (integer); number of samples from Group-1 for computing the BF.

m2

a postive numeric (integer); number of samples from Group-2 for computing the BF.

suff.stat1

numeric; the value of sufficient statistic based on m1 samples from Group-1.

In this case, the sufficient statistic is the mean of these m1 observations.

suff.stat2

numeric; the value of sufficient statistic based on m2 samples from Group-2.

In this case, the sufficient statistic is the mean of these m2 observations.

alt

a numeric; the hypothesized value under the simple alternative.

s

a positive numeric; pooled sample standard deviation using m1 observations from Group-1 and m2 observations from Group-2.

Value

Returns a numeric denoting the BF in favor of alt in the two-sample T-test based on the observations.

References

MSPRT: supplemental information

Examples

Run this code
# NOT RUN {
LR.twoT(m1= 60, m2= 50, suff.stat1= 20, suff.stat2= 19, alt= 1, s= 1)
# }

Run the code above in your browser using DataLab