On 6/10/07, [email protected] <[email protected]> wrote:
<snip>
The code below nearly gets there. From the plot of the Wald statistic
against alpha, the smallest element of alpha (on this coarse grid) is
alpha_hat = 29. I could
not work out how to use the minimum function to extract this value. I tried
things like --- scalar alpha_hat = min(alpha) --- but that won't work.
What's the trick
<snip>
You could try:
sort W
scalar alpha_hat = alpha[1]
or
sum W, meanonly
if W == r(min) {
scalar alpha_hat = alpha
}
Scott
*
* 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/