Calculate bootstrapped confidence intervals#
- assesspy.boot_ci(fun, nboot=100, alpha=0.05, **kwargs)#
Calculate the non-parametric bootstrap confidence interval for a given numeric input and a chosen function.
- Parameters:
fun (function) – Function to bootstrap. Must return a single value.
nboot (int) – Default 100. Number of iterations to use to estimate the output statistic confidence interval.
alpha (float) – Default 0.05. Numeric value indicating the confidence interval to return. 0.05 will return the 95% confidence interval.
kwargs (numeric) – Arguments passed on to
fun
.
Note
Input function should require 1 argument or be
assesspy.prd()
.- Returns:
A two-long list of floats containing the bootstrapped confidence interval of the input vector(s).
- Return type:
list[float]
- Example:
# Calculate PRD confidence interval: import assesspy as ap ap.boot_ci( ap.prd, assessed = ap.ratios_sample().assessed, sale_price = ap.ratios_sample().sale_price, nboot = 100 )