API¶
segreg.model
: Models¶
Estimator for ordinary least-squares regression. |
|
|
Estimator for one-bkpt segmented regression. |
|
Estimator for two-bkpt segmented regression. |
|
Returns a function which takes a bkpt and returns the RSS of a one-bkpt segmented fit. |
|
Returns a function which takes a pair of bkpts and returns the RSS of a two-bkpt segmented fit. |
segreg.analysis
: Tools for Analyzing Results¶
|
Plots univariate functions together with scatter of the data. |
|
|
|
segreg.bootstrap
: Bootstrap¶
|
Bootstrap confidence intervals for regression models. |
|
see: stata manual on the bootstrap |
|
Computes BCa (bias-corrected and accelerated) confidence intervals for regression models. |
|
Computes BCa (bias-corrected and accelerated) confidence intervals for a single parameter. |
|
Name follows Davison and Hinkley. |
|
|
|
Computes bootstrap sampling distribution of model parameters. |
|
A single boot resampling for a regression model. |
Random draw with replacement from series. |
|
Random draw with replacement. |
segreg.data
: Datasets¶
|
A dataset from an academic paper by David Hinkley. |
|
Random dataset for testing. |
|
Random dataset for testing. |
segreg.model.alt
: Alternative Implementations¶
Pure Python Segmented Regression¶
|
Estimate one-bkpt segmented regression model. |
|
Estimate two-bkpt segmented regression model. |
Brute Force Grid Search¶
|
Estimate one-bkpt segmented regression model using a brute-force method. |
|
Estimate two-bkpt segmented regression model using a brute-force method. |