poolpower_t: Visualize T-test Power for Pooling Design

Description Usage Arguments Value Examples

View source: R/poolpower_t.R

Description

Useful for assessing efficiency gains that might be achieved with a pooling design.

Usage

1
2
3
4
poolpower_t(g = c(1, 3, 10), d = NULL, mu1 = NULL, mu2 = NULL,
  sigsq = NULL, sigsq1 = sigsq, sigsq2 = sigsq, sigsq_p = 0,
  sigsq_m = 0, multiplicative = FALSE, alpha = 0.05, beta = 0.2,
  assay_cost = 100, other_costs = 0, labels = TRUE)

Arguments

g

Numeric vector of pool sizes to include.

d

Numeric value specifying true difference in group means.

mu1, mu2

Numeric value specifying group means. Required if multiplicative = TRUE.

sigsq

Numeric value specifying the variance of observations.

sigsq1, sigsq2

Numeric value specifying the variance of observations for each group.

sigsq_p

Numeric value specifying the variance of processing errors.

sigsq_m

Numeric value specifying the variance of measurement errors.

multiplicative

Logical value for whether to assume multiplicative rather than additive errors.

alpha

Numeric value specifying type-1 error rate.

beta

Numeric value specifying type-2 error rate.

assay_cost

Numeric value specifying cost of each assay.

other_costs

Numeric value specifying other per-subject costs.

labels

Logical value.

Value

Plot of power vs. total costs generated by ggplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Plot power vs. total study costs for d = 0.25, sigsq = 1, and costs of $100
# per assay and $0 in other per-subject costs.
poolpower_t(d = 0.5, sigsq = 1, assay_cost = 100, other_costs = 0)

# Repeat but with $10 in per-subject costs.
poolpower_t(d = 0.5, sigsq = 1, assay_cost = 100, other_costs = 10)

# Back to no per-subject costs, but with processing and measurement error
poolpower_t(d = 0.5, sigsq = 1, sigsq_p = 0.2, sigsq_m = 0.1,
            assay_cost = 100, other_costs = 0)

pooling documentation built on Feb. 13, 2020, 9:07 a.m.

Related to poolpower_t in pooling...