Palgrave Handbook of Econometrics: Applied Econometrics

(Grace) #1

1312 Testing Econometric Software


the trouble of implementing analytic derivatives. Issuing the commands: “$Min-
Precision=50,” rationalizing the input data, settingh = 1E-12 and using the
“Rationalize” command on the input data series enabled numerical differenti-
ation to recover the full eleven digits of the benchmark. Thus, without using
analytic derivatives, Mathematica is capable of producing the same accuracy as
if analytic derivatives were employed. This information will be useful in produc-
ing the benchmark for ULS – it will save us the trouble of implementing analytic
derivatives.
Next we investigate the accuracy that can be attained with numerical derivatives
with varying sizes of the forward differencing parameter,h. The forward difference
derivative is computed byf′(x)=(f(x+h)−f(x))/h. We do not consider numerical
derivatives via central differences, because the software packages in question do
not offer such an option for estimation.
Though obviously the desired degree of accuracy depends on the particular prob-
lem at hand, based on the limits of achievable accuracy in this situation as discussed
above, we take as our desideratum that the ARMA estimation procedure should pro-
duce at least three accurate digits for the coefficients and standard errors. Table 28.5
shows the effect of various choices ofhon the accuracy of the estimates.
Recall that we ran analytic derivatives two ways: at regular double precision,
and also carrying 50 digits; the former agreed with the latter to about five digits.
Clearly, we cannot expect more than five digits of agreement when using numer-
ical derivatives. We see that this level of accuracy is attained in the bottom row,
and almost in the penultimate row. Hence, we see that, for best accuracy, the dif-
ferencing parameterhshould be set to at most 0.00001. (Very few packages even
permit users to control this feature, so this information is mostly for the benefit of
software developers rather than users.)
Programming analytic derivatives, especially recursive ones, can leave the pro-
grammer wondering whether he/she did it correctly. A useful device in this


Table 28.5 Effect of differencing interval on accuracy (MLE standard errors)

Derivative μφθ

Analytic 17.0938 0.906587 0.568809
(0.105209) (0.0453888) 0.0868112)
h=0.01 17.0945 0.908317 0.573343
(0.106161) (0.0454922) (0.0866366)
h=0.001 17.0938 0.906760 0.569260
(0.105303) (0.0453983) (0.0867941)
h=0.0001 17.0938 0.906604 0.568854
(0.105219) (0.0453897) (0.0868095)
h=0.00001 17.0938 0.906589 0.568814
(0.105210) (0.0453888) (0.0868111)
h=0.000001 17.0938 0.906587 0.568810
(0.105209) (0.0453888) (0.0868112)
Free download pdf