Statalist The Stata Listserver


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

RE: st: wald test


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: wald test
Date   Tue, 23 Jan 2007 15:30:42 -0000

Didn't notice before, but any circumlocution, periphrasis or
going-around-the mulberry bush is not the major issue. If this 
is a log likelihood, then recall that when you take logarithms 
multiplications map to additions and the divisions to subtractions....  

Nick 
[email protected] 

Joseph Coveney
 
> A fellow list member has chided me off-list for (yet again) posting 
> circumlocutory code.  In the -mlreg- program posted yesterday in this 
> thread, please replace the following block of code
> 
>     tempvar residual
>     quietly {
>         generate double `residual' = $ML_y1 -`Bx'
>         replace `lnf' = -0.5 * ln(2*_pi) - ///
>           ln(`sigma')  -0.5 * `residual'^2 / `sigma'^2
>     }
> 
> with the following single line
> 
>     quietly replace `lnf' = ln(normalden($ML_y1, `Bx', `sigma'))

*
*   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