implement.SBFHajnal_onez {NAP} | R Documentation |
Implement Sequential Bayes Factor using the Hajnal's ratio for one-sample z
-tests
Description
In a N(\mu,\sigma_0^2)
population with known variance \sigma_0^2
, consider the two-sided one-sample z
-test for testing the point null hypothesis H_0 : \mu = 0
against H_1 : \mu \neq 0
. For a sequentially observed data, this function implements the Sequential Bayes Factor design when the prior assumed on the standardized effect size \mu/\sigma_0
under the alternative places equal probability at +\delta
and -\delta
(\delta>0
prefixed).
Usage
implement.SBFHajnal_onez(obs, es1 = 0.3, sigma0 = 1,
RejectH1.threshold = exp(-3), RejectH0.threshold = exp(3),
batch.size, return.plot = TRUE, until.decision.reached = TRUE)
Arguments
obs |
Numeric vector. The vector of sequentially observed data. |
es1 |
Positive numeric. |
sigma0 |
Positive numeric. Known standard deviation in the population. Default: 1. |
RejectH1.threshold |
Positive numeric. |
RejectH0.threshold |
Positive numeric. |
batch.size |
Integer vector. The vector of batch sizes at each sequential comparison. Default: |
return.plot |
Logical. Whether a sequential comparison plot to be returned. Default: |
until.decision.reached |
Logical. Whether the sequential comparison is performed until a decision is reached or until the data is observed. Default: |
Value
A list with three components named N
, BF
, and decision
.
$N
contains the number of sample size used.
$BF
contains the Bayes factor values at each sequential comparison.
$decision
contains the decision reached. 'A'
indicates acceptance of H_0
, 'R'
indicates rejection of H_0
, and 'I'
indicates inconclusive.
Author(s)
Sandipan Pramanik and Valen E. Johnson
References
Hajnal, J. (1961). A two-sample sequential t-test.Biometrika, 48:65-75, [Article].
Schnuerch, M. and Erdfelder, E. (2020). A two-sample sequential t-test.Biometrika, 48:65-75, [Article].
Examples
out = implement.SBFHajnal_onez(obs = rnorm(100))