Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xtivreg2 not reporting first stage stats

    Hi,
    I ran a batch of things on Stata 13.1 (May 2014) for Unix, using an up-to-date -xtivreg2-. I know that I could rerun everything to investigate why no first stage were reported in these (many, if not all) cases, but it would also help to know the possible reasons beforehand. Is it directly related to the issue of singletons mentioned in the output? Thanks!

    Code:
    Warning - singleton groups detected.  74939 observation(s) not used.
    
    FIXED EFFECTS ESTIMATION
    ------------------------
    Number of groups =   1142365                    Obs per group: min =         2
                                                                   avg =       3.9
                                                                   max =         4
    
    Unable to display summary of first-stage estimates; macro e(first) is missing

  • #2
    The way ivreg2 and xtivreg2 work with first-stage estimates is that the first stage regressions are always run and stored using -est store-. They never display first-stage results "on the fly".

    I'm not sure why the macro e(first) would be missing, but the singletons issue isn't one of them. Here is what is going on inside xtivreg2/ivreg2 when you use the first option.

    When you call xtivreg2 to estimate with the first option, it will save the the e(first) macro, and store (temporarily) the first-stage results; the list of stored first-stage equations is in e(firsteqs). After the first-stage results are displayed, the stored equations results are dropped and the macro e(firsteqs) is cleared. This is to save space, and it means that if you use xtivreg2 in replay mode, it will fail to find them (but it will find e(first), so that's not the explanation in your case). If you want to keep the first-stage results for later use, you need to use the savefirst option.

    Hope this helps...

    Comment


    • #3
      Hi Mark, thank for your answer.
      I do this exactly your recommendation.
      xtivreg2 y1 x1 x2 x3 (y2 = z1), first savefirst fe gmm2s robust But when I try to see the results, I get: outreg2 [_xtivreg2_y2] using prova2, replace
      variable _est__xtivreg2_y2 not found
      r(111); Please, can you say me how work this command? Thanks, Glenda

      Comment


      • #4
        Glenda: I get the same problem with outreg2 and I don't know why. But there's an easy workaround that works on my machine. First restore the saved first-stage results so that they are in memory, i.e., estimates restore _xtivreg2_y2. Then use outreg2 as usual for results that are the current set of results.

        Comment


        • #5
          Hi Mark, in my case, this problem is present depending on what are your fixed effects, this is strange. But then can I see the F test of excluded instruments?.

          Comment


          • #6
            Glenda - I don't know exactly what you mean. But if you want the F test of excluded instruments, you can either look for it in the main output of xtivreg2, or restore the saved first-stage results and then do the test yourself by hand.

            Comment


            • #7
              For example, I have a data base of children, and this children belong to household, and this household belong to town. I have two options, use fixed effects of household o fixed effects of town. When I use fixed effects of town (than are little in comparation of household) I can get the first stage, in other case, is not possible. For other hand, what part of xtivreg2 has this information. When I restore the saved first-stage results, I get the same result, e.d, only get OLS results, then I can´t do the test by hand. Can you say me any advice? Thanks, Glenda

              Comment

              Working...
              X