Dear all,
Consider the following codes which uses the same data but uses four different functions:
//1: use xtivreg (with two-way fixed effects)
//2. use xtivreg2 (with two-way fixed effects)
//3: use ivreg (with two-way fixed effects)
//4. use ivreg2 (with two-way fixed effects)
Summary:
ivreg and xtivreg yield the same standard error. However, ivreg2 and xtivreg2 give different standard errors (also different from
standard error of xtivreg (or ivreg)). I would appreciate if someone could highlight the reason for difference.
Thank you.
Consider the following codes which uses the same data but uses four different functions:
:
webuse grunfeld, clear qui tabulate company,gen(com) qui tabulate year,gen(yr)
:
xtivreg mvalue (invest= kstock) yr*,fe
:
xtivreg2 mvalue (invest= kstock) yr*,fe
//3: use ivreg (with two-way fixed effects)
:
ivreg mvalue (invest= kstock) yr* com*
:
ivreg2 mvalue (invest= kstock) yr* com*
ivreg and xtivreg yield the same standard error. However, ivreg2 and xtivreg2 give different standard errors (also different from
standard error of xtivreg (or ivreg)). I would appreciate if someone could highlight the reason for difference.
Thank you.