Docsity

21 Bootstrapping Regression Models, Study notes of Statistics

Toggle sidebar
bg1
21 Bootstrapping
Regression
Models
Bootstrapping is a nonparametric approach to statistical inference that substitutes computation
for more traditional distributional assumptions and asymptotic results.1Bootstrapping offers
a number of advantages:
•The bootstrap is quite general, although there are some cases in which it fails.
•Because it does not require distributional assumptions (such as normally distributed errors),
the bootstrap can provide more accurate inferences when the data are not well behaved or
when the sample size is small.
•It is possible to apply the bootstrap to statistics with sampling distributions that are difficult
to derive, even asymptotically.
•It is relatively simple to apply the bootstrap to complex data-collection plans (such as
stratified and clustered samples).
21.1 Bootstrapping Basics
My principal aim is to explain how to bootstrap regression models (broadly construed to include
generalized linear models, etc.), but the topic is best introduced in a simpler context: Suppose
that we draw an independent random sample from a large population.2For concreteness and
simplicity, imagine that we sample four working, married couples, determining in each case the
husband’s and wife’s income, as recorded in Table 21.1. I will focus on the difference in incomes
between husbands and wives, denoted as Yifor the ith couple.
We want to estimate the mean difference in income between husbands and wives in the pop-
ulation. Please bear with me as I review some basic statistical theory: A point estimate of this
population mean difference μis the sample mean,
Y=Yi
n=6−3+5+3
4=2.75
Elementary statistical theory tells us that the standard deviation of the sampling distribution of
sample means is SD(Y) =σ/√n, where σis the population standard deviation of Y.
If we knew σ, and if Ywere normally distributed, then a 95% confidence interval for μwould
be
μ=Y±1.96 σ
√n
1The term bootstrapping, coined by Efron (1979), refers to using the sample to learn about the sampling distribution of
a statistic without reference to external assumptions—as in “pulling oneself up by one’s bootstraps.”
2In an independent random sample, each element of the population can be selected more than once. In a simple random
sample, in contrast, once an element is selected into the sample, it is removed from the population, so that sampling is
done “without replacement.” When the population is very large in comparison to the sample (say, at least 10 times as
large), the distinction between independent and simple random sampling becomes inconsequential.
587
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download 21 Bootstrapping Regression Models and more Study notes Statistics in PDF only on Docsity!

Bootstrapping

Regression

Models

B

ootstrapping is a nonparametric approach to statistical inference that substitutes computation for more traditional distributional assumptions and asymptotic results. 1 Bootstrapping offers a number of advantages:

  • The bootstrap is quite general, although there are some cases in which it fails.
  • Because it does not require distributional assumptions (such as normally distributed errors), the bootstrap can provide more accurate inferences when the data are not well behaved or when the sample size is small.
  • It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
  • It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).

21.1 Bootstrapping Basics

My principal aim is to explain how to bootstrap regression models (broadly construed to include generalized linear models, etc.), but the topic is best introduced in a simpler context: Suppose that we draw an independent random sample from a large population. 2 For concreteness and simplicity, imagine that we sample four working, married couples, determining in each case the husband’s and wife’s income, as recorded in Table 21.1. I will focus on the difference in incomes between husbands and wives, denoted as Yi for the ith couple. We want to estimate the mean difference in income between husbands and wives in the pop- ulation. Please bear with me as I review some basic statistical theory: A point estimate of this population mean difference μ is the sample mean,

Y =

∑ (^) Yi n

Elementary statistical theory tells us that the standard deviation of the sampling distribution of sample means is SD(Y ) = σ/

n, where σ is the population standard deviation of Y. If we knew σ , and if Y were normally distributed, then a 95% confidence interval for μ would be

μ = Y ± 1. 96

σ √ n

(^1) The term bootstrapping , coined by Efron (1979), refers to using the sample to learn about the sampling distribution of a statistic without reference to external assumptions—as in “pulling oneself up by one’s bootstraps.” (^2) In an independent random sample , each element of the population can be selected more than once. In a simple random sample , in contrast, once an element is selected into the sample, it is removed from the population, so that sampling is done “without replacement.” When the population is very large in comparison to the sample (say, at least 10 times as large), the distinction between independent and simple random sampling becomes inconsequential.

587

588 Chapter 21. Bootstrapping Regression Models

Table 21.1 Contrived “Sample” of Four Married Couples, Showing Husbands’ and Wives’ Incomes in Thousands of Dollars

Observation Husband’s Income Wife’s Income Difference Y (^) i

1 24 18 6 2 14 17 − 3 3 40 35 5 4 44 41 3

where z (^). 025 = 1 .96 is the standard normal value with a probability of .025 to the right. If Y is not normally distributed in the population, then this result applies asymptotically. Of course, the asymptotics are cold comfort when n = 4. In a real application, we do not know σ. The standard estimator of σ is

S =

(Y (^) i − Y )^2 n − 1

from which the standard error of the mean (i.e., the estimated standard deviation of Y ) is SE(Y ) = S/

n. If the population is normally distributed, then we can take account of the added uncertainty associated with estimating the standard deviation of the mean by substituting the heavier-tailed t-distribution for the normal distribution, producing the 95% confidence interval

μ = Y ± t (^) n− 1 ,. 025

S

n

Here, tn− 1 ,. 025 is the critical value of t with n − 1 degrees of freedom and a right-tail probability of .025. In the present case, S = 4 .031, SE(Y ) = 4. 031 /

4 = 2 .015, and t 3 ,. 025 = 3 .182. The 95% confidence interval for the population mean is thus

μ = 2. 75 ± 3. 182 × 2. 015 = 2. 75 ± 6. 41

or, equivalently,

− 3. 66 < μ < 9. 16

As one would expect, this confidence interval—which is based on only four observations—is very wide and includes 0. It is, unfortunately, hard to be sure that the population is reasonably close to normally distributed when we have such a small sample, and so the t-interval may not be valid. 3 Bootstrapping begins by using the distribution of data values in the sample (here, Y 1 = 6 , Y 2 = − 3 , Y 3 = 5 , Y 4 = 3) to estimate the distribution of Y in the population. 4 That is, we define the random variable Y ∗^ with distribution 5

(^3) To say that a confidence interval is “valid” means that it has the stated coverage. That is, a 95% confidence interval is valid if it is constructed according to a procedure that encloses the population mean in 95% of samples. (^4) An alternative would be to resample from a distribution given by a nonparametric density estimate (see, e.g., Silverman & Young, 1987). Typically, however, little if anything is gained by using a more complex estimate of the population distribution. Moreover, the simpler method explained here generalizes more readily to more complex situations in which the population is multivariate or not simply characterized by a distribution. (^5) The asterisks on p∗(·), E∗, and V ∗ (^) remind us that this probability distribution, expectation, and variance are conditional on the specific sample in hand. Were we to select another sample, the values of Y 1 , Y 2 , Y 3 , and Y 4 , would change and— along with them—the probability distribution of Y ∗, its expectation, and variance.

590 Chapter 21. Bootstrapping Regression Models

Table 21.2 A Few of the 256 Bootstrap Samples for the Data Set [6, − 3 , 5, 3], and the Corresponding Bootstrap Means, Y ∗ b

Bootstrap Sample b Y ∗ b 1 Y ∗ b 2 Y ∗ b 3 Y ∗ b 4 Y ∗ b

1 6 6 6 6 6. 2 6 6 6 − 3 3. 3 6 6 6 5 5. .. .

.. .

.. . 100 − 3 5 6 3 2. 101 − 3 5 − 3 6 1. .. .

.. .

.. . 255 3 3 3 5 3. 256 3 3 3 3 3.

means is nearly equal to the usual standard error of the sample mean; the slight slippage is due to the factor

n/(n − 1 ), which is typically negligible (though not when n = 4): 8

SE(Y ) =

n n − 1

SD∗(Y

∗ )

× 1. 745

This precise relationship between the usual formula for the standard error and the bootstrap standard deviation is peculiar to linear statistics (i.e., linear functions of the data) like the mean. For the mean, then, the bootstrap standard deviation is just a more complicated way to calculate what we already know, but

  • bootstrapping might still provide more accurate confidence intervals, as I will explain presently; and
  • bootstrapping can be applied to nonlinear statistics for which we do not have standard-error formulas or for which only asymptotic standard errors are available.

Bootstrapping exploits the following central analogy:

The population is to the sample as the sample is to the bootstrap samples.

Consequently,

  • the bootstrap observations Y (^) bi∗ are analogous to the original observations Y (^) i ;
  • the bootstrap mean Y

∗ b is analogous to the^ mean of the original sample^ Y^ ;

  • the mean of the original sample Y is analogous to the (unknown) population mean μ; and
  • the distribution of the bootstrap sample means is analogous to the (unknown) sampling distribution of means for samples of size n drawn from the original population.

(^8) See Exercise 21.1.

21.1. Bootstrapping Basics 591

Y = 2.

Bootstrap Mean

Frequency

− 2 0 2 4 6

25

5

0

20

15

10

Figure 21.1 Graph of the 256 bootstrap means from the sample [6, −3, 5, 3]. The broken vertical line gives the mean of the original sample, Y = 2.75, which is also the mean of the 256 bootstrap means.

Bootstrapping uses the sample data to estimate relevant characteristics of the population. The sampling distribution of a statistic is then constructed empirically by resampling from the sample. The resampling procedure is designed to parallel the process by which sample observations were drawn from the population. For example, if the data represent an independent random sample of size n (or a simple random sample of size n from a much larger population), then each bootstrap sample selects n observations with replacement from the original sample. The key bootstrap analogy is the following: The population is to the sample as the sample is to the bootstrap samples.

The bootstrapping calculations that we have undertaken thus far depend on very small sample size, because the number of bootstrap samples (n n) quickly becomes unmanageable: Even for samples as small as n = 10, it is impractical to enumerate all the 10 10 = 10 billion bootstrap samples. Consider the “data” shown in Table 21.3, an extension of the previous example. The mean and standard deviation of the differences in income Y are Y = 4 .6 and S = 5 .948. Thus, the standard error of the sample mean is SE(Y ) = 5. 948 /

Although we cannot (as a practical matter) enumerate all the 10 10 bootstrap samples, it is easy to draw at random a large number of bootstrap samples. To estimate the standard deviation of a statistic (here, the mean)—that is, to get a bootstrap standard error—100 or 200 bootstrap samples should be more than sufficient. To find a confidence interval, we will need a larger number of bootstrap samples, say 1,000 or 2,000. 9 A practical bootstrapping procedure, therefore, is as follows:

  1. Let r denote the number of bootstrap replications —that is, the number of bootstrap samples to be selected.

(^9) Results presented by Efron and Tibshirani (1993, chap. 19) suggest that basing bootstrap confidence intervals on 1, bootstrap samples generally provides accurate results, and using 2,000 bootstrap replications should be very safe.

21.1. Bootstrapping Basics 593

Table 21.4 A Few of the r = 2 , 000 Bootstrap Samples Drawn From the Data Set [6, − 3 , 5, 3, 6, 10, 11, − 8 , 7, 9] and the Corresponding Bootstrap Means, Y ∗ b

b Y ∗ b 1 Y ∗ b 2 Y ∗ b 3 Y ∗ b 4 Y ∗ b 5 Y ∗ b 6 Y ∗ b 7 Y ∗ b 8 Y ∗ b 9 Y ∗ b 10 Y ∗ b

1 6 10 6 5 − 8 9 9 6 11 3 5. 2 9 9 7 7 3 3 − 3 − 3 − 8 6 3. 3 9 − 3 6 5 10 6 10 10 10 6 6. .. .

.. .

.. . 1999 6 9 6 3 11 6 6 7 3 9 6. 2000 7 6 7 3 10 6 9 3 10 6 6.

Bootstrap Mean

Frequency

− 2 0 2 4 6 8 10

200

150

100

50

0

Y = 4.

Figure 21.2 Histogram of r = 2,000 bootstrap means, produced by resampling from the “sample” [6, −3, 5, 3, 6, 10, 11, −8, 7, 9]. The heavier broken vertical line gives the sample mean, Y = 4.6; the ligher broken vertical lines give the boundaries of the 95% percentile confidence interval for the population mean μ based on the 2, bootstrap samples. The procedure for constructing this confidence interval is described in the next section.

SE∗(Y

∗ ) =SE(Y )

(n − 1 )/n = 1. 881

9 / 10 = 1 .784. For the 2,000 bootstrap samples that I

selected, Y

∗ = 4 .693 and SE(Y ∗ ) = 1 .750—both quite close to the theoretical values. The bootstrapping procedure described in this section can be generalized to derive the empirical sampling distribution for an estimator ̂θ of the parameter θ:

  1. Specify the data-collection scheme S that gives rise to the observed sample when applied to the population: 11

S(Population) ⇒ Sample

(^11) The “population” can be real—the population of working married couples—or hypothetical—the population of conceivable replications of an experiment. What is important in the present context is that the sampling procedure can be described concretely.

594 Chapter 21. Bootstrapping Regression Models

The estimator ̂θ is some function s(·) of the observed sample. In the preceding example, the data-collection procedure is independent random sampling from a large population.

  1. Using the observed sample data as a “stand-in” for the population, replicate the data- collection procedure, producing r bootstrap samples:

S(Sample)

⇒ Bootstrap sample 1 ⇒ Bootstrap sample 2 .. . ⇒ Bootstrap sampler

  1. For each bootstrap sample, calculate the estimate ̂θ b∗ = s(Bootstrap sampleb ).
  2. Use the distribution of the ̂θ b∗ s to estimate properties of the sampling distribution of ̂θ. For example, the bootstrap standard error of ̂θ is SE∗(̂θ∗) (i.e., the standard deviation of the r bootstrap replications ̂θ b∗ ): 12

SE∗(̂θ∗) ≡

r b= 1 (̂θ ∗ b −^ θ

r − 1

where

θ ∗ ≡

∑r b= 1 ̂θ

∗ b r

21.2 Bootstrap Confidence Intervals

21.2.1 Normal-Theory Intervals

As I have mentioned, normal-theory confidence intervals for means are based on the t-distribution when the population variance of Y is unknown. Most statistics, including sam- ple means, are asymptotically normally distributed; in large samples we can therefore use the bootstrap standard error, along with the normal distribution, to produce a 100( 1 − a)% confi- dence interval for θ based on the estimator ̂θ:

θ = ̂θ ± z (^) a/ 2 SE∗(̂θ∗) (21.1)

In Equation 21.1, za/ 2 is the standard normal value with probability a/2 to the right. This approach will work well if the bootstrap sampling distribution of the estimator is approximately normal, and so it is advisable to examine a normal quantile-comparison plot of the bootstrap distribution. There is no advantage to calculating normal-theory bootstrap confidence intervals for linear statistics like the mean, because in this case the ideal bootstrap standard deviation of the statistic and the standard error based directly on the sample coincide. Using bootstrap resampling in this setting just makes for extra work and introduces an additional small random component into standard errors.

(^12) We may want to apply the correction factor √n/(n − 1 ).

596 Chapter 21. Bootstrapping Regression Models

21.2.3 Improved Bootstrap Intervals

I will briefly describe an adjustment to percentile intervals that improves their accuracy. 13 As before, we want to produce a 100( 1 − a)% confidence interval for θ having computed the sample estimate ̂θ and bootstrap replicates ̂θ b∗ ; b = 1 ,... , r. We require za/ 2 , the unit-normal value with probability a/2 to the right, and two “correction factors,” Z and A, defined in the following manner:

  • Calculate
Z ≡ −^1

r

b= 1

(̂θ b∗ < ̂θ)

r

where −^1 (·) is the inverse of the standard normal distribution function, and #(̂θ b∗ < ̂θ)/r is the proportion of bootstrap replicates below the estimate ̂θ. If the bootstrap sampling distribution is symmetric and if ̂θ is unbiased, then this proportion will be close to .5, and the “correction factor” Z will be close to 0.

  • Let ̂θ(−i) represent the value of ̂θ produced when the ith observation is deleted from the sample; 14 there are n of these quantities. Let θ represent the average of the ̂θ (^) (−i); that is, θ ≡

∑n i= 1 ̂θ(−i)^ /n. Then calculate

A ≡

∑n i= 1 (̂θ^ (−i)^ −^ θ)

3

6[

∑n i= 1 (̂θ^ (−i)^ −^ θ)

2 ] 3 / 2 (21.2)

With the correction factors Z and A in hand, compute

A 1 ≡ 
[
Z +

Z − z (^) a/ 2 1 − A(Z − z (^) a/ 2 )

]
A 2 ≡ 
[
Z +

Z + z (^) a/ 2 1 − A(Z + z (^) a/ 2 )

]

where (·) is the cumulative standard normal distribution function. Note that when the correction factors Z and A are both 0, A 1 = (−z (^) a/ 2 ) = a/2, and A 2 = (z (^) a/ 2 ) = 1 − a/2. The values A 1 and A 2 are used to locate the end points of the corrected percentile confidence interval. In particular, the corrected interval is

̂ θ (lower)∗ < θ < ̂θ (upper)∗

where lower* = rA 1 and upper* = rA 2 (rounding or interpolating as required).

The lower and upper bounds of percentile confidence intervals can be corrected to improve the accuracy of these intervals.

(^13) The interval described here is called a “bias-corrected, accelerated” (or BCa ) percentile interval. Details can be found in Efron and Tibshirani (1993, chap. 14); also see Stine (1990) for a discussion of different procedures for constructing bootstrap confidence intervals. (^14) The ̂θ(−i) are called the jackknife values of the statistic ̂θ. The jackknife values can also be used as an alternative to the bootstrap to find a nonparametric confidence interval for θ. See Exercise 21.2.

21.3. Bootstrapping Regression Models 597

Applying this procedure to the “data” in Table 21.3, we have z (^). 05 / 2 = 1 .96 for a 95% confidence interval. There are 926 bootstrapped means below Y = 4 .6, and so Z = −^1 ( 926 / 2000 ) =

− 0 .09288. The Y (^) (−i) are 4.444, 5. 444 ,... , 4 .111; the mean of these values is Y = Y = 4 .6, 15 and (from Equation 21.2) A = − 0 .05630. Using these correction factors,

A 1 = 
1 − [−. 05630 (− 0. 09288 − 1. 96 )]
A 2 = 
1 − [−. 05630 (− 0. 09288 + 1. 96 )]

Multiplying by r, we have 2000 ×. 0. 007889 ≈ 16 and 2000 ×. 0. 9449 ≈ 1890, from which

Y ∗ ( 16 ) < μ < Y^

∗ ( 1890 ) (21.3) − 0. 4 < μ < 7. 3

Unlike the other confidence intervals that we have calculated for the “sample” of 10 differences in income between husbands and wives, the interval given in Equation 21.3 includes 0.

21.3 Bootstrapping Regression Models

The procedures of the previous section can be easily extended to regression models. The most straightforward approach is to collect the response-variable value and regressors for each observation

z ′ i ≡ [Yi , Xi 1 ,... , Xik ]

Then the observations z ′ 1 , z ′ 2 ,... , z ′ n can be resampled, and the regression estimator computed for each of the resulting bootstrap samples, z ∗′ b 1 , z b∗′ 2 ,... , z ∗′ bn, producing r sets of bootstrap regression coefficients, b ∗ b = [A∗ b, B b∗ 1 ,... , B bk∗ ]′. The methods of the previous section can be applied to compute standard errors or confidence intervals for the regression estimates. Directly resampling the observations z ′ i implicitly treats the regressors X 1 ,... , Xk as random rather than fixed. We may want to treat the Xs as fixed (if, e.g., the data derive from an experimental design). In the case of linear regression, for example,

  1. Estimate the regression coefficients A, B 1 ,... , Bk for the original sample, and calculate the fitted value and residual for each observation:

̂ Yi = A + B 1 x (^) i 1 + · · · + B (^) k x (^) ik

E (^) i = Yi − ̂Y (^) i

  1. Select bootstrap samples of the residuals , e ∗ b = [E∗ b 1 , E b∗ 2 ,... , E bn∗]′, and from these, calculate bootstrapped Y values, y ∗ b = [Y (^) b∗ 1 , Y (^) b∗ 2 ,... , Y (^) bn∗]′, where Y (^) bi∗ = ̂Yi + E bi∗.

(^15) The average of the jackknifed estimates is not, in general, the same as the estimate calculated for the full sample, but this is the case for the jackknifed sample means. See Exercise 21.2.

21.4. Bootstrap Hypothesis Tests* 599

Table 21.5 Statistics for r = 2 , 000 Bootstrapped Huber Regressions Applied to Duncan’s Occupational Prestige Data

Coefficient

Constant Income Education

Average bootstrap estimate −7.001 0.6903 0. Bootstrap standard error 3.165 0.1798 0. Asymptotic standard error 3.588 0.1005 0. Normal-theory interval (−13.423,−1.018) (0.3603,1.0650) (0.2013,0.7569) Percentile interval (−13.150,−0.577) (0.3205,1.0331) (0.2030,0.7852) Adjusted percentile interval (−12.935,−0.361) (0.2421,0.9575) (0.2511,0.8356)

NOTES: Three bootstrap confidence intervals are shown for each coefficient. Asymptotic standard errors are also shown for comparison.

for income and education, which gives a sense of the covariation of the two estimates; it is clear that the income and education coefficients are strongly negatively correlated. 19 The bootstrap standard errors of the income and education coefficients are much larger than the asymptotic standard errors, underscoring the inadequacy of the latter in small samples. The simple normal-theory confidence intervals based on the bootstrap standard errors (and formed as the estimated coefficients ± 1 .96 standard errors) are reasonably similar to the percentile intervals for the income and education coefficients; the percentile intervals differ slightly from the adjusted percentile intervals. Comparing the average bootstrap coefficients A ∗ , B ∗ 1 , and^ B

∗ 2 with the corre- sponding estimates A, B 1 , and B 2 suggests that there is little, if any, bias in the Huber estimates. 20

21.4 Bootstrap Hypothesis Tests*

In addition to providing standard errors and confidence intervals, the bootstrap can also be used to test statistical hypotheses. The application of the bootstrap to hypothesis testing is more or less obvious for individual coefficients because a bootstrap confidence interval can be used to test the hypothesis that the corresponding parameter is equal to any specific value (typically 0 for a regression coefficient). More generally, let T ≡ t ( z ) represent a test statistic, written as a function of the sample z. The contents of z vary by context. In regression analysis, for example, z is the n × k + 1 matrix [ y , X ] containing the response variable and the regressors. For concreteness, suppose that T is the Wald-like test statistic for the omnibus null hypothesis H 0 : β 1 = · · · = β (^) k = 0 in a robust regression, calculated using the estimated asymptotic covariance matrix for the regression coefficients. That is, let V 11 (k×k)

contain the rows and columns

of the estimated asymptotic covariance matrix ̂V( b ) that pertain to the k slope coefficients b 1 = [B 1 ,... , Bk ]′. We can write the null hypothesis as H 0 : β 1 = 0. Then the test statistic is

T = b ′ 1 V − 111 b 1

(^19) The negative correlation of the coefficients reflects the positive correlation between income and education (see Section 9.4.4). The hint of bimodality in the distribution of the income coefficient suggests the possible presence of influential observations. See the discussion of Duncan’s regression in Section 4.6. (^20) For the use of the bootstrap to estimate bias, see Exercise 21.4.

600 Chapter 21. Bootstrapping Regression Models

(a)

Income Coefficient

Frequency

0.2 0.4 0.6 0.8 1.0 1.2 1.

(b)

Education Coefficient

−0.2 0.0 0.2 0.4 0.6 0.8 1.

0.2 0.4 0.6 0.8 1.0 1.

(c)

Income Coefficient

Education Coefficient

350

250

150

50 0

Frequency

350

250

150

50 0

Figure 21.3 Panels (a) and (b) show histograms and kernel density estimates for the r = 2, bootstrap replicates of the income and education coefficients in Duncan’s occupational prestige regression. The regression model was fit by M estimation using the Huber weight function. Panel (c) shows a scatterplot of the income and education coefficients for the 2,000 bootstrap samples.

We could compare the obtained value of this statistic to the quantiles of χ k^2 , but we are loath to do so because we do not trust the asymptotics. We can, instead, construct the sampling distribution of the test statistic nonparametrically, using the bootstrap. Let T (^) b∗ ≡ t ( z ∗ b ) represent the test statistic calculated for the bth bootstrap sample, z ∗ b. We have to be careful to draw a proper analogy here: Because the original-sample estimates play the role of the regression parameters in the bootstrap “population” (i.e., the original sample), the bootstrap analog of the null hypothesis—to be used with each bootstrap sample—is H 0 : β 1 = B 1 ,... , βk = Bk. The bootstrapped test statistic is, therefore,

T (^) b∗ = ( b ∗ b 1 − b 1 )′ V ∗− b, 111 ( b ∗ b 1 − b 1 )

602 Chapter 21. Bootstrapping Regression Models

provides a straightforward solution: Draw bootstrap samples in which the probability of inclusion is proportional to the probability of inclusion in the original sample, and calculate bootstrap replicates of the statistics of interest using the case weights. The essential “trick” of using the bootstrap in these (and other) instances is to resample from the data in the same way as the original sample was drawn from the population. Statistics are calculated for each bootstrap replication in the same manner as for the original sample.

The bootstrap can be applied to complex sampling designs (involving, e.g., stratification, clustering, and case-weighting) by resampling from the sample data in the same manner as the original sample was selected from the population.

Social scientists frequently analyze data from complex sampling designs as if they originate from independent random samples (even though there are often non-negligible dependencies among the observations) or employ ad hoc adjustments (e.g., by weighting). A tacit defense of common practice is that to take account of the dependencies in complex sampling designs is too difficult. The bootstrap provides a simple solution. 24

21.6 Concluding Remarks

If the bootstrap is so simple and of such broad application, why isn’t it used more in the social sciences? Beyond the problem of lack of familiarity (which surely can be remedied), there are, I believe, three serious obstacles to increased use of the bootstrap:

  1. Common practice—such as relying on asymptotic results in small samples or treating dependent data as if they were independent—usually understates sampling variation and makes results look stronger than they really are. Researchers are understandably reluctant to report honest standard errors when the usual calculations indicate greater precision. It is best, however, not to fool yourself, regardless of what you think about fooling others.
  2. Although the conceptual basis of the bootstrap is intuitively simple and although the cal- culations are straightforward, to apply the bootstrap it is necessary to write or find suitable statistical software. There is some bootstrapping software available, but the nature of the bootstrap—which adapts resampling to the data-collection plan and statistics employed in an investigation—apparently precludes full generality and makes it difficult to use traditional statistical computer packages. After all, researchers are not tediously going to draw 2,000 samples from their data unless a computer program can fully automate the process. This impediment is much less acute in programmable statistical computing environments. 25
  3. Even with good software, the bootstrap is computationally intensive. This barrier to boot- strapping is more apparent than real, however. Computational speed is central to the

(^24) Alternatively, we can use sampling-variance estimates that are appropriate to complex survey samples—a subject that is beyond the scope of this book. See, for example, Skinner, Holt, and Smith (1989). (^25) See, for example, the bootstrapping software for the S (R and S-PLUS) statistical-computing environment described by Efron and Tibshirani (1993, app.) and by Davison and Hinkley (1997, chap. 11). Bootstrapping facilities are also provided in the Stata programming environment.

Exercises 603

exploratory stages of data analysis: When the outcome of one of many small steps imme- diately affects the next, rapid results are important. This is why a responsive computing environment is especially useful for regression diagnostics, for example. It is not nearly as important to calculate standard errors and p-values quickly. With powerful, yet relatively inexpensive, desktop computers, there is nothing to preclude the machine from cranking away unattended for a few hours (although that is rarely necessary—a few minutes is more typical). The time and effort involved in a bootstrap calculation are usually small compared with the totality of a research investigation—and are a small price to pay for accurate and realistic inference.

Exercises

Exercise 21.1. ∗Show that the mean of the n n^ bootstrap means is the sample mean

E∗(Y

∗ ) =

∑nn b= 1 Y^

∗ b n n^

= Y

and that the standard deviation (standard error) of the bootstrap means is

SE∗(Y

∗ ) =

nn b= 1 (Y^

∗ b −^ Y ) 2 n n^

S

n − 1

where S =

n i= 1 (Y^ i^ −^ Y )^2 /(n^ −^1 )^ is the sample standard deviation. ( Hint : Exploit the fact that the mean is a linear function of the observations.)

Exercise 21.2. The jackknife: The “jackknife” (suggested for estimation of standard errors by Tukey, 1958) is an alternative to the bootstrap that requires less computation, but that often does not perform as well and is not quite as general. Efron and Tibshirani (1993, chap. 11) show that the jackknife is an approximation to the bootstrap. Here is a brief description of the jackknife for the estimator ̂θ of a parameter θ:

  1. Divide the sample into m independent groups. In most instances (unless the sample size is very large), we take m = n, in which case each observation constitutes a “group.” If the data originate from a cluster sample, then the observations in a cluster should be kept together.
  2. Recalculate the estimator omitting the j th group, j = 1 ,... , m, denoting the resulting value of the estimator as ̂θ(−j ). The pseudo-value associated with the j th group is defined as ̂ θ j∗ ≡ m̂θ − (m − 1 )̂θ (^) (−j ).
  3. The average of the pseudo-values, ̂θ∗^ ≡ (

∑m j = 1 ̂θ ∗ j )/m^ is the jackknifed estimate of^ θ.^ A jackknifed 100( 1 − a)% confidence interval for θ is given by

θ = ̂θ∗^ ± t (^) a/ 2 ,m− 1

S∗

n where ta/ 2 ,m− 1 is the critical value of t with probability a/2 to the right for m − 1 degrees of freedom, and S∗^ ≡

m j = 1 (̂θ

∗ j −^ ̂θ ∗) (^2) /(m − 1 ) is the standard deviation of the pseudo-values.

(a) ∗Show that when the jackknife procedure is applied to the mean with m = n, the pseudo- values are just the original observations, ̂θ i∗ = Y (^) i ; the jackknifed estimate ̂θ∗^ is, therefore,

Summary 605

(b) Using data from a sample survey that employed disproportional sampling and for which case weights are supplied, estimate a least-squares regression (1) ignoring the case weights; (2) using the case weights to estimate both the regression coefficients and their standard errors (rescaling the case weights, if necessary, so that they sum to the sample size); and (3) using the case weights but estimating coefficient standard errors with the bootstrap. Compare the estimates and standard errors obtained in (1), (2), and (3).

Exercise 21.7. ∗Bootstrapping time-series regression: Bootstrapping can be adapted to time series regression but, as in the case of fixed-X resampling, the procedure makes strong use of the model fit to the data—in particular, the manner in which serial dependency in the data is modeled. Suppose that the errors in the linear model y = X β + ε follow a first-order autoregressive process (see Chapter 16), εi = ρε (^) i− 1 + υi ; the υi are independently and identically distributed with zero expectations and common variance σ (^) υ^2. Suppose further that we use the method of

maximum likelihood to obtain estimates ̂ρ and ̂β. From the residuals e = y − X ̂ β, we can estimate υi as Vi = E (^) i − ̂ρE (^) i− 1 for i = 2 ,... , n; by convention, we take V 1 = E 1. Then, for each bootstrap replication, we sample n values with replacement from the Vi ; call them V (^) b∗ 1 , V (^) b∗ 2 ,... , V (^) bn∗. Using these values, we construct residuals E b∗ 1 = V (^) b∗ 1 and E bi∗ = ̂ρE b, i∗ − 1 + V (^) bi∗

for i = 2 ,... , n; and from these residuals and the original fitted values ̂Y (^) i = x ′ i ̂β, we construct bootstrapped Y values, Y (^) bi∗ = Ŷi + E bi∗. The Y (^) bi∗ are used along with the original x ′ i to obtain

bootstrap replicates ̂β ∗ b of the ML coefficient estimates. (Why are the^ x

′ i treated as fixed?) Employ this procedure to compute standard errors of the coefficient estimates in the time-series regression for the Canadian women’s crime-rate data (discussed in Chapter 16), using an AR(1) process for the errors. Compare the bootstrap standard errors with the usual asymptotic standard errors. Which standard errors do you prefer? Why? Then describe a bootstrap procedure for a time-series regression model with AR(2) errors, and apply this procedure to the Canadian women’s crime-rate regression.

Summary

  • Bootstrapping is a broadly applicable, nonparametric approach to statistical inference that substitutes intensive computation for more traditional distributional assumptions and asymp- totic results. The bootstrap can be used to derive accurate standard errors, confidence intervals, and hypothesis tests for most statistics.
  • Bootstrapping uses the sample data to estimate relevant characteristics of the popula- tion. The sampling distribution of a statistic is then constructed empirically by resampling from the sample. The resampling procedure is designed to parallel the process by which sample observations were drawn from the population. For example, if the data represent an independent random sample of size n (or a simple random sample of size n from a much larger population), then each bootstrap sample selects n observations with replacement from the original sample. The key bootstrap analogy is the following: The population is to the sample as the sample is to the bootstrap samples.
  • Having produced r bootstrap replicates ̂θ b∗ of an estimator ̂θ, the bootstrap standard error is the standard deviation of the bootstrap replicates:

SE∗(̂θ∗) =

r b= 1 (̂θ

∗ b −^ θ

∗ )^2 r − 1

606 Chapter 21. Bootstrapping Regression Models

where θ ∗ is the mean of the ̂θ b∗. In large samples, where we can rely on the normality of ̂θ, a 95% confidence interval for θ is given by ̂θ ± 1 .96 SE∗(̂θ∗).

  • A nonparametric confidence interval for θ can be constructed from the quantiles of the bootstrap sampling distribution of ̂θ∗. The 95% percentile interval is ̂θ (∗lower) < θ < ̂θ (∗upper), where the ̂θ (b)∗ are the r ordered bootstrap replicates; lower =. 025 ×r and upper =. 975 ×r.
  • The lower and upper bounds of percentile confidence intervals can be corrected to improve the accuracy of these intervals.
  • Regression models can be bootstrapped by (1) treating the regressors as random and selecting bootstrap samples directly from the observations z ′ i = [Y (^) i , Xi 1 ,... , Xik ] or (2) treating the regressors as fixed and resampling from the residuals E (^) i of the fitted regression model. In the latter instance, bootstrap observations are constructed as Y (^) bi∗ = ̂Y (^) i + E bi∗ , where the ̂Y (^) i are the fitted values from the original regression, and the E bi∗ are the resampled residuals for the bth bootstrap sample. In each bootstrap sample, the Y (^) bi∗ are then regressed on the original Xs. A disadvantage of fixed-X resampling is that the procedure implicitly assumes that the regression model fit to the data is correct and that the errors are identically distributed.
  • Bootstrap hypothesis tests proceed by constructing an empirical sampling distribution for the test statistic. If T represents the test statistic computed for the original sample and T (^) b∗ is the test statistic for the bth of r bootstrap samples, then (for a chi-square-like test statistic) the p-value for the test is #(T (^) b∗ ≥ T )/r.
  • The bootstrap can be applied to complex sampling designs (involving, e.g., stratification, clustering, and case weighting) by resampling from the sample data in the same manner as the original sample was selected from the population.

Recommended Reading

Bootstrapping is a rich topic; the presentation in this chapter has stressed computational procedures at the expense of a detailed account of statistical properties and limitations.

  • Although Efron and Tibshirani’s (1993) book on the bootstrap contains some relatively advanced material, most of the exposition requires only modest statistical background and is eminently readable.
  • Davison and Hinkley (1997) is another statistically sophisticated, comprehensive treatment of bootstrapping.
  • A briefer source on bootstrapping addressed to social scientists is Stine (1990), which includes a fine discussion of the rationale of bootstrap confidence intervals.
  • Young’s (1994) paper and the commentary that follows it focus on practical difficulties in applying the bootstrap.