| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: problems in maximizing a likelihood fn
Although I do not doubt that Deepankar stumbled onto some alteration
of his program that made it work, the conclusion drawn below is
absolutely invalid. Stata scalars have EXACTLY the same precision as
variables, temporary or permanent, of data type double. Try
clear
set obs 100
scalar p = _pi
gen double pp = _pi
gen double diff = pp - p
summ pp diff
di %20.16f p
format pp %20.16f
l pp in 1
and you will see that the two have identical capabilities in terms of
precision. So the advice below -- which could be moderately
disastrous to a user with a large N, counseled to create 10 or 20
variables of length N to hold 10 or 20 constant values in her ML
evaluator -- should be disregarded.
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
On Jun 16, 2006, at 2:33 AM, Deepankar wrote:
Moral of the story: never use scalars in -ml- estimation; use
temporary
variables (if you need them) and generate them as -double-. And
only as
- -double-.
*
* 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/