Page 253 - Computational Statistics Handbook with MATLAB
P. 253

Chapter 7: Data Partitioning                                    241


                             PROCEDURE - JACKKNIFE

                                1. Leave out an observation.
                                2.  Calculate the value  of  the statistic using the  remaining  sample
                                                    i – ()
                                   points to obtain  T  .
                                3. Repeat steps 1 and 2, leaving out one point at a time, until all n
                                   T  i – ()   are recorded.
                                4. Calculate the jackknife estimate of the bias of T using Equation 7.9.
                                5. Calculate the jackknife estimate  of  the  standard error  of  T using
                                   Equation 7.11.

                              The following two examples show how this is used to obtain jackknife esti-
                             mates of the bias and standard error for an estimate of the correlation coeffi-
                             cient.

                             Example 7.4
                             In this example, we use a data set that has been examined in Efron and Tib-
                             shirani [1993]. Note that these data are also discussed in the exercises for
                             Chapter 6. These data consist of measurements collected on the freshman
                             class of 82 law schools in 1973. The average score for the entering class on a
                             national law test (lsat) and the average undergraduate grade point average
                             (gpa) were recorded. A random sample of size n =  15   was taken from the
                             population. We would like to use these sample data to estimate the correla-
                                          ρ
                             tion coefficient   between the test scores (lsat) and the grade point average
                             (gpa). We start off by finding the statistic of interest.
                                % Loads up a matrix - law.
                                load law
                                % Estimate the desired statistic from the sample.
                                lsat = law(:,1);
                                gpa = law(:,2);
                                tmp = corrcoef(gpa,lsat);
                                % Recall from Chapter 3 that the corrcoef function
                                % returns a matrix of correlation coefficients. We
                                % want the one in the off-diagonal position.
                                T = tmp(1,2);
                                                                      ˆ
                             We get an estimated correlation coefficient of  ρ =  0.78,   and we would like
                             to get an estimate of the bias and the standard error of this statistic. The fol-
                             lowing MATLAB code implements the jackknife procedure for estimating
                             these quantities.
                                % Set up memory for jackknife replicates.
                                n = length(gpa);
                                reps = zeros(1,n);
                                for i = 1:n


                            © 2002 by Chapman & Hall/CRC
   248   249   250   251   252   253   254   255   256   257   258