power_z_cor: Power Calculations for Correlations

View source: R/power_correlations.R

power_z_corR Documentation

Power Calculations for Correlations

Description

[Maturing]

Calculates the approximate power for a z-test based on a Pearson product-moment correlation.

Usage

power_z_cor(
  n = NULL,
  rho = NULL,
  power = NULL,
  null = 0,
  alpha = NULL,
  alternative = c("two.sided", "less", "greater", "equivalence")
)

powerTOSTr(alpha, statistical_power, N, low_eqbound_r, high_eqbound_r)

Arguments

n

number of observations.

rho

true correlation value (alternative hypothesis).

power

statistical power (1-beta).

null

the null hypothesis value.

alpha

a priori alpha-level (i.e., significance level).

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater", "less", or "equivalence" (TOST). You can specify just the initial letter.

statistical_power

Deprecated. desired power (e.g., 0.8)

N

Deprecated. number of pairs (e.g., 96)

low_eqbound_r

Deprecated. lower equivalence bounds (e.g., -0.3) expressed in a correlation effect size

high_eqbound_r

Deprecated. upper equivalence bounds (e.g., 0.3) expressed in a correlation effect size

Value

An object of the class power.htest. This will include the sample size (n), power, beta (1-power), alpha (significance level), null value(s), alternative hypothesis, and a text string detailing the method.

powerTOSTr has been replaced by the power_z_cor function. The function is only retained for historical purposes.

See Also

Other Correlations: boot_cor_test(), corsum_test(), plot_cor(), z_cor_test()

Other power: power_eq_f(), power_t_TOST()

Examples

## Sample size for alpha = 0.05, 90% power, equivalence bounds of
## r = -0.1 and r = 0.1, assuming true effect = 0
#powerTOSTr(alpha=0.05, statistical_power=0.9, low_eqbound_r=-0.1, high_eqbound_r=0.1)
power_z_cor(alternative = "equivalence", alpha = .05, null = .1, power = .9, rho = 0)

## Sample size for alpha = 0.05, N=536, equivalence bounds of
## r = -0.1 and r = 0.1, assuming true effect = 0
#powerTOSTr(alpha=0.05, N=536, low_eqbound_r=-0.1, high_eqbound_r=0.1)
power_z_cor(alternative = "equivalence", alpha = .05, null = .1, n = 536, rho = 0)

## Equivalence bounds for alpha = 0.05, N=536, statistical power of
## 0.9, assuming true effect = 0
#powerTOSTr(alpha=0.05, N=536, statistical_power=0.9)


Lakens/TOSTER documentation built on April 17, 2024, 6:42 p.m.