Learn R Programming

CAISEr (version 0.3.3)

se_boot: Bootstrap standard errors

Description

Calculates the standard error of a given statistic using bootstrap

Usage

se_boot(x1, x2, dif, boot.R = 999)

Arguments

x1

vector of observations

x2

vector of observations

dif

name of the difference for which the SE is desired. Accepts "simple" (simple differences) or "perc" (percent differences).

boot.R

(optional) number of bootstrap resamples

Value

estimated standard error

References

  • A.C. Davison, D.V. Hinkley: Bootstrap methods and their application. Cambridge University Press (1997)

  • F. Campelo, F. Takahashi: Sample size estimation for power and accuracy in the experimental comparison of algorithms (submitted, 2017).

Examples

Run this code
# NOT RUN {
# two vectors of normally distributed observations
set.seed(1234)
x1 <- rnorm(100, 5, 1)  # mean = 5, sd = 1
x2 <- rnorm(200, 10, 2) # mean = 10, sd = 2

# Theoretical SE for simple difference: 0.1732051
se_boot(x1, x2, dif = "simple")

# Theoretical (Fieller, no covariance) SE for percent differences: 0.04
se_boot(x1, x2, dif = "perc")
# }

Run the code above in your browser using DataLab