Learn R Programming

pwrss (version 0.3.1)

power.f.test: 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)

Value

power

statistical power \((1-\beta)\)

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

Examples

Run this code
# 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)

Run the code above in your browser using DataLab