fixedHajnal.onet_es: Fixed-design one-sample t-tests using Hajnal's ratio for...

Description Usage Arguments Value Author(s) References Examples

View source: R/NAPfunctions.R

Description

In two-sided fixed design one-sample t-tests with composite alternative prior assumed on the standardized effect size μ/σ under the alternative, this function calculates the expected log(Hajnal's ratio) at a prefixed standardized effect size for a varied range of sample sizes.

Usage

1
2
fixedHajnal.onet_es(es = 0, es1 = 0.3, nmin = 20, nmax = 5000, 
                    batch.size.increment, nReplicate = 50000)

Arguments

es

Numeric. Standardized effect size where the expected weights of evidence is desired. Default: 0.

es1

Positive numeric. Default: 0.3. For this, the composite alternative prior on the standardized effect size μ/σ takes values 0.3 and -0.3 each with equal probability 1/2.

nmin

Positive integer. Minimum sample size to be considered. Default: 20.

nmax

Positive integer. Maximum sample size to be considered. Default: 5000.

batch.size.increment

Positive numeric. Increment in sample size. The sequence of sample size thus considered for the fixed design test is from nmin to nmax with an increment of batch.size.increment. Default: function(narg){20}. This means an increment of 20 samples at each step.

nReplicate

Positve integer. Number of replicated studies based on which the expected weights of evidence is calculated. Default: 50,000.

Value

A list with two components named summary and BF.

$summary is a data frame with columns n containing the values of sample sizes and avg.logBF containing the expected log(Hajnal's ratios) at those values.

$BF is a matrix of dimension number of sample sizes considered by nReplicate. Each row contains the Hajnal's ratios at the corresponding sample size in nReplicate replicated studies.

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

1
out = fixedHajnal.onet_es(nmax = 100)

NAP documentation built on Jan. 6, 2022, 5:07 p.m.