Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: xtivreg2: confusing analytical samples reported

From   "Kemeny, Thomas Ernest" <>
To   "" <>
Subject   st: xtivreg2: confusing analytical samples reported
Date   Mon, 18 Mar 2013 16:51:51 +0000

I'm estimating a fixed effects model using annual panel data on individuals.There is some reason to investigate potential bias due to endogeneity of one predictor (let's call it variable a).

My base model, ignoring endogeneity issues, is as follows:

.xtreg y a b c i.(d e f), fe vce(cluster g)

where d, e and f represent time, geography, and industry dummy variables. This model runs on a certain analytical sample. This all seems fine. Here is where the trouble starts: starting from the same data, I then want to run a  2SLS, using instruments x and z. Before I can do so, I have to the generate the dummy variables for d, e and f, since the i() subcommand will not work with xtivreg2.

.qui tab d, gen (d_)
.qui tab e, gen (e_)
.qui tab f, gen (f_)

Then I can run xtivreg2, as follows:

.xtivreg2 y (a = x z) b c d_* e_* f_*, fe ffirst partial(d_* e_* f_*) cluster(g)

The thing is, xtivreg fe reports a smaller analytical sample than xtreg fe -- more than a third less! And, even more curiously, if after running the xtivreg2, I run the following

.keep if e(sample)

the kept analytical sample is actually the same as it was in the original xtreg fe command. 

I am perplexed. Is ixtivreg2 mis-reporting the analytical sample? Or is something else going on here? 

Weirder - when I run xtivreg, the native stata panel IV command, the analytical sample here is the same as with xtreg fe, in other words the sample issue disappears  (but i cannot cluster SEs using xtivreg, which i can do using xtivreg2).

Any thoughts?

Much thanks. 

Thomas Kemeny
Research Assistant Professor
Department of Public Policy
University of North Carolina at Chapel Hill
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index