0-Generic-F-Test: Statistical Power for the Generic F Test

power.f.testR Documentation

Statistical Power for the Generic F Test

Description

Calculates statistical power for the generic F test with (optional) Type I and Type II error plots. Unlike other more specific functions power.f.test() function allows multiple values for one parameter at a time (only when plot = FALSE).

Usage

power.f.test(ncp, df1, df2, alpha = 0.05, plot = TRUE,
             plot.main = NULL, plot.sub = NULL,
             verbose = TRUE)

Arguments

ncp

non-centrality parameter (lambda)

alpha

probability of type I error

df1

numerator degrees of freedom

df2

denominator degrees of freedom

plot

if TRUE plots Type I and Type II error

plot.main

plot title

plot.sub

plot subtitle

verbose

if FALSE no output is printed on the console. Useful for simulation, plotting, and whatnot

Value

power

statistical power (1-\beta)

Examples

# power is defined as the probability of observing F-statistics
# greater than the critical F value
power.f.test(ncp = 1, df1 = 4, df2 = 100, alpha = 0.05)

# power of multiple F-statistics
power.f.test(ncp = c(1.0, 1.5, 2.0, 2.5), plot = FALSE,
             df1 = 4, df2 = 100, alpha = 0.05)


pwrss documentation built on April 12, 2023, 12:34 p.m.