poolvar_t: Visualize Ratio of Variance of Each Pooled Measurement to...

Description Usage Arguments Value Examples

View source: R/poolvar_t.R

Description

Useful for determining whether pooling is a good idea, and finding the optimal pool size if it is.

Usage

1
2
3
4
poolvar_t(g = 1:10, mu1 = NULL, mu2 = NULL, sigsq = NULL,
  sigsq1 = sigsq, sigsq2 = sigsq, sigsq_p = 0, sigsq_m = 0,
  multiplicative = FALSE, assay_cost = 100, other_costs = 0,
  labels = TRUE, ylim = NULL)

Arguments

g

Numeric vector of pool sizes to include.

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.

assay_cost

Numeric value specifying cost of each assay.

other_costs

Numeric value specifying other per-subject costs.

labels

Logical value.

ylim

Numeric vector.

Value

Plot generated by ggplot.

Examples

1
2
3
4
5
# Plot ratio of variances vs. pool size with default settings
poolvar_t(sigsq = 1)

# Add processing error and other per-subject costs
poolvar_t(sigsq = 1, sigsq_p = 0.2, other_costs = 0.1)

vandomed/pooling documentation built on Feb. 22, 2020, 8:58 p.m.