Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: Update to decomp

From   Ian Watson <[email protected]>
To   statalist <[email protected]>
Subject   st: re: Update to decomp
Date   Sat, 29 Jan 2005 18:53:09 +1100

In my earlier posting I wrote:

   For those interested in hacking ado files, the line

   if e(cmd)=="heckman" | e(cmd)=="tobit"

   can be easily modified to include other Stata regression commands if
   you find that -decomp- fails on a particular type of regression. The
   error message is usually something like "_cons not found" and this
   indicates that the e(b) vector is not a "standard" one, but has
   additional rows. The code which follows this line deals with these
   additional rows,

As Kit Baum has pointed out to me, this is likely to confuse people. I
neglected to mention that the "e(b) vector" which my code manipulates
has been transposed from a row vector to a column vector at the outset
(and becomes a column of betas resembling the usual Stata display of
regression results). This is the reason why I talk about "rows" rather
than columns, as one might expect with the vector of betas returned by
e(b). My vector of betas has rows, and the "additional rows" I am
talking about are those that report additional estimates (such as
ancillary parameters (_se) in the case of -tobit- and the selection
equation estimates in the case of -heckman-).

Sorry for any confusion. My main point is that if you are interested
in hacking the ado files (himod and lomod) for a particular regression
command you are running, then you need to examine the e(b) vector
(using: mat list e(b)) to see if there are additional estimates listed
after the _cons estimate. If there are, you will need to incorporate
the name of the e(cmd) (using: ereturn list) into the line mentioned

Thanks to Kit for drawing my attention to this.

Kind regards,

Ian Watson
Senior Researcher
University of Sydney
NSW 2006

Phone: 02 9351 5622
  Fax: 02 9351 5615

Email: [email protected]

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index