pwr.r.test.contour: Plot a Power Contour for a correlation analysis

Description Usage Arguments Value Author(s) Examples

View source: R/convenience.R

Description

Plot a contour of sample size, effect size and power for correlation comparisons in the style of Richard Morey's jpower JAMOVI module.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pwr.r.test.contour(
  nmin,
  nmax,
  rmin,
  rmax,
  sig.level = 0.05,
  alternative = c("two.sided", "less", "greater"),
  pwrbands = c(0.5, 0.8, 0.95),
  alpha = 0.6
)

Arguments

nmin

Minimum sample size for the plot.

nmax

Maximum sample size for the plot.

rmin

Minimum Pearson's r for the plot.

rmax

Maximum Pearson's r for the plot.

sig.level

Significance level, or alpha. Defaults to 0.05.

alternative

The alternative hypothesis. The default is "two.sided", but other options are "less" or "greater".

pwrbands

Additional black power bands to display on the figure to emphasise certain power levels. Defaults to c(0.5, 0.8, 0.95).

alpha

The transparency of the contours, in order to show grid lines below.

Value

A ggplot2 object.

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples

1
pwr.r.test.contour(5, 100, 0.1, 0.7, sig.level=0.05)

mathesong/pwrcontour documentation built on Jan. 1, 2021, 9:19 a.m.