[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: computation of normal probabilities at extreme values
There is an interesting paper in the "Replication Section" of the latest
issue of the Journal of Applied Econometrics, 20: 685-690 (2005):
"Validating multiple structural change models -- a case study" by Achim
Zeileis & Christian Kleiber
In short, using the software R, the authors attempt to replicate some
results derived using the software Gauss, and are unable to. The
problems are traced to issues related to computing expressions of the
exp(a*x) * N(-b* sqrt(x) ), where N() is the CDF of the standard
As the authors say (p. 687), "... a is approximately equal to 8.314
while b is approximately equal to 4.08, and the term must be evaluated
for x in range [-10, 300] (approximately). Numerically, for x in the
vicinity of 300, the term exp(a*x) * N(-b* sqrt(x) ) is the product of a
rather large, exp(a*x), and a rather small, N(-b* sqrt(x) ), number and
it depends on the implementation as well as the routines used by the
software package what the latter returns."
Differences between R and Gauss are shown to relate to differences in
treatment of numerical underflow issues that arise in this context.
The authors also explore alternative computations involving computation
of log[N(.)] directly and point to some problems with this computation
in the version of Gauss they had access to.
I was wondering:
(a) are these issues concerning computation at extreme values of the
standard normal CDF handled gracefully in Stata (cf. function
-normal(z)- in Stata 9)?, and
(b) is there much to be gained, from a computational accuracy point of
view, from having a (new) Stata function that would compute "normal log
probabilities" directly? [In -ml- evaluation programs, I often compute
normal probabilities and then take logs to get a likelihood contribution
Professor Stephen P. Jenkins <email@example.com>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374. Fax: +44 1206 873151.
Survival Analysis using Stata:
* For searches and help try: