Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: tsset with xtivreg2


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: tsset with xtivreg2
Date   Sat, 27 Jun 2009 10:55:26 +0200

-tsset- looks good to me. Results are usually invariant to its specification as long as the years are distinguisable...


***
webuse nlswork, clear
gen age2 = age*age
gen ttl_exp2 = ttl_exp*ttl_exp
gen tenure2 = tenure*tenure
gen byte black = race==2
tsset idcode year
xtreg ln_w grade age* ttl_exp tenure* black not_smsa south, fe
su year
replace year=year-r(min)
xtreg ln_w grade age* ttl_exp tenure* black not_smsa south, fe
***

HTH
Martin
_______________
----- Original Message ----- From: "Brent Fulton" <fultonb@berkeley.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Saturday, June 27, 2009 4:19 AM
Subject: st: tsset with xtivreg2


Hi, I am using Stata 9.2 comparing results between -areg- and -xtivreg2-
(with fixed effects), and I wasn't sure if I was coding tsset correctly. I
have one endogenous variable that I instrument with two IVs.

In the -areg- model, the four year dummy variable (yr2, yr3, yr4, yr5)
parameter estimates closely correspond, as expected, to the mean difference in the dependent variable as compared to its mean in the omitted year (yr1).
And these year dummies are very large--over an order of magnitude larger
than the other parameter estimates.

In the -xtivreg2- model, the year dummy estimates dramatically changed and
do not seem plausible. Is my coding of tsset correct below: "year" is an
integer that has five values 1,2,3,4 and 5?

Any other thoughts would be appreciated, too.


AREG code:
areg dep endogvar $ind1 yr2 yr3 yr4 yr5 [pw=wgt], absorb(id) cluster (var1)

XTIVREG2 code:
tsset id year
xtivreg2 dep (endogvar= iv1 iv2) $ind1 yr2 yr3 yr4 yr5 [pw=wgt],
cluster(var1) first fe liml

Thanks,
Brent Fulton
UC Berkeley

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index