Learn R Programming

MSPRT (version 2.1)

LR.oneT: Bayes factor in one-sample T-tests

Description

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

Usage

LR.oneT(m, suff.stat, null = 0, alt, s)

Arguments

m

a postive numeric (integer); number of samples for computing the BF.

suff.stat

numeric; the value of sufficient statistic based on m observed data.

In this case, the sufficient statistic is the sum of m observations.

null

a numeric; the hypothesized value of population mean under the simple null.

Default: 0.

alt

a numeric; the hypothesized value of population mean under the simple alternative.

s

a positive numeric; sample standard deviation (with divisor (m-1)) of the m observations.

Value

Returns a numeric denoting the BF in favor of alt in one-sample T-tests based on m observations.

References

MSPRT: supplemental information

Examples

Run this code
# NOT RUN {
LR.oneT(m= 60, suff.stat= 20.2, alt= 1.5, s= 1.2)
# }

Run the code above in your browser using DataLab