Statalist


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

Re: st: -est combine-?


From   Michael Hanson <[email protected]>
To   [email protected]
Subject   Re: st: -est combine-?
Date   Wed, 1 Aug 2007 11:16:40 -0400

On Jul 31, 2007, at 12:26 PM, Ben Jann wrote:

Michael, I think the approach using -erepost- works best in your case.
Here is an example.
Thanks, Ben. By yesterday morning I had worked out some code that more or less delivered what I was looking for, but yours is much cleaner and more robust. A few brief comments are below.



Step 1: estimate the nl model and make a hardcopy of the AIC/BIC
measures (adding the nlcom results later on screws up computation of
the information measures)
	Wow, thanks -- I might have missed that had you not pointed it out.


Step 2: Get a hold of the coefficients and variances. (Note that the
covariances are dropped here to keep things easier. The covariances
are not needed for tabulation.)

Step 3: run nlcom and add the results to b and V; then post everything in e()
The use of just the diagonals of the VCE is also quite inspired; I had spent some time trying to get that matrix correct (including row and column equation and variable labels), but your code is much more efficient.



Step 4: apply esttab

Adding a line between the nlreg and nlcom results is a bit tricky. The
following command would do:
/*----------------------------------------------*/
. esttab NLreg NLregNLcom, p nostar ar2 scalars(AIC BIC) nodepvar
eqlabels(,none) ///
> varl(,blist(d1 "{hline @width}") begin("" "") nofirst)
Ah, you read my mind! Not only would I likely not have figured this out on my own, but I probably would have sent a message today with exactly this request. One follow-up question: in experimenting to understand the syntax, it doesn't appear that excluding the "nofirst" suboption has any impact on the final table (at least in SMCL format). What role is it playing?

Thanks again; I'm off to collect some results and then modify the code to produce booktabs LaTeX output. -estout- is truly a powerful package, and I appreciate your assistance in helping to utilize its power.

-- Mike


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