adapt.a: Adaptive Alpha

Description Usage Arguments Value Author(s) References Examples

Description

Compute an alpha value adjusted for sample size. The adjusted value is based on Perez and Pericchi's (2014) formula (equation 11, see below) using a reference sample, which can be defined a priori or estimated using the sample size calculation from power.

α * √(n0 times (log(n0) + χ^2_α(1))) / √(n* times (log(n*) + χ^2_α(1)))

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
adapt.a(
  test = c("anova", "chisq", "cor", "one.sample", "two.sample", "paired"),
  ref.n = NULL,
  n = NULL,
  alpha = 0.05,
  power = 0.8,
  efxize = c("small", "medium", "large"),
  groups = NULL,
  df = NULL
)

Arguments

test

Type of statistical test being used. Can be any of the tests listed

ref.n

n0 in the above equation. Reference sample size. If sample size was determined a priori, then the reference number of participants can be set. This removes the calculation of sample size based on power

n

n* in the above equation. Number of participants in the experiment sample (or per group)

alpha

α in the above equation. Alpha value to adjust. Defaults to .05

power

Power (1 - β) value. Used to estimate the reference sample size (n0). Defaults to .80

efxize

Effect size to be used to estimate the reference sample size. Effect sizes are based on Cohen (1992). Numeric values can be used. Defaults to "medium"

groups

Number of groups (only for test = "anova")

df

Number of degrees of freedom (only for test = "chisq")

Value

A list containing the following objects:

adapt.a

The adapted alpha value

crit.value

The critical value associated with the adapted alpha value

orig.a

The original alpha value

ref.n

The reference sample size based on alpha, power, effect size, and test

exp.n

The sample size of the experimental sample

power

The power used to determine the reference sample size

test

The type of statistical test used

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

References

Cohen, J. (1992). A power primer. Psychological Bulletin, 112, 155-159.

Perez, M. E., & Pericchi, L. R. (2014). Changing statistical significance with the amount of information: The adaptive a significance level. Statistics & Probability Letters, 85, 20-24.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#ANOVA
adapt.anova <- adapt.a(test = "anova", n = 200, alpha = .05, power = .80, groups = 3)

#Chi-square
adapt.chisq <- adapt.a(test = "chisq", n = 200, alpha = .05, power = .80, df = 3)

#Correlation
adapt.cor <- adapt.a(test = "cor", n = 200, alpha = .05, power = .80)

#One-sample t-test
adapt.one <- adapt.a(test = "one.sample", n = 200, alpha = .05, power = .80)

#Two-sample t-test
adapt.two <- adapt.a(test = "two.sample", n = 200, alpha = .05, power = .80)

#Paired sample t-test
adapt.paired <- adapt.a(test = "paired", n = 200, alpha = .05, power = .80, efxize = "medium")

NetworkToolbox documentation built on May 28, 2021, 5:11 p.m.