Stata 15 help for bstat

[R] bstat -- Report bootstrap results


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 * ties adjust BC/BCa confidence intervals for ties * 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 display_options control column formats and line width ------------------------------------------------------------------------- * Starred options and qualifiers using, if, and in require a bootstrap dataset. See [R] bootstrap postestimation for features available after estimation.


Statistics > Resampling > Report bootstrap results


bstat is a programmer's command that computes and displays estimation results from bootstrap statistics. For each variable in varlist, bstat computes a covariance matrix, estimates bias, and constructs normal confidence intervals (CIs), percentile CIs, bias-corrected (BC) CIs, and bias-corrected and accelerated (BCa) CIs using a bootstrap dataset in memory or on disk. The computed CIs can be displayed using estat bootstrap; see [R] bootstrap postestimation.

bstat without varlist replays results from the last bootstrap estimation when results are stored in e().


+------+ ----+ Main +-------------------------------------------------------------

stat(vector) specifies the observed value of each statistic (that is, the value of the statistic using the original dataset).

accel(vector) specifies the acceleration of each statistic, which is used to construct BCa CIs.

ties specifies that bstat adjust for ties in the replicate values when computing the median bias used to construct BC and BCa CIs.

mse specifies 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.

display_options: cformat(%fmt), pformat(%fmt), sformat(%fmt), and nolstretch; see [R] estimation options.


Setup . sysuse auto . bootstrap _b, saving(bstat) reps(200) bca: regress mpg weight length

Save the acceleration statistic vector . matrix a = e(accel)

Save 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)

Stored results

bstat stores 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 in e(b) 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(ties) ties, if specified 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

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index