erri_bootstrap: Bootstrap Uncertainty for ERRI

View source: R/bootstrap.R

erri_bootstrapR Documentation

Bootstrap Uncertainty for ERRI

Description

Uses a residual bootstrap of the pre-shock counterfactual model and propagates counterfactual uncertainty to components and ERRI.

Usage

erri_bootstrap(object, R = 499L, block_length = 1L, level = 0.95,
  seed = NULL)

## S3 method for class 'erri_bootstrap'
print(x, digits = 2, ...)

Arguments

object

An object returned by erri().

R

Number of bootstrap replications; at least 20.

block_length

Positive integer residual-block length.

level

Confidence level.

seed

Optional integer seed.

x

An erri_bootstrap object.

digits

Number of digits to display.

...

Additional arguments, currently unused.

Value

An object of class erri_bootstrap containing replicate estimates and percentile confidence intervals.

Examples

fit <- erri(erri_example_data(), "year", "income", 2020, "region")
boot <- erri_bootstrap(fit, R = 49, seed = 1)
boot

ERRI documentation built on Sept. 28, 2026, 5:08 p.m.