Skip to contents

Estimate variance for each group and bootstrap the alpha-confidence intervals.

Usage

resample_variance(data, alphas = 0.05, M = 1000)

Arguments

data

Data.frame with the first column the values and the second column the group names

alphas

Vector of significances for confidence intervals, defaults to 0.05

M

Numeric for the number of iterations in the resampling

Value

Matrix with variance and alpha-confidence intervals for each group

Examples

data <- data.frame(
  "value" = c(rnorm(14, sd = 2), rnorm(6), rnorm(20, mean = 2)),
  "group" = c(rep("A", 14), rep("B", 6), rep("C", 20))
)
resample_variance(data)
#>              A         B         C
#> vars  2.671047 0.9049938 0.7071057
#> 2.5%  1.048233 0.1618004 0.3654389
#> 97.5% 4.375141 1.5660947 1.0164609