[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Stephen P. Jenkins" <stephenj@essex.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: computation of normal probabilities at extreme values |

Date |
Fri, 23 Sep 2005 18:06:39 +0100 |

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 form exp(a*x) * N(-b* sqrt(x) ), where N() is the CDF of the standard normal distribution 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 term.] Stephen ------------------------------------------------------------- Professor Stephen P. Jenkins <stephenj@essex.ac.uk> Institute for Social and Economic Research University of Essex, Colchester CO4 3SQ, U.K. Tel: +44 1206 873374. Fax: +44 1206 873151. http://www.iser.essex.ac.uk Survival Analysis using Stata: http://www.iser.essex.ac.uk/teaching/degree/stephenj/ec968/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: _gcorr.ado question** - Next by Date:
**st: Re: Merging and counting variables** - Previous by thread:
**st: Merging and counting variables** - Next by thread:
**RE: st: computation of normal probabilities at extreme values** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |