Announcement

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

  • Time invariant dummies.

    Hi,

    I am performing a fe model and I am adding a series of country dummies to control for country fe.
    Unfortunately, all the country dummies are omitted due collinearity (they do not change over time), Is there a way to overcome this problem?

    Many thanks, Chiara
    Last edited by Chiara LR; 27 Jan 2023, 18:27.

  • #2
    No, math doesn't allow for this to happen. Unit FE models drop out any and all time invariant predictors, it has to so the model can estimate at all.


    EDIT: Wait stop. Belay that. Something doesn't seem right. Can you present your data with dataex, please, as well as your exact code you tried?

    Oh, and welcome to Statalist

    Comment


    • #3
      Hi Jared,

      GAP is a variable that captures the differential between two different types of credit ratings (categorical variable).
      Bailin is a dummy variable that takes value 1 after the introduction of the regulation and 0 otherwise.


      input byte(GAP Bailin) float(lnSizelag_w ROAlag_w TIER1lag_w EQTAlag_w TCARlag_w NPLlag_w LiqTAlag_w Inflationlag Govdebtlag GDPgrowthlag Sovratinglag)
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 . . . . . . . . . . .
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 3.2 66.6 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 3.2 66.6 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 2.8 68.3 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 3.1 68.3 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 3.2 68.3 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 3.1 67.8 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 2.8 67.8 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 2.4 67.8 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 1.3 67.7 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 1.2 67.7 -.4173187 20
      0 0 26.64222 .302959 15.3 3.647096 20.2 3 24.66548 1.4 67.7 -.4173187 20
      0 0 . . . . . . . . . . .
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .4 67.1 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .1 67.1 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .6 68.5 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .1 68.5 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .3 68.5 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .3 68.1 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .4 68.1 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .3 68.1 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .4 67.9 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 .3 67.9 1.0368066 20
      0 0 26.681347 .298858 14.1 3.845508 18.9 2.9 21.882713 -.1 67.9 1.0368066 20
      0 0 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 -.7 68.9 1.5062548 20
      0 0 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 -.5 68.9 1.5062548 20
      0 0 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 -.3 68.9 1.5062548 20
      0 0 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 0 66.7 1.5062548 20
      0 0 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .7 66.7 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .5 66.7 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .8 65.8 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .4 65.8 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .3 65.8 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .4 64.6 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .4 64.6 1.5062548 20
      0 1 26.732996 .484488 16.4 4.316437 19.1 3.3 25.49776 .5 64.6 1.5062548 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .2 64.3 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .3 64.3 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .5 64.3 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 -.2 63.2 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 -.2 63.2 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 -.2 63.2 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 -.6 61.7 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .1 61.7 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 -.1 61.7 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .3 61.9 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .4 61.9 1.6076362 20
      0 1 26.70084 .450456 18 4.800473 23.1 3.3 25.28252 .7 61.9 1.6076362 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.6 59.7 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.7 59.7 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 .6 59.7 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.4 59 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 .7 59 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1 59 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.5 57.2 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.5 57.2 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.4 57.2 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.3 57 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.5 57 2.2587774 20
      0 1 26.69751 .708688 19.5 5.42512 26.6 2.5 25.28289 1.2 57 2.2587774 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.5 55.2 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.3 55.2 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1 55.2 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1 54.1 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.9 54.1 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.7 54.1 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.9 53 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.9 53 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.6 53 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.9 52.4 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.8 52.4 1.7370325 20
      0 1 26.66684 .60687 20.2 5.601962 27.3 2.2 25.75696 1.8 52.4 1.7370325 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2 50.8 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.6 50.8 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.9 50.8 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 3 50.9 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.3 50.9 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.7 50.9 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.6 49.2 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 3.1 49.2 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.7 49.2 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.8 48.5 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.6 48.5 1.262506 20
      0 1 26.650335 .54102 19.9 5.724776 25.9 2.5 25.318754 2.8 48.5 1.262506 20
      0 1 26.70373 -.011678 19.5 5.305303 23.9 3.4 32.955364 1.7 49.4 -4.6100173 20
      0 1 26.70373 -.011678 19.5 5.305303 23.9 3.4 32.955364 1.3 49.4 -4.6100173 20
      0 1 26.70373 -.011678 19.5 5.305303 23.9 3.4 32.955364 1.1 49.4 -4.6100173 20
      0 1 26.70373 -.011678 19.5 5.305303 23.9 3.4 32.955364 1 55.1 -4.6100173 20
      0 1 26.70373 -.011678 19.5 5.305303 23.9 3.4 32.955364 1.1 55.1 -4.6100173 20
      end
      [/CODE]



      xtreg GAP Bailin2015 lnSizelag_w ROAlag_w TIER1lag_w EQTAlag_w LiqTAlag_w NIROPlag_w Govdebtlag GDPgrowthlag Sovratinglag Inflatio
      > nlag NPLlag i.idcountry, fe i( idbank ) robust
      note: 2.idcountry omitted because of collinearity
      note: 4.idcountry omitted because of collinearity
      note: 5.idcountry omitted because of collinearity
      note: 6.idcountry omitted because of collinearity
      note: 7.idcountry omitted because of collinearity
      note: 8.idcountry omitted because of collinearity
      note: 9.idcountry omitted because of collinearity
      note: 10.idcountry omitted because of collinearity
      note: 11.idcountry omitted because of collinearity
      note: 12.idcountry omitted because of collinearity

      Fixed-effects (within) regression Number of obs = 2,326
      Group variable: idbank Number of groups = 36

      R-sq: Obs per group:
      within = 0.1538 min = 12
      between = 0.0634 avg = 64.6
      overall = 0.0170 max = 94

      F(12,35) = 5.28
      corr(u_i, Xb) = -0.7137 Prob > F = 0.0001

      (Std. Err. adjusted for 36 clusters in idbank)

      Robust
      GAP Coef. Std. Err. t P>t [95% Conf. Interval]

      Bailin2015 .2176423 .1161573 1.87 0.069 -.0181696 .4534541
      lnSizelag_w .3323422 .3265694 1.02 0.316 -.3306289 .9953134
      ROAlag_w .2648667 .0784239 3.38 0.002 .1056576 .4240758
      TIER1lag_w -.0240777 .0124616 -1.93 0.061 -.0493761 .0012207
      EQTAlag_w .0051717 .0500517 0.10 0.918 -.0964388 .1067821
      LiqTAlag_w -.0030396 .0074461 -0.41 0.686 -.0181559 .0120768
      NIROPlag_w -.0033535 .0053493 -0.63 0.535 -.0142131 .0075061
      Govdebtlag .0114137 .0045875 2.49 0.018 .0021005 .0207269
      GDPgrowthlag -.0052455 .0085158 -0.62 0.542 -.0225334 .0120424
      Sovratinglag .0573474 .0638119 0.90 0.375 -.0721976 .1868924
      Inflationlag -.0244924 .0240673 -1.02 0.316 -.0733517 .0243669
      NPLlag -.0130163 .0115712 -1.12 0.268 -.0365071 .0104744

      idcountry
      2 0 (omitted)
      4 0 (omitted)
      5 0 (omitted)
      6 0 (omitted)
      7 0 (omitted)
      8 0 (omitted)
      9 0 (omitted)
      10 0 (omitted)
      11 0 (omitted)
      12 0 (omitted)

      _cons -9.869158 9.152223 -1.08 0.288 -28.44916 8.710843

      sigma_u .9862269
      sigma_e .3643588
      rho .87990118 (fraction of variance due to u_i)


      .

      Comment


      • #4
        Chiara:
        due to the omission of some variables in your data excerpt, your -xtreg,fe- code cannot run.
        That said:
        1) as Jared already pointed out, the -fe- estimator wipes out all time-invariant variables- Therefore, there's no way you can get -i.country- coefficients with the -fe- speciifcation;
        2) you may want to test, via the community-contributed module -xtoverid-, if -re- is the way to go (caveat emptor: -xtoverid- supports non-default standard errors but does not allow -fvvarlist- notation; see -xi:- èprefix as a possible work-around).
        Last edited by Carlo Lazzaro; 28 Jan 2023, 02:13.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Yep that's the issue, i.country=fe, so it's natural they're drop out.

          Comment

          Working...
          X