Page 257 - Computational Statistics Handbook with MATLAB
P. 257

Chapter 7: Data Partitioning                                    245

                                                             )
                                3. Calculate the pseudo-value  T i   using Equation 7.12.
                                4. Repeat steps 2 and 3 for the remaining data points, yielding n values
                                       )
                                   of T i  .
                                5. Determine the jackknife estimate of the standard error of T using
                                   Equation 7.14.

                             Example 7.6
                             We now repeat Example 7.4 using the jackknife pseudo-value approach and
                             compare estimates of the standard error of the correlation coefficient for these
                             data. The following MATLAB code implements the pseudo-value procedure.
                                % Loads up a matrix.
                                load law
                                lsat = law(:,1);
                                gpa = law(:,2);
                                % Get the statistic from the original sample
                                tmp = corrcoef(gpa,lsat);
                                T = tmp(1,2);
                                % Set up memory for jackknife replicates
                                n = length(gpa);
                                reps = zeros(1,n);
                                for i = 1:n
                                    % store as temporary vector
                                    gpat = gpa;
                                    lsatt = lsat;
                                    % leave i-th point out
                                    gpat(i) = [];
                                    lsatt(i) = [];
                                    % get correlation coefficient
                                    tmp = corrcoef(gpat,lsatt);
                                    % In this example, is off-diagonal element.
                                   % Get the jackknife pseudo-value for the i-th point.
                                    reps(i) = n*T-(n-1)*tmp(1,2);
                                end
                                JT = mean(reps);
                                sehatpv = sqrt(1/(n*(n-1))*sum((reps - JT).^2));
                                                                     ˆ     ˆ
                             We obtain an estimated standard error of  SE JackP ρ() =  0.14  , which is the
                             same result we had before.


                              Efron and Tibshirani [1993] describe a situation where the jackknife proce-
                             dure does not work and suggest that the bootstrap be used instead. These are
                             applications where the statistic is not smooth. An example of this type of sta-
                             tistic is the median. Here smoothness refers to statistics where small changes



                            © 2002 by Chapman & Hall/CRC
   252   253   254   255   256   257   258   259   260   261   262