[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: -nestreg- (was: st: saving a sample after a regression)
On Mar 12, 2007, at 4:40 PM, Jeff Pitblado, StataCorp LP wrote:
Michael S. Hanson <firstname.lastname@example.org> expressed an interested in
getting -nestreg- to support a command:
Thanks, Jeff. I guessed I had probably missed them; next time I'll
look with -hsearch- instead of just using the "Find" command from the
OS with a particular help file. Trying -hsearch sw- now shows
-program_properties- as the top hit.
The on-line help also makes reference to using -sw- or -swml- as
-program- properties for the user-written program.... But neither the
on-line help nor the manuals have turned up any information on such
properties (although I concede I may have missed them).
Program properties are documented in -[P] program properties-, which
is also present in the online help. In Stata type
. help program properties
Note that the paretheses in -ivreg-'s varlist syntax are in conflict
with the standard syntax required by -nestreg-. Here is a simple
wrap-around routine for -ivreg- that allows you to fix the
instrumental variables when it is prefixed with -nestreg-:
Thanks also for that example -- it gives me something to experiment
program myivreg, prop(sw)
syntax [varlist] [if] [in] [aw fw iw pw] [, ivlist(string) *]
ivreg `varlist' (`ivlist') ///
`if' `in' [`weight'`exp'], `options'
In -myivreg-, all we really did was provide the standard syntax and
the -sw- program property; -ivreg- handles all the other things like
-e(b)-, -e(V)-, and -e(sample)-.
* For searches and help try: