Dear all,
I have two instrumental variable regression estimated on two partially overlapping samples. I'd like to statistically compare a coefficient of model 1 with a coefficient of model 2. When I use suest to construct a common variance-covariance matrix, I get the following error message: (ivregress): ivregress is not supported by suest (ivreg2): unable to generate scores for model modelone suest requires that predict allow the score option r(322); What should I do to compare two coefficients across iv models? Earlier discussion of the same issue did not resolve the problem: http://www.stata.com/statalist/archive/2009-07/msg01012.html http://www.stata.com/statalist/archive/2005-04/msg00754.html Any help is greatly appreciated, Bart * * 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/ |
Bart Vanneste <[hidden email]>:
You can try stacking the models and clustering by observation which should be equivalent to the -suest- approach, but you might also try bootstrapping to confirm this gives the right answer (stratifying by three groups: in sample 1 only, in sample 2 only, in both samples). 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 keep if (n==1&south)|(n==2&smsa) g hours1=hours*!(n==1&south) g hours2=hours*!(n==2&smsa) g ten1=tenure*!(n==1&south) g ten2=tenure*!(n==2&smsa) g union1=union*!(n==1&south) g union2=union*!(n==2&smsa) ivreg wage (hours?=ten? union?) n, cl(idcode) est sto stacked restore esttab south smsa stacked, nogaps mti On Fri, Nov 27, 2009 at 3:09 PM, Bart Vanneste <[hidden email]> wrote: > Dear all, > > I have two instrumental variable regression estimated on two partially overlapping samples. I'd like to statistically compare a coefficient of model 1 with a coefficient of model 2. When I use suest to construct a common variance-covariance matrix, I get the following error message: > (ivregress): ivregress is not supported by suest > (ivreg2): unable to generate scores for model modelone suest requires that predict allow the score option r(322); > > > What should I do to compare two coefficients across iv models? > > Earlier discussion of the same issue did not resolve the problem: > http://www.stata.com/statalist/archive/2009-07/msg01012.html > http://www.stata.com/statalist/archive/2005-04/msg00754.html > > Any help is greatly appreciated, > Bart * * 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/ |
Thanks, Austin! This solves the problem.
Bart ----- Original Message ---- From: Austin Nichols <[hidden email]> To: [hidden email] Sent: Sun, November 29, 2009 4:56:52 AM Subject: Re: st: Compare ivreg coefficients across models Bart Vanneste <[hidden email]>: You can try stacking the models and clustering by observation which should be equivalent to the -suest- approach, but you might also try bootstrapping to confirm this gives the right answer (stratifying by three groups: in sample 1 only, in sample 2 only, in both samples). 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 keep if (n==1&south)|(n==2&smsa) g hours1=hours*!(n==1&south) g hours2=hours*!(n==2&smsa) g ten1=tenure*!(n==1&south) g ten2=tenure*!(n==2&smsa) g union1=union*!(n==1&south) g union2=union*!(n==2&smsa) ivreg wage (hours?=ten? union?) n, cl(idcode) est sto stacked restore esttab south smsa stacked, nogaps mti On Fri, Nov 27, 2009 at 3:09 PM, Bart Vanneste <[hidden email]> wrote: > Dear all, > > I have two instrumental variable regression estimated on two partially overlapping samples. I'd like to statistically compare a coefficient of model 1 with a coefficient of model 2. When I use suest to construct a common variance-covariance matrix, I get the following error message: > (ivregress): ivregress is not supported by suest > (ivreg2): unable to generate scores for model modelone suest requires that predict allow the score option r(322); > > > What should I do to compare two coefficients across iv models? > > Earlier discussion of the same issue did not resolve the problem: > http://www.stata.com/statalist/archive/2009-07/msg01012.html > http://www.stata.com/statalist/archive/2005-04/msg00754.html > > Any help is greatly appreciated, > Bart * * 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/ |
Powered by Nabble | Edit this page |