Learn R Programming

MSPRT (version 2.1)

umpbt.oneT: The UMPBT alternative in one-sample T-tests

Description

This function finds the approximate data dependent UMPBT alternative (Table 1 in the main article) in one-sample T-tests. For more details please refer to the following references.

Usage

umpbt.oneT(side = "right", type1 = 0.005, n, null = 0, obs, s)

Arguments

side

a character; direction of the alternative hypothesis H1.

Has to be one of "right" or "left".

Default: "right".

type1

a numeric in (0,1); prespecified Type 1 error probability.

Default: 0.005.

n

a positive numeric (integer); sample size to be used.

null

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

Default: 0.

obs

a numeric vector; the vector of observations based on which the alternative needs to be calculated. This is ignored if s is provided.

s

a positive numeric; the sample standard deviation (sd) (of divisor (n-1)) of the obs.

Can be missing if obs is provided.

Value

Returns a numeric which is the UMPBT alternative in the one-sample T-test.

Details

We need either obs or s.

When we are implementing the MSPRT in one-sample T-test and we need the alternative at Step-5, this function requires all the data observed until Step-5 in the order they were observed.

References

MSPRT: main article and supplemental information

Johnson, Valen E., Uniformly most powerful Bayesian tests., Ann. of Stat., 41, (4), 2013, pp. 1716-1741

Johnson, Valen E., Revised standards for statistical evidence., Proceedings of the National Academy of Sciences, 16, 1945. (Specially it's supplemental file)

Examples

Run this code
# NOT RUN {
# a simulated ordered data at step-30
x.seq = rnorm(30,2,1.5)

# UMPBT alternative at step-30

## providing the data x.seq
umpbt.oneT(n= 60, obs= x.seq)

## providing the sd of x.seq
umpbt.oneT(n= 60, s= sd(x.seq))
# }

Run the code above in your browser using DataLab