power_curves: Power Curves varying delta

Description Usage Arguments Value Examples

Description

Power Curves varying delta

Usage

1
power_curves(delta, n, theta = seq(-3, 3, 0.001), prob = "null")

Arguments

delta

Numeric vector. The width of the indifference zone in SD units.

n

Numeric. The sample size.

theta

Numeric vector. The "true" effect size (i.e., the default is seq(-3, 3, 0.001).

prob

Character. The probability of interest (i.e., if you are interested in the probability that pδ = 0 use null). Must be one of the following:

  • null

  • alternative

  • inconclusive

Value

A plot of the power curves

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Figure S3 from the second generation P-value paper. The relationship between
## the probability that p_delta = 0 varying delta.

power_curves(delta = c(0, 1/30, 1/2, 1), n = 10, prob = "null")

## Figure S5 from the second generation P-value paper. The relationship
## between probability of data supported compatibility with the null hypothesis,
## and various deltas

## n = 40 (Figure S5 left)
power_curves(delta = c(0, 1/30, 1/2, 1), n = 40, prob = "alternative")
## n = 200 (Figure S5 right)
power_curves(delta = c(0, 1/30, 1/2, 1), n = 200, prob = "alternative")

## Figure S6 from the second generation P-value paper. The relationship between
## the probability of an inconclusive result and various deltas.

## n = 20 (Figure S6 left)
power_curves(delta = c(0, 1/30, 1/2, 1), n = 20, prob = "inconclusive")
## n = 200 (Figure S6 right)
power_curves(delta = c(0, 1/30, 1/2, 1), n = 200, prob = "inconclusive")

LucyMcGowan/sgpvalue documentation built on May 3, 2019, 4:30 p.m.