Statalist The Stata Listserver


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

Re: st: wald test


From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: wald test
Date   Tue, 23 Jan 2007 22:54:41 +0900

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'))

Joseph Coveney

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