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: RE: xtivreg2: confusing analytical samples reported

From   "Schaffer, Mark E" <>
To   <>
Subject   st: RE: xtivreg2: confusing analytical samples reported
Date   Mon, 18 Mar 2013 20:18:24 -0000


A few thoughts...

1.  Can you report which versions of Stata, xtivreg2, ivreg2, etc. you are using?  (As per the Statalist FAQ.)

2.  Is xtivreg2 reporting anything about not using singleton observations?  It is more informative in this respect than the official xtivreg and xtreg commands.

3.  The coefficient estimates you obtain with

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

you can also obtain with official xtivreg:

xtivreg2 y (a = x z) b c d_* e_* f_*, fe

Are they the same?


> -----Original Message-----
> From: [mailto:owner-
>] On Behalf Of Kemeny, Thomas Ernest
> Sent: 18 March 2013 16:52
> To:
> Subject: st: xtivreg2: confusing analytical samples reported
> 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.
> Tom
> --
> Thomas Kemeny
> Research Assistant Professor
> Department of Public Policy
> University of North Carolina at Chapel Hill
> *
> *   For searches and help try:
> *
> *
> *

Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)

We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see for further information and how
to apply.

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

*   For searches and help try:

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