Compute Jackknife Coefficient Estimates in SAS
In certain scenarios, we want to estimate a model's parameters on the sample for each observation with itself excluded. This can be achieved by estimating the model repeatedly on the leave-one-out samples but is very inefficient. If we estimate the model on the full sample, however, the coefficient estimates will certainly be biased. Thankfully, we have the Jackknife method to correct for the bias, which produces the Jackknifed coefficient estimates for each observation.
Let's start with some variable definitions to help with the explanation.
|the parameter estimates after deleting the th observation|
|the variance estimate after deleting the th observation|
|the matrix without the th observation|
|the th value predicted without using the th observation|
|the th residual|
|the th diagonal of the projection matrix for the predictor space, also called the hat matrix|
|the th element of|
|the scaled measures of the change in the th parameter estimate calculated by deleting the th observation|
Compute the coefficient estiamtes with the th observation excluded from the sample, i.e. , or the Jackknifed coefficient estimate.
From the table above, we can get that the th Jackknifed coefficient estimate without using the th observation is:
The good thing is that
PROC REG produces the coefficient estimate for
, where is the number of coefficients, and the
I options produce the remaining statistics just enough to compute :
|Variable||Option in ||Name in output|
Suppose we want to calculate the firm-level discretionary accruals for each year using the Jones (1991) model and Kothari et al (2005) model. For a firm , we need to first estimate the model for the industry-year excluding firm , then use the coefficient estimates to generate predicted accruals for firm . The firm's discretionary accruals is the actual accruals minus the predicted accruals.
Below is an example
PROC REG that produces three datasets named
work.xpxinv, which contain sufficient statistics to
compute the Jackknifed estimates and thus the predicted accruals.
ods listing close; proc reg data=work.funda edf outest=work.params; /* industry-year regression */ by fyear sic2; /* id is necessary for matching Jackknifed coefficients to firm-year */ id key; /* Jones Model */ Jones: model tac = inv_at_l drev ppe / noint influence i; /* Kothari Model with ROA */ Kothari: model tac = inv_at_l drevadj ppe roa / noint influence i; ods output OutputStatistics=work.outstats InvXPX=work.xpxinv; run; ods listing;
Full SAS program for estimating 5 different measures of discretionary accruals: