help bstat dialog: bstat
also see: bootstrap postestimation
-------------------------------------------------------------------------------
Title
[R] bstat -- Report bootstrap results
Syntax
Bootstrap statistics from variables
bstat [varlist] [if] [in] [, options]
Bootstrap statistics from file
bstat [namelist] [using filename] [if] [in] [, options]
options description
-------------------------------------------------------------------------
Main
stat(vector) observed values for each statistic
accel(vector) acceleration values for each statistic
mse use MSE formula for variance estimation
Reporting
level(#) set confidence level; default is level(95)
n(#) # of observations from which bootstrap samples were
taken
notable suppress table of results
noheader suppress table header
nolegend suppress table legend
verbose display the full table legend
title(text) use text as title for bootstrap results
-------------------------------------------------------------------------
See [R] bootstrap postestimation for features available after estimation.
Menu
Statistics > Resampling > Report bootstrap results
Description
bstat is a programmer's command that computes and displays estimation
results from bootstrap statistics.
For each variable in varlist (the default is all variables), then bstat
computes a covariance matrix, estimates bias, and constructs several
different confidence intervals (CIs). The following CIs are constructed
by bstat:
1. Normal CIs (using the normal approximation)
2. Percentile CIs
3. Bias-corrected (BC) CIs
4. Bias-corrected and accelerated (BCa) CIs (optional)
estat bootstrap displays a table of one or more of the above confidence
intervals; see [R] bootstrap postestimation.
If there are bootstrap estimation results in e(), bstat replays them. If
given the using modifier, bstat uses the data in filename to compute the
bootstrap statistics while preserving the data currently in memory.
Otherwise, bstat uses the data in memory to compute the bootstrap
statistics.
The following options may be used to replay estimation results from
bstat:
level(#) notable noheader nolegend verbose title(text)
For all other options and the qualifiers using, if, and in, bstat
requires a bootstrap dataset.
Options
+------+
----+ Main +-------------------------------------------------------------
stat(vector) specifies the observed value of each statistic (i.e., the
value of the statistic using the original dataset).
accel(vector) specifies the acceleration of each statistic, which is used
to construct BCa CIs.
mse indicates that bstat compute the variance by using deviations of the
replicates from the observed value of the statistics. By default,
bstat computes the variance by using deviations from the average of
the replicates.
+-----------+
----+ Reporting +--------------------------------------------------------
level(#); see [R] estimation options.
n(#) specifies the number of observations from which bootstrap samples
were taken. This value is used in no calculations but improves the
table header when this information is not saved in the bootstrap
dataset.
notable suppresses the display of the output table.
noheader suppresses the display of the table header. This option implies
nolegend.
nolegend suppresses the display of the table legend.
verbose specifies that the full table legend be displayed. By default,
coefficients and standard errors are not displayed.
title(text) specifies a title to be displayed above the table of
bootstrap results; the default title is Bootstrap results.
Example
Setup
. sysuse auto
. bootstrap _b, saving(bstat) reps(200) bca: regress mpg weight
length
Saving the acceleration statistic vector
. matrix a = e(accel)
Saving the estimated coefficients from the full sample
. matrix b = e(b)
Replay the bootstrap results by using the saved full sample estimate
vector and the saved acceleration vector
. bstat using bstat, stat(b) accel(a)
Saved results
bstat saves the following in e():
Scalars
e(N) sample size
e(N_reps) number of complete replications
e(N_misreps) number of incomplete replications
e(N_strata) number of strata
e(N_clust) number of clusters
e(k_aux) number of auxiliary parameters
e(k_eq) number of equations
e(k_exp) number of standard expressions
e(k_eexp) number of extended expressions (i.e., _b)
e(k_extra) number of extra equations beyond the original
ones from e(b))
e(level) confidence level for bootstrap CIs
e(bs_version) version for bootstrap results
e(rank) rank of e(V)
Macros
e(cmd) bstat
e(command) from _dta[command]
e(cmdline) command as typed
e(title) title in estimation output
e(exp#) expression for the #th statistic
e(prefix) bootstrap
e(mse) mse if specified
e(vce) bootstrap
e(vcetype) title used to label Std. Err.
e(properties) b V
Matrices
e(b) observed statistics
e(b_bs) bootstrap estimates
e(reps) number of nonmissing results
e(bias) estimated biases
e(se) estimated standard errors
e(z0) median biases
e(accel) estimated accelerations
e(ci_normal) normal-approximation CIs
e(ci_percentile) percentile CIs
e(ci_bc) bias-corrected CIs
e(ci_bca) bias-corrected and accelerated CIs
e(V) bootstrap variance-covariance matrix
Also see
Manual: [R] bstat
Help: [R] bootstrap, [R] bsample