Calculates the \(z\), \(t\), \(\chi^2\), or \(F\) critical value/s of confidence limits associated with the specified significance level/s \(\left( \alpha \right)\) .

alpha2crit(
  alpha = c(0.001, 0.01, 0.05),
  dist = "z",
  two.tailed = TRUE,
  right.tail = TRUE,
  ...
)

Arguments

alpha

Numeric vector. Significance level \(\left( \alpha \right)\) . By default, alpha is set to conventional significance levels alpha = c(0.001, 0.01, 0.05).

dist

Character string. dist = "z" for the standard normal distribution. dist = "t" for the t distribution. dist = "F" for the F distribution. dist = "chisq" for the chi-square distribution.

two.tailed

Logical. If TRUE, two-tailed alpha. If FALSE, one-tailed alpha. Ignored if dist = "F" or dist = "chisq" as both tests are one-tailed using the right tail.

right.tail

Logical. If TRUE, right tail (positive critical value). If FALSE, left tail (negative critical value). Ignored if two.tailed = TRUE. Ignored if dist = "F" or dist = "chisq" as both tests are one-tailed using the right tail.

...

Degrees of freedom. df for dist = "t" and dist = "chisq". df1 and df2 for dist = "F".

Value

Returns \(z\), \(t\), \(\chi^2\), or \(F\) critical value/s associated with the specified significance level/s \(\left( \alpha \right)\). The results are sorted from smallest to largest.

References

Wikipedia: Statistical significance

Wikipedia: Confidence interval

See also

Other alpha functions: alpha2prob(), ci2crit(), ci2prob(), nhstplot()

Examples

# z two-tailed ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ) )
#> [1] -3.290527 -2.575829 -1.959964 1.959964 2.575829 3.290527
## single numeric value alpha2crit(alpha = 0.05)
#> [1] -1.959964 1.959964
# t two-tailed ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "t", df = 1000 )
#> [1] -3.300283 -2.580755 -1.962339 1.962339 2.580755 3.300283
## single numeric value alpha2crit( alpha = 0.05, dist = "t", df = 1000 )
#> [1] -1.962339 1.962339
# z one-tailed right ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "z", two.tailed = FALSE )
#> [1] 3.090232 2.326348 1.644854
# t one-tailed right ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "t", two.tailed = FALSE, df = 5 )
#> [1] 5.893430 3.364930 2.015048
# F one-tailed ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "F", two.tailed = FALSE, df1 = 2, df2 = 2 )
#> [1] 19 99 999
# chisq one-tailed ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "chisq", two.tailed = FALSE, df = 1 )
#> [1] 3.841459 6.634897 10.827566
# z one-tailed left ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "z", two.tailed = FALSE, right.tail = FALSE )
#> [1] -3.090232 -2.326348 -1.644854
# t one-tailed left ## vector alpha2crit( alpha = c( 0.001, 0.01, 0.05 ), dist = "t", two.tailed = FALSE, right.tail = FALSE, df = 5 )
#> [1] -5.893430 -3.364930 -2.015048