Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Re: st: How do I suppress computation of standard errors in stata gmm function?
From
"Brian P. Poi" <[email protected]>
To
[email protected]
Subject
Re: st: Re: st: How do I suppress computation of standard errors in stata gmm function?
Date
Fri, 02 Aug 2013 08:36:14 -0500
On 08/01/2013 04:20 AM, Howard Smith wrote:
Hi Mike
When you run the estimator once, how much time elapses between the
final iteration and displaying results? That would be an upper bound
on the time savings from eliminating the standard error calculation.
I did this upper bound check, and in fact that's why I wanted to turn off the standard errors.
Quite a lot of time elapses after the last iteration and the computation of standard errors: several minutes. Even though I supply analytical gradients.
I am not sure why it takes so long,
perhaps because I have a lot of parameters (50) and a very large dataset.
It's a pity they can't be switched off.
Howard
Howard,
The ability to switch off -gmm-'s computation of standard errors when doing bootstrapping is an interesting idea. We will look into implementing that.
I'd also like to mention two enhancements to -gmm- that were made available in the Stata 13 adofile update of 23jul2013. These can speed up the standard error computations quite substantially.
First, you can now specify equation names within the parameters() option when you write a function-evaluator program. The upshot is that when you use this feature, you specify equation-level analytic derivatives rather than parameter-level derivatives. If your moment equations contain linear combinations of variables, using equation names makes programming the derivatives significantly easier, and, moreover, -gmm- is faster.
Second, if you use numeric derivatives, there is a new option 'quickderivatives' that can greatly speed up the computation of the standard errors. In a large majority of cases, using 'quickderivatives' is just as accurate as the default computations for the derivatives required for the standard errors, yet it is much faster. In some complicated problems where computing the standard errors used to take minutes, specifying 'quickderivatives' lets -gmm- get the standard errors in a second or two.
In Stata type
. update query
and follow the instructions to get the latest ado-file update. Both the help file and reference manual entry for -gmm- have been updated to reflect these new features.
-- Brian Poi
-- [email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/