Syntax
Regression residual bootstrap
BOOTSTRAP(regression, replications) BOOTSTRAP(regression, replications, seed)
Series case bootstrap
BOOTSTRAP(series, replications) BOOTSTRAP(series, replications, seed)
Estimate sampling uncertainty by repeatedly resampling observed cases or fitted regression residuals. Returns bias, bootstrap standard errors, confidence intervals, and inspectable empirical distributions.
BOOTSTRAP(regression, replications) BOOTSTRAP(regression, replications, seed)
BOOTSTRAP(series, replications) BOOTSTRAP(series, replications, seed)
Uses a fixed-design residual bootstrap. The original explanatory variables remain unchanged while model errors are resampled.
This estimates coefficient uncertainty under the fitted model while preserving the observed design matrix X.
Uses the ordinary nonparametric case bootstrap for the sample mean.
Use regression mode when the statistic of interest is a fitted model coefficient rather than the level of a single series.
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | Series or Regression | Yes | A data series for a mean bootstrap, or a fitted OLS regression for a residual bootstrap. |
| replications | Number | Yes | Number of bootstrap samples, rounded to an integer. Must be from 100 through 50,000. |
| seed | Number | No | Random seed for exact replay. Numeric values are rounded to the nearest integer. |
In the two-series regression form, the first series is the response and the second series is the explanatory variable.
# U-6 rate regressed on the unemployment rate
R=REGRESSION(U6RATE,UNRATE)
SLIDESHOW(BOOTSTRAP(R,500))
The result contains a summary table followed by a histogram for each bootstrapped regression coefficient.
# Empirical uncertainty of a series mean
SLIDESHOW(BOOTSTRAP(UNRATE,2000,42))
This resamples the observed values of UNRATE and reports
uncertainty for its sample mean.
| Statistic | Meaning |
|---|---|
| Estimate | Statistic or coefficient from the original sample. |
| Bootstrap mean | Mean of the B bootstrap estimates. |
| Bias | Bootstrap mean minus the original estimate. |
| Bootstrap SE | Sample standard deviation of bootstrap estimates. |
| Percentile CI | 2.5th and 97.5th percentiles of the empirical distribution. |
| Basic CI | Pivotal interval reflected around the original estimate. |
Use EXTRACT to retrieve a panel, vector, matrix, or distribution.
summary
slideshow
draws
estimate
bootstrap_mean
bias
standard_error
percentile_lower_ci
percentile_upper_ci
lower_ci
upper_ci
distribution
beta0 … betaN
# Examples
SE=EXTRACT(B,standard_error)
SLOPE_DRAWS=EXTRACT(B,beta1)
ALL_DRAWS=EXTRACT(B,draws)
distribution is available directly when the result has
one statistic. For regressions, use beta0 through
betaN, or the normalized coefficient column name.
A narrow bootstrap distribution indicates a stable estimate under resampling; a wide distribution indicates greater sampling uncertainty. Bias near zero means the center of the bootstrap distribution is close to the original estimate.
Important distinction: residual-based
regression search evaluates or selects candidate models using their
residual behavior. BOOTSTRAP does something different:
it actually resamples residuals to approximate the sampling
distribution of fitted coefficients.