| pwr_freq {bayesassurance} | R Documentation | 
Frequentist Power Computation
Description
Constructs a simple hypothesis testing framework based on the parameters specified and returns the corresponding frequentist power.
Usage
pwr_freq(n, theta_0, theta_1, sigsq, alt, alpha)
Arguments
| n | sample size (either scalar or vector) | 
| theta_0 | initial value the parameter is set equal to in the null
hypothesis, where  | 
| theta_1 | alternative value to be compared to theta_0. See alt for specification options. | 
| sigsq | known variance  | 
| alt | specifies comparison between  | 
| alpha | significance level | 
Value
objects corresponding to the power
- pwr_table: table of sample sizes and corresponding power values. 
- pwr_plot: power curve that is only returned if n is a vector. This power curve covers a wider range of sample sizes than the inputted values specified for n, where specific power values are marked in red. 
- power_val: single power value that is returned if n is a scalar. 
Examples
n <- seq(10, 140, 5)
theta_0 <- 0.15
theta_1 <- 0.35
sigsq <- 0.3
pwr_vals <- pwr_freq(n = n, theta_0 = theta_0, theta_1 = theta_1, 
sigsq = sigsq, alt = "greater", alpha = 0.05)
pwr_vals$pwr_plot