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" <>
To   <>
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

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

[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.]

Professor Stephen P. Jenkins <>
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:

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