Type2.fixed_design {MSPRT} | R Documentation |
Type II error probability of fixed design tests
Description
Obtains the Type II error probability of fixed-design tests for testing the point null hypothesis H_0 : \theta = \theta_0
.
Usage
Type2.fixed_design(theta, test.type, side = "right", theta0,
N, N1, N2, Type1 = 0.005,
sigma = 1, sigma1 = 1, sigma2 = 1)
Arguments
theta |
Numeric. Effect size where the Type II error probability is desired. |
test.type |
Character. Type of test. Currently, the package only allows
|
side |
Character. Direction of the composite alternative hypothesis. |
theta0 |
Numeric. Hypothesized value of effect size ( |
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. |
sigma |
Positive numeric. Known standard deviation in one-sample |
sigma1 |
Positive numeric. Known standard deviation for Group-1 in two-sample |
sigma2 |
Positive numeric. Known standard deviation for Group-2 in two-sample |
Value
Numeric in [0,1]. The Type II error probability of the fixed-design test at the specified effect size value theta
.
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
Type2.fixed_design(theta = seq(0, 1, length.out = 10),
test.type = "oneProp", N = 30)
## left-sided
Type2.fixed_design(theta = seq(0, 1, length.out = 10), side = "left",
test.type = "oneProp", N = 30)
##### one-sample z test #####
## right-sided
Type2.fixed_design(theta = seq(0, 1, length.out = 10),
test.type = "oneZ", N = 30)
## left-sided
Type2.fixed_design(theta = seq(-1, 0, length.out = 10), side = "left",
test.type = "oneZ", N = 30)
##### one-sample t test #####
## right-sided
Type2.fixed_design(theta = seq(0, 1, length.out = 10),
test.type = "oneT", N = 30)
## left-sided
Type2.fixed_design(theta = seq(-1, 0, length.out = 10), side = "left",
test.type = "oneT", N = 30)
##### two-sample z test #####
## right-sided
Type2.fixed_design(theta = seq(0, 1, length.out = 10),
test.type = "twoZ", N1 = 30, N2 = 30)
## left-sided
Type2.fixed_design(theta = seq(-1, 0, length.out = 10), side = "left",
test.type = "twoZ", N1 = 30, N2 = 30)
##### two-sample t test #####
## right-sided
Type2.fixed_design(theta = seq(0, 1, length.out = 10),
test.type = "twoT", N1 = 30, N2 = 30)
## left-sided
Type2.fixed_design(theta = seq(-1, 0, length.out = 10), side = "left",
test.type = "twoT", N1 = 30, N2 = 30)