Skip to contents

A bootstrapped confidence interval for the desired estimator for the provided sample is calculated for a confidence level level.

Usage

plot_ci(
  sample,
  rep,
  bin_size = 30,
  n = "auto",
  level = 0.95,
  seed = NULL,
  title = "",
  y_axis = "Count",
  estimator = "mean",
  path = NULL
)

Arguments

sample

A numeric vector to bootstrap

rep

A integer vector for number of replicates

bin_size

A integer vector for number of bins representing intervals of equal size over the range

n

A integer or character vector for the size of bootstrap samples

level

A numeric vector for the confidence level

seed

A integer vector as seed.

title

A character vector for the title of the histogram

y_axis

A character vector for the name of the y axis

estimator

A character vector containing one of the("mean", "median", "var", "sd") estimators

path

A character vector for the path to directory from current directory to save plot

Value

ggplot object

Details

Other stats and parameters of the distribution and sample are also returned.

Examples

plot_ci(c(1, 2, 3, 4, 5, 6, 7), 1000, n = 100, level = 0.95)

plot_ci(c(1, 2, 3, 4, 5, 6, 7), 1000, n = 100, path = "../")
#> Saving 6.67 x 6.67 in image