1) Type
clear*
Rerun your code. Your code should work as it is now.
Also, check your version of -ivreg2- (Baum, Schaffer & Stillman , SSC):
. which ivreg2
c:\ado\plus\i\ivreg2.ado
*! ivreg2 2.2.09 17jul2008
*! authors cfb & mes
*! see end of file for version comments
2) Required loop might look like this:
/* begin */
set more off
clear*
use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz.dta
foreach x of varlist educ motheduc fatheduc {
eststo eq`x': ivreg2 lwage exper expersq (`x'=age kidslt6 kidsge6),
ffirst robust
estadd scalar Shea =el(e(first), 1, 1)
}
esttab * using pbesample.csv, replace beta star cells(b(star) se(par
fmt(2))) stats(r2_a N widstat Shea jp , fmt(2))
/* end */
T
On Wed, May 13, 2009 at 12:54 AM, Nirina F <[email protected]> wrote:
> Hello,
>
> 1- I run the following and I am getting the error message: e(sample)
> information not available
> r(498); Could you please let me know what I have done wrong?
>
> set more off
> use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz.dta
> eststo eq1: ivreg2 lwage exper expersq (educ=age kidslt6 kidsge6),
> ffirst robust
> estadd scalar Shea =el(e(first), 1, 1)
> esttab * using pbesample.csv, beta star cells(b(star) se(par fmt(2)))
> stats(r2_a N widstat Shea jp , fmt(2))
>
> 2- Also, I would like to create a loop that would have a local xvars"
> educ1 educ2 educ3" which are the different variables that I would like
> to instrument but not sure on how I should write the loop.
>
> Thank you very much in advance for your help
> N
> *
> * 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/
>
--
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).
*
* 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/