segreg.bootstrap.boot_conf_intervals

boot_conf_intervals(indep, dep, estimator, display_name=None, resample_cases=False, significance=0.05, num_sims=10000, verbose=True, seed=None, precision=4)[source]

Bootstrap confidence intervals for regression models.

A convenience method to produce formatted outputs for presenting results. Returns confidence intervals of the regression model parameters for three types of confidence interval:

BCa (bias-corrected and accelerated) percentile basic

The “basic” bootstrap confidence intervals follows the nomenclature of Davison and Hinkley.

References

These are described in numerous sources such as:

Davison, A.C., & Hinkley, D.V. (1997). “Bootstrap Methods and their Application”. Cambridge University Press.

DiCiccio, T. J., & Efron, B. (1996). “Bootstrap confidence intervals.” Statistical Science, 11 (3), 189-228

Parameters
  • indep (array-like) – The independent data. Also called predictor, explanatory variable, regressor, or exogenous variable.

  • dep (array-like) – The dependent data. Also called response, regressand, or endogenous variable.

  • estimator (type segreg.statistics.estimator.Estimator) –

  • display_name (str) –

  • resample_cases (boolean, default False) – If True, the bootstrap will resample pairs with replacement from (indep, dep). See Section 6.2.4 in Davison and Hinkley, “Bootstrap Methods and their Application”.

  • significance (float) – The coverage of the confidence interval would be: 1 - significance. For example, a 95% confidence interval corresponds to a significance value of 0.05.

  • num_sims (int) – Number of bootstrap simulations.

  • verbose (bool) –

  • seed (int) – Seed for random generator driving bootstrap simulations.

  • precision (int) – Decimal precision for outputs.

Returns

  • bca_ci_df (pandas DataFrame)

  • percentile_ci_df (pandas DataFrame)

  • basic_ci_df (pandas DataFrame)