Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -ml- evaluation: tempvars as doubles


From   "Stephen P. Jenkins" <[email protected]>
To   <[email protected]>
Subject   st: -ml- evaluation: tempvars as doubles
Date   Thu, 22 Sep 2005 12:19:50 +0100

The Gould et al. book on /Maximum Likelihood Estimation with Stata/
emphasises that temporary variables in a maximum likelihood evaluation
program should be created as doubles, and provides a salutary example of
what can happen if you don't create them thus.

As it happens, all the temporary variables cited in the illustration are
continuous (a.k.a. metric) variables, in which case the book's advice is
well-taken.

But what if you know that the temporary variable will only take on a
small number of discrete values (e.g. 0 or 1, or -1, 0, + 1)?  In
standard Stata contexts the variable could be held as a byte variable.
In the -ml- evaluator context, however, should one generate them as
doubles?

[I suspect that this is no big deal either way, though the two
strategies have different implications for memory usage and
requirements, which may bite in some applications.]

Stephen
-------------------------------------------------------------
Professor Stephen P. Jenkins <[email protected]>
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/



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