Page 262 - Computational Statistics Handbook with MATLAB
P. 262
250 Computational Statistics Handbook with MATLAB
Example 7.8
We use an example from Efron and Tibshirani [1993] to illustrate the BC a
interval. Here we have a set of measurements of 26 neurologically impaired
children who took a test of spatial perception called test A. We are interested
in finding a 90% confidence interval for the variance of a random score on test
A. We use the following estimate for the variance
n
ˆ 1 2
θ = --- ∑ ( x i – x) ,
n
i = 1
represents one of the test scores. This is a biased estimator of the
where x i
variance, and when we calculate this statistic from the sample we get a value
ˆ
of θ = 171.5 . We provide a function called csbootbca that will determine
interval. Because it is somewhat lengthy, we do not include the
the BC a
MATLAB code here, but the reader can view it in Appendix D. However,
before we can use the function csbootbca, we have to write an M-file func-
tion that will return the estimate of the second sample central moment using
only the sample as an input. It should be noted that MATLAB Statistics Tool-
box has a function (moment) that will return the sample central moments of
any order. We do not use this with the csbootbca function, because the
function specified as an input argument to csbootbca can only use the sam-
ple as an input. Note that the function mom is the same function used in Chap-
interval with the following command.
ter 6. We can get the bootstrap BC a
% First load the data.
load spatial
% Now find the BC-a bootstrap interval.
alpha = 0.10;
B = 2000;
% Use the function we wrote to get the
% 2nd sample central moment - 'mom'.
[blo,bhi,bvals,z0,ahat] = ...
csbootbca(spatial','mom',B,alpha);
ˆ
From this function, we get a bias correction of z 0 = 0.16 and an acceleration
ˆ
factor of a = 0.061. The endpoints of the interval from csbootbca are
,
( 115.97 258.54). In the exercises, the reader is asked to compare this to the
bootstrap-t interval and the bootstrap percentile interval.
© 2002 by Chapman & Hall/CRC