power1: Perform a power analysis, with plots for null and alternative...

Description Usage Arguments Value Examples

View source: R/power1.r

Description

Perform a power analysis, with plots for null and alternative distributions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
power1(
  mu0 = 50,
  mu1 = 50,
  sd = 10,
  n = 100,
  alpha = 0.05,
  alt.hyp = "mu1<>mu0",
  show.values = FALSE,
  show.means = FALSE
)

Arguments

mu0

A value for the mean under the null hypothesis

mu1

A value for the mean under the alternative hypothesis

sd

A positive value for the standard deviation for the population (null)

n

A value for the sample size

alpha

A value between .005 and .1 for the Type I error rate

alt.hyp

One of: "mu1<>mu0", "mu1<mu0", or "mu1>mu0"

show.values

Select whether Type I, II, and Power are displayed in plot.

show.means

Whether to plot means for Ho and Ha

Value

res Summary, included Type I error (alpha), Type II error (beta), and Power

Examples

1
 power1()

CLPS0900/CLPS0900R documentation built on March 16, 2020, 4:55 a.m.