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: suest after ivregress or ivreg2
From
richard boylan <[email protected]>
To
[email protected]
Subject
Re: st: suest after ivregress or ivreg2
Date
Wed, 7 Apr 2010 14:54:06 -0500
Ok. This is what I am trying to do.
sysuse auto.dta
ivregress 2sls price (headroom = weight) mpg
estimates store one
ivregress 2sls price (turn = weight)
estimates store two
suest one two
testnl [one]headroom*[two]turn = [one]mpg
On Wed, Apr 7, 2010 at 2:27 PM, Austin Nichols <[email protected]> wrote:
> richard boylan <[email protected]> :
> Why don't you frame your question using an example dataset? The
> question is far from complete as worded.
> The second approach is the right answer for the relevant question,
> modulo the treatment of the constant; compare:
>
> est clear
> sysuse nlsw88, clear
> ta south smsa
> reg wage hours if south
> est sto south
> reg wage hours if smsa
> est sto smsa
> suest south smsa
> est sto suest
> preserve
> expand 2
> bys idcode: g n=_n
> keep if (n==1&south)|(n==2&smsa)
> g hours1=hours*!(n==1&south)
> g hours2=hours*!(n==2&smsa)
> reg wage hours? n, cl(idcode)
> est sto stacked
> restore
> esttab south smsa suest stacked, nogaps mti
> * confirm stacked SEs match -suest- SEs above and coefs match in all cases.
> ivreg wage (hours=tenure union) if south
> est sto south
> ivreg wage (hours=tenure union) if smsa
> est sto smsa
> preserve
> expand 2
> bys idcode: g n=_n-1
> keep if (n==0&south)|(n==1&smsa)
> g hours1=hours*!(n==0&south)
> g hours2=hours*!(n==1&smsa)
> g ten1=tenure*!(n==0&south)
> g ten2=tenure*!(n==1&smsa)
> g union1=union*!(n==0&south)
> g union2=union*!(n==1&smsa)
> ivreg wage (hours?=ten? union?) n, cl(idcode)
> est sto stacked
> restore
> esttab south smsa stacked, nogaps mti
>
>
> On Wed, Apr 7, 2010 at 3:14 PM, richard boylan <[email protected]> wrote:
>> I am trying to use suest after ivregress or ivreg2.
>>
>> I saw two answers both posted in 2009.
>>
>> The first one
>> http://n2.nabble.com/st-Wald-test-across-equations-after-ivregress-or-ivreg2-td3312229.html
>> just didn't work when I tried to replicate it.
>>
>> The second one
>> http://n2.nabble.com/st-Compare-ivreg-coefficients-across-models-td4077316.html
>> I wasn't sure if it was right nor not.
>>
>> I am just wondering if anyone had further insights since those postings.
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/