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: AW: AW: Exporting ivreg2 results in a simple long table
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: AW: AW: Exporting ivreg2 results in a simple long table
Date
Thu, 20 May 2010 10:53:59 -0400
Chuck Cleland:
You can also post all models to one estimation result (stack models)
as described in e.g.
http://repec.org/bocode/e/estout/advanced.html#advanced901
and then use -estout- (on SSC, as is -ivreg2-) to write out your file,
or you can estimate all together (if you don't care about the id
stats); compare:
clear all
u http://pped.org/card
unab x: exper expersq
unab y: educ
unab z: nearc2 nearc4
bys south66:eststo:ivreg2 lwage (`y'=`z') `x', gmm2s cl(hhid)
foreach l in y x z {
foreach v of loc `l' {
g s0`v'=`v'*(south66==0)
g s1`v'=`v'*(south66==1)
loc `l'2 ``l'2' s0`v' s1`v'
}
}
eststo: ivreg2 lwage (`y2'=`z2') `x2' south66, gmm2s cl(hhid)
esttab *, scal(j jp idstat idp widstat)
On Thu, May 20, 2010 at 10:27 AM, Martin Weiss <[email protected]> wrote:
> <snip>
> -----Ursprüngliche Nachricht-----
> Dear All,
>
> I am using ivreg2 in combination with a "by" prefix command as follows:
>
> by imp: ivreg2 mydv mycov (endotx = myinstru) , ffirst
>
> This works fine, but I would like to save the resulting coefficients
> and standard errors in a simple, long table. Something like the following:
>
> coef estim se imp
> ----------------------
> mycov 1.11 0.40 1
> endotx 3.11 0.49 1
> mycov 1.07 0.51 2
> endotx 3.02 0.63 2
> mycov 1.61 0.38 3
> endotx 3.18 0.56 3
> ..
> endotx 2.83 0.44 10
>
> Then I would like to export the table to a *.dta or plain text file.
> What is the best way to go about this?
>
> Thanks,
>
> Chuck Cleland
*
* 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/