Announcement

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

  • Why -xtoverid- does not seem to support -fvvarlist-?

    Dear All,
    I have just come across what follows, related to the user-written command -xtoverid- (net describe xtoverid, from(http://fmwww.bc.edu/RePEc/bocode/x).

    Code:
    . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . quietly xtreg ln_wage i.race##i.grade c.age, re vce(robust)
    
    . xtoverid
    1b:  operator invalid
    r(198);
    
    . quietly xtreg ln_wage i.race i.grade c.age, re vce(robust)
    
    . xtoverid
    1b:  operator invalid
    r(198);
    
    . quietly xtreg ln_wage race grade c.age, re vce(robust)
    
    . xtoverid
    
    Test of overidentifying restrictions: fixed vs random effects
    Cross-section time-series model: xtreg re  robust cluster(idcode)
    Sargan-Hansen statistic  54.070  Chi-sq(1)    P-value = 0.0000
    Is there any way to workaround this drawback? Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

  • #2
    Been discussed several times:
    http://www.stata.com/statalist/archi.../msg00707.html

    Also note that xtoverid doesn't support modern stata "labels" for variables such as o. (omitted) & b. (base)
    The solution to this is to estimate using xi prefix, than estimating again without the xi prefix and excluding from the estimation command any dropped variables.
    I'm pretty sure there's a "nice" way of doing this by getting the e(b) matrix, dropping all elements with o. b. prefix (or all elements evaluated to 0?) and then re-estimating.
    I must say that I tried looking into a way of doing this, but my stata matrix manipulation skills are very lacking.

    Comment


    • #3
      Ariel.
      thanks a lot for pointing me out to a thread i wasn't aware of.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        Maybe we can use this tread to encourage Mark Schaffer to update xtoverid to use factor variables

        Comment


        • #5
          Ariel:
          great idea!
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment

          Working...
          X