SUBJECT: Bootstrasp programming AUTHOR: Lawrence C. Hamilton Department of Sociology University of New Hampshire SUPPORT: none COMMENTS: Create a new directory, name of your choosing, and copy the materials stored here into it. Use this new directory has your current directory when using Stata and these materials. Programs example1.ado-example5.ado, and the data files source.dta and boot4.dta, are explained in more detail in "Bootstrap Programming" (STB-4, November 1991). Example1.ado-example5.ado are problem-specific programs, but they could easily be modified with a text editor to change the number of iterations, calculation details, data source, or the model being tested. example1.ado Bootstraps the mean of a variable named X, from a dataset called source.dta, B=1,000 times. Results are saved in boot1.dta. example2.ado Bootstraps a two-variable regression using data resampling. Regresses Y on X, from source.dta, B=1,000 times. Results are saved in boot2.dta. example3.ado Bootstraps two-variable regression using residual resampling, storing results in boot3.dta. example4.ado Bootstrap within Monte Carlo: generates artificial samples of n=80 cases each, according to model [7]. Performs data resampling B=2,000 times on each sample, and records results to evaluate how often standard or boot- strap confidence intervals truly contain the regression parameter b=3. Boot4.dta, included with this disk, contains results from 400 Monte Carlo samples. Warning: as written, this program may run for hours or days, depending on your computer's speed. It needs at least 3.2 megabytes of disk space. example5.ado Monte Carlo simulation of the sampling distribution of OLS estimates of the slope in model [7]. Saves results in boot5.dta. boot4.dta Results from example4.ado: bootstrapping 400 Monte Carlo samples of model [7], and calculating width and coverage of the resulting confidence intervals. source.dta Data on income, density, and air pollution levels in 21 New York counties, adapted from: Zupan, Jeffrey M. (1973). The Distribution of Air Quality in the New York Region. Baltimore: Johns Hopkins University Press.