fixed_design.alt {MSPRT}R Documentation

Fixed-design alternative

Description

Given a sample size and prespecified Type I & II error probabilities, this function obtains the fixed-design alternative (\theta_a) for testing the point null hypothesis H_0 : \theta = \theta_0.

Usage

fixed_design.alt(test.type, side = "right", theta0, 
                 N, N1, N2, Type1 = 0.005, Type2 = 0.2, 
                 sigma = 1, sigma1 = 1, sigma2 = 1)

Arguments

test.type

Character. Type of test. Currently, the package only allows

  • oneProp for one-sample proportion tests

  • oneZ for one-sample z tests

  • oneT for one-sample t tests

  • twoZ for two-sample z tests

  • twoT for two-sample t tests.

side

Character. Direction of the composite alternative hypothesis. right for H_1 : \theta > \theta_0 (default), and left for H_1 : \theta < \theta_0.

theta0

Numeric. Hypothesized value of effect size (\theta_0) under H_0. Default: 0.5 in one-sample proportion tests, and 0 for others.

N

Positive integer. Sample size in one-sample tests.

N1

Positive integer. Sample size from Group-1 in two-sample tests.

N2

Positive integer. Sample size from Group-2 in two-sample tests.

Type1

Numeric in [0,1]. Prespecified Type I error probability. Default: 0.005.

Type2

Numeric in [0,1]. Prespecified Type II error probability. Default: 0.2.

sigma

Positive numeric. Known standard deviation in one-sample z tests. Default: 1.

sigma1

Positive numeric. Known standard deviation for Group-1 in two-sample z tests. Default: 1.

sigma2

Positive numeric. Known standard deviation for Group-2 in two-sample z tests. Default: 1.

Value

Numeric. The fixed-design alternative effect size (\theta_a).

Author(s)

Sandipan Pramanik, Valen E. Johnson and Anirban Bhattacharya

References

Pramanik S., Johnson V. E. and Bhattacharya A. (2020+). A Modified Sequential Probability Ratio Test. [Arxiv]

Examples


##### one-sample proportion test #####

## right-sided
fixed_design.alt(test.type = "oneProp", N = 30)

## left-sided
fixed_design.alt(side = "left", test.type = "oneProp", N = 30)


##### one-sample z test #####

## right-sided
fixed_design.alt(test.type = "oneZ", N = 30)

## left-sided
fixed_design.alt(side = "left", test.type = "oneZ", N = 30)


##### one-sample t test #####

## right-sided
fixed_design.alt(test.type = "oneT", N = 30)

## left-sided
fixed_design.alt(side = "left", test.type = "oneT", N = 30)


##### two-sample z test #####

## right-sided
fixed_design.alt(test.type = "twoZ", N1 = 30, N2 = 30)

## left-sided
fixed_design.alt(side = "left", test.type = "twoZ", N1 = 30, N2 = 30)


##### two-sample t test #####

## right-sided
fixed_design.alt(test.type = "twoT", N1 = 30, N2 = 30)

## left-sided
fixed_design.alt(side = "left", test.type = "twoT", N1 = 30, N2 = 30)

[Package MSPRT version 3.0 Index]