fupower: Power for followup studies

Description Usage Arguments Details Author(s) Examples

View source: R/power.R

Description

Provides a simple calculation of power for followup studies using only the discovery P-value and sample size, and followup sample size(s).

Usage

1
2
3
fupower(p0, n0, n1, beta0, invlog = FALSE, alpha = 0.05,
        plty = c("solid", "dashed", "dotdash"), elty = "dotted",
        pcol = "red", ecol = "blue")

Arguments

p0

Discovery P-value

n0

Discovery sample size

n1

Vector of followup sample size(s)

beta0

Discovery effect size (optional)

invlog

Whether to label x-axis using inverse log transformed values

alpha

Alpha level for one-sided followup test

plty

Power line type, recycled to length of n1

elty

Effect line type

pcol

Power line colour, recycled to length of n1

ecol

Effect line colour

Details

See the examples.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
par(mar = c(3, 3, 0, 0) + 0.5, mgp = c(2, 1, 0), mfrow = c(3, 2))
fupower(.05, 1000, c(1000, 300), beta0 = log(1.5), invlog = TRUE)
fupower(5e-4, 1000, c(1000, 300), beta0 = log(1.5), invlog = TRUE)
fupower(5e-8, 1000, c(1000, 300), beta0 = log(1.5), invlog = TRUE)

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.