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, **statalist.org** is already up and running.

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

From |
"Fitzgerald, James" <J.Fitzgerald2@ucc.ie> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option |

Date |
Thu, 5 Jul 2012 09:32:43 +0000 |

Thanks again Mark. I'll definitely try the method you suggested All the best James ________________________________________ From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Schaffer, Mark E [M.E.Schaffer@hw.ac.uk] Sent: 05 July 2012 10:16 To: statalist@hsphsun2.harvard.edu Subject: st: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option James, > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of > Fitzgerald, James > Sent: 05 July 2012 09:31 > To: statalist@hsphsun2.harvard.edu > Subject: st: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option > > Mark, > > > > > > > Mark, > > > > > > Thank you for your reply. I understand what you are saying with > > > regards to the orthogonality of a regressor being dependent on the > > > model specified. > > > > > > I think maybe my understanding of excluded instruments is > > incorrect. > > > Do the instruments listed as excluded affect the error term? I was > > > working on the presumption that they did not > > > > If by "error term" you mean the true error and not the > > estimated residual, then you are right, of course. But if > > you mean the residual, it's a different story. > > > > I was referring to the residual. > > The choice of excluded instruments influences the residual via the > estimated coefficient. Change the excluded instruments and beta_hat > changes, which in turn changes the residual. > > > You'll have to excuse my > > ignorance with regards econometrics. I'm very much a beginner! > > > > > (and I have no real basis for this presumption except > that they are > > > "excluded" from the model specification). > > > > > > My reason for implementing xtivreg2 is to investigate > > whether or not > > > any of my regressors are still endogenous after having > > controlled for > > > firm specific time invariant effects and firm invariant > > time specific > > > effects (two way fe model). The only way I know how do to > > this is to > > > find a set of valid instruments and use the orthog or endog > > options in > > > xtivreg2. > > > I decided to use lags of my regressors as potential > > instruments, and > > > found that some are valid and some are not. > > > > Which means, I think, that you are using multiple lags as > > instruments so that the model is overidentified. > > > > I'm actually only using the first lag of each regressor. > > Ah - and you are getting a J (overidentification) stat because you > estimate something like > > xtivreg2 ltdbv lnsale tang itang itangdum tax prof mtb > capexsa liq ndts > yr* (=l.itang l.prof l.mtb l.capexsa l.liq l.ndts) if profsubs>0 & > capexsasubs>0, fe cluster(firm) gmm2s orthog(tang) > > Correct > > in which case, since there are no endogenous regressors, the > interpretation of the J stat is like an LM test of whether the IVs > (l.itang through l.ndts) can be excluded from the equation. It's the > same interpretation as if you included them as regressors and > then did a > Wald test of the joint significance of the coefficients. > > I understand. > > > I > > assumed that thet would not all be endogenous, and thus I > > would not need additional lags to ensure the model is > overidentified. > > I use the orthog option specifying only one regressor to be > > tested at a time i.e. > > xtivreg2 ltdbv lnsale tang itang itangdum tax prof mtb > > capexsa liq ndts yr* (=l.lnsale l.tang l.itang l.itangdum > > l.tax l.prof l.mtb l.capexsa l.liq l.ndts) if (I put a term > > in here to specify the sub-sample), fe cluster(firm) gmm2s > > orthog(lnsale) (I repeat this replacing lnsale with tang, > > itang, etc.) I then conclude a regressor may be endogenous if > > the C-Stat is high (p-value low) > > That makes sense. You treat lnsale as exogenous and ask if you can > treat it as endogenous (orthog option). > > You would get the same test stat if you said > > xtivreg2 ltdbv tang itang itangdum tax prof mtb capexsa liq ndts yr* > (lnsale=l.lnsale l.tang l.itang l.itangdum l.tax l.prof l.mtb > l.capexsa > l.liq l.ndts) if (I put a term in here to specify the sub-sample), fe > cluster(firm) gmm2s endog(lnsale) > > i.e. you treat lnsale as endogenous and ask if you can treat it > exogenous (endog option), i.e., you do an endogeneity test. > > > (However, before I test the included instruments for > > orthogonality > > This is more conventionally described as "testing regressors for > endogeneity". > > > I test each individual excluded instrument i.e. > > same as above but with orthog(l.lnsale), and then l.tang etc. > > This is where I am getting confused. Testing excluded instruments in > this way, when there are no endogenous regressors, is > basically the same > thing as using them as regressors (making them "included IVs") and > testing if they are significant (different from zero). > > I think I understand. Instead of testing them using orthog > option, could I just do the following?: > > 1. Run the model with no regressors specified as endogenous > and the first lag of each regressor in the excluded > instruments varlist > 2. Observe the Hansen J stat of all excluded instruments. If > this is sufficiently low, I can test the included regressors > for endogeneity. > 3. If the Hansen J stat is high, remove each excluded > instrument one at a time and observe the effect on the Hansen > J stat. If it gets smaller, drop the instrument, if it gets > bigger, put the instrument back in. > 4. At the end of this I have a set of excluded instruments > that are valid instruments. > 5. I can then safely test the endogeneity of each of my > included instruments. This is problematic ... what bothers me most, I suppose, is that for (1)-(4) you are assuming that your regressors are exogenous, and then when you get to (5) you test this. If you are genuinely concerned that they might be endogenous, then this will contaminate what you do in (1)-(4), so the word "safely" doesn't really apply in (5). And the experimentation in (3) is a problem as well. Why not start with a model that you hope is consistent under both the null and the alternatively, namely with the suspect regressors treated as endogenous and with lags as instruments? If the J stat is large, then you can conclude it's because some or all of the lags are invalid instruments. If you have a prior about why some lags might be invalid (e.g., perhaps the gap in time between the current value and the lagged instrument isn't longg enough) then you can test the suspect instruments (i.e., orthog option applied to the most recent lags). If the J stat is small, then you can go ahead and test your endogenous regressors to see if they can be treated as exogenous (i.e., endog option). --Mark > > It's past midnight here and I have to give up for now... > > I really (really!!) appreciate all your help. > > James > > --Mark > > > I do this because xtivreg2 file said that the null of no > > endogeneity of the difference in Hansen test can only be > > rejected if the Hansen J Stat of the smaller equation without > > the suspect instruments is low. This way I have a set of > > excluded instruments that generate a Hansen J stat > say, > > 0.5, and thus when i test the othogonality of the included > > instruments I can safely accept or reject the null.) Is this > > completely wrong?? As I said below, I get very different C - > > Stats for my included instruments depending on the set of > > excluded instruments that I use, even though the different > > sets of excluded instruments have relatively low Hansen J stats. > > > > These tests can also be cast in terms of vector-of-contrast > > tests. So you are doing two sorts of tests: > > > > (1) Are the coeffs on the endogenous regressors different > > depending on which lags are used as instruments, i.e., do the > > different lags identify different betas? These are your > > overid tests/orthog of excluded IVs tests. > > > > (2) Are the coeffs on the regressors different depending on > > whether you treat them as endogenous or exogenous? These are > > your endogeneity tests. > > > > > My problem though is that I am estimating my model on a number of > > > sub-samples from my whole sample. I find that the set of valid > > > instruments changes within each sub-sample, and hence the > > reason for > > > all the orthogonality tests of both excluded and included > > instruments > > > within each sub-sample > > > > This sounds a little dubious, but maybe it's OK. What > > defines your subsamples? > > > > The values each observation takes for two particular > > variables i.e. small & low profit > > > > > Is my methodology wrong? Is there any way to test for endogeneity > > > without specifying excluded instruments i.e with either xtreg or > > > xtivreg2? > > > > If you mean what I think you mean, the answer is no. The way > > to test for endogeneity is, in effect, (2) above - compare > > the estimated coeff when you treat the regressor as exogenous > > with the est coeff when you treat it as endogenous. If > > they're similar, you conclude the regressor is exogenous. If > > they're different, you conclude it's endogenous. Of course, > > for this test to work, the instruments that enable you to get > > an estimate have to be valid. > > > > By valid do you mean that the Hansen J stat should be low? > > > > > Would I be better off assuming my regressors are > exogenous, as I do > > > not have any strong theoretical justification to believe > > they are not > > > (and also given that I have controlled for firm and time effects)? > > > > What are the results of your endogeneity tests? That is, > > once you think you have a reasonable specification when the > > regressor is treated as endogenous, does the endog test say > > you can treat it as exogenous? > > > > The lowest p-value I have gotten for a C-stat was the one I > > reported below (0.0392), but as I mentioned below this is > > dependent on the set of excluded instruments used (first > > e-mail). The rest of the p-values for each included variable > > in each sub-sample are >0.1000 > > > > --Mark > > > > > > > > Any advice you could give me is greatly appreciated. I'm a > > bit lost as > > > to what to do! > > > > > > Thanks > > > > > > > > > > > > > > Hi Statalist users, > > > > > > > > I am estimating the following model in STATA 11.2: > > > > > > > > xtivreg2 ltdbv lnsale tang itang itangdum tax prof mtb > > capexsa liq > > > > ndts yr* (=l.lnsale l.tang l.itang l.itangdum l.tax l.prof l.mtb > > > > l.capexsa l.liq l.ndts) if profsubs>0 & > > > > capexsasubs>0, fe cluster(firm) gmm2s > > > > > > > > In order to ensure my excuded instruments are orthogonal, > > I use the > > > > orthog option to test the orthogonality of each excluded > > > variable i.e. > > > > orthog(l.lnsale) and so on. > > > > > > > > Once I have a set of excluded instruments that are orthogonal > > > > > > I am not sure, but the problem might be here. > > > > > > You write as if your instruments can have a property called > > > "orthogonality" in some abstract sense, separate from the > model you > > > have specified. > > > > > > But that's not how it works. The orthogonality of Z > means E(Zu)=0, > > > where u is the ("true") disturbance term for a specified > model. If > > > you change the model, you change the definition of u (u is, in a > > > sense, by definition everything that is not in the model). > > It's quite > > > possible for E(Zu)=0 for one model but then not be true if > > you change > > > the model by adding or dropping regressors. > > > > > > Apologies if this obvious and not what you meant. HTH in > any case. > > > > > > Cheers, > > > Mark > > > > > > > (say Hansen J Stat p-value >0.5000), I then test the > > > orthogonality of > > > > each of my included instruments i.e. > > > > orthog(lnsale) and so on. > > > > > > > > However, I am finding that the C-Stat for some of the included > > > > instruments depends on the set of excluded instruments, > > > even though in > > > > each case the set of excluded instruments appears orthogonal. > > > > > > > > For example, when I run the following: > > > > > > > > xtivreg2 ltdbv lnsale tang itang itangdum tax prof mtb > > capexsa liq > > > > ndts yr* (=l.itang l.prof l.mtb l.capexsa l.liq > > > > l.ndts) if profsubs>0 & capexsasubs>0, fe cluster(firm) gmm2s > > > > orthog(tang) > > > > > > > > I get the following results in relation to orthogonality tests: > > > > > > > > Hansen J statistic (Lagrange multiplier test of excluded > > > > instruments): 5.104 Chi-sq(6) P-val = 0.5306 > > > > -orthog- option: > > > > Hansen J statistic (eqn. excluding suspect orthog. > > > > conditions): 0.853 Chi-sq(5) P-val = 0.9735 > > > > C statistic (exogeneity/orthogonality of suspect > > > > instruments): 4.250 Chi-sq(1) P-val = 0.0392 > > > > Instruments tested: tang > > > > Included instruments: lnsale tang itang itangdum tax prof > > > mtb capexsa > > > > liq ndts yr90 yr91 yr92 yr93 yr94 yr95 yr96 yr97 yr98 > > > > yr99 yr00 > > > > yr01 yr02 yr03 yr04 yr05 yr06 yr07 > > > > Excluded instruments: L.itang L.prof L.mtb L.capexsa > L.liq L.ndts > > > > Dropped collinear: yr08 > > > > > > > > However, when I drop l.capexsa and l.liq from the set > of excluded > > > > instruments I get: > > > > > > > > > > > > Hansen J statistic (Lagrange multiplier test of excluded > > > > instruments): 0.970 Chi-sq(4) P-val = 0.9143 > > > > -orthog- option: > > > > Hansen J statistic (eqn. excluding suspect orthog. > > > > conditions): 0.570 Chi-sq(3) P-val = 0.9033 > > > > C statistic (exogeneity/orthogonality of suspect > > > > instruments): 0.400 Chi-sq(1) P-val = 0.5271 > > > > Instruments tested: tang > > > > Included instruments: lnsale tang itang itangdum tax prof > > > mtb capexsa > > > > liq ndts yr90 yr91 yr92 yr93 yr94 yr95 yr96 yr97 yr98 > > > > yr99 yr00 > > > > yr01 yr02 yr03 yr04 yr05 yr06 yr07 > > > > Excluded instruments: L.itang L.prof L.mtb L.ndts > > > > Dropped collinear: yr08 > > > > > > > > > > > > Can anyone tell me why I experience such a large change in > > > the C stat > > > > for tang? > > > > > > > > Best regards > > > > > > > > James > > > > * > * > * 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/ > -- Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012 Heriot-Watt University is a Scottish charity registered under charity number SC000278. * * 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/

**Follow-Ups**:**st: RE: RE: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option***From:*"Fitzgerald, James" <J.Fitzgerald2@ucc.ie>

**References**:**st: xtivreg2: orthog option***From:*"Fitzgerald, James" <J.Fitzgerald2@ucc.ie>

**st: RE: xtivreg2: orthog option***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**st: RE: RE: xtivreg2: orthog option***From:*"Fitzgerald, James" <J.Fitzgerald2@ucc.ie>

**st: RE: RE: RE: xtivreg2: orthog option***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**st: RE: RE: RE: RE: xtivreg2: orthog option***From:*"Fitzgerald, James" <J.Fitzgerald2@ucc.ie>

**st: RE: RE: RE: RE: RE: xtivreg2: orthog option***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

**st: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option***From:*"Fitzgerald, James" <J.Fitzgerald2@ucc.ie>

**st: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option***From:*"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>

- Prev by Date:
**st: The explanation of Sargan statistic and Endogeneity test for ivreg2** - Next by Date:
**st: Multiple imputation with panel data** - Previous by thread:
**st: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option** - Next by thread:
**st: RE: RE: RE: RE: RE: RE: RE: RE: RE: xtivreg2: orthog option** - Index(es):