compare_bootstrap {exactamente}R Documentation

Compare Bootstrap Distributions

Description

This function generates a plot comparing the density estimates of the exact and regular bootstrap distributions.

Usage

compare_bootstrap(
  exact_bootstrap_distribution,
  regular_bootstrap_distribution,
  title = "Comparison of Bootstrap Distributions"
)

Arguments

exact_bootstrap_distribution

An named list returned from exact_bootstrap() with components dens$x (the coordinates of the points where the density is estimated) and y (the estimated density values), representing the density estimate of the exact bootstrap sample statistic.

regular_bootstrap_distribution

An named list returned from reg_bootstrap() with components dens$x (the coordinates of the points where the density is estimated) and y (the estimated density values), representing the density estimate of the regular bootstrap sample statistic.

title

Plot title

Value

A ggplot object showing the density estimates of the exact and regular bootstrap sample statistics, with different colors used to distinguish between the two.

Examples

set.seed(123)
data <- rnorm(5)
exact_bootstrap_result <- exact_bootstrap(data)
regular_bootstrap_result <- reg_bootstrap(data)
compare_bootstrap(exact_bootstrap_result,
                  regular_bootstrap_result)

[Package exactamente version 0.1.1 Index]