Announcement

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

  • Using Interaction terms of independent variables and estimated values in fixed-effects regression using xtreg

    Good evening,

    I am trying to estimate a fixed-effects model using xtreg command in stata 17.0.

    My econometric model is as under:

    ki,t - ki,t-1 (1 - ΛhatZi,t-1 ) = β [(ΛhatZi,t-1 ) Xi,t-1] + ηi,t

    where
    ΛhatZi,t-1 are estimated values from a pooled regression.
    I generate the LHS variable using the generate command and then try to use the following command:

    xtreg LHS_thirdstep [c.soa_tier2_nocons1#( i.l.state1nonstate0 c.l.size c.l.profitability_w c.l.provforNPA_to_net_advances_w ///
    c.l.net_advances_to_assets_w c.l.market_funding_w i.l.Listeddummy1iflisted)] Y5-Y20, fe vce(robust)

    I get the following error: "c.soa_tier2_nocons1 unknown weight type"

    Does this mean that I must manually generate all the interaction terms on RHS for my econometric model before trying to use xtreg?

    I'm trying to follow the methodology in Jiang et al. (2019)

    Jiang, C., Liu, H., & Molyneux, P. (2019). Do different forms of government ownership matter for bank capital behavior? Evidence from China. Journal of Financial Stability, 40, 38–49. https://doi.org/10.1016/j.jfs.2018.11.005

    Thanks and regards.

  • #2
    In the syntax given for the xtreg command by help xtreg the indepvars are surrounded in brackets [ and ] because - odd as it may seem - you can run xtreg without any independent variables, and they are optional, just like if and in are optional. So if you use
    Code:
    xtreg LHS_thirdstep c.soa_tier2_nocons1#( i.l.state1nonstate0 c.l.size c.l.profitability_w c.l.provforNPA_to_net_advances_w ///
    c.l.net_advances_to_assets_w c.l.market_funding_w i.l.Listeddummy1iflisted) Y5-Y20, fe vce(robust)
    eliminating the brackets from the command, you won't have Stata thinking you're providing a weight - which actually is surrounded by brackets - rather than a list of some of your independent variables.

    Now, it may not be what you want - I'm not qualified to understand your methodology, I'm just good at reading Stata's mind and figuring out what it is thinking when it announces a syntax error.

    Comment


    • #3
      Originally posted by William Lisowski View Post
      In the syntax given for the xtreg command by help xtreg the indepvars are surrounded in brackets [ and ] because - odd as it may seem - you can run xtreg without any independent variables, and they are optional, just like if and in are optional. So if you use
      Code:
      xtreg LHS_thirdstep c.soa_tier2_nocons1#( i.l.state1nonstate0 c.l.size c.l.profitability_w c.l.provforNPA_to_net_advances_w ///
      c.l.net_advances_to_assets_w c.l.market_funding_w i.l.Listeddummy1iflisted) Y5-Y20, fe vce(robust)
      eliminating the brackets from the command, you won't have Stata thinking you're providing a weight - which actually is surrounded by brackets - rather than a list of some of your independent variables.

      Now, it may not be what you want - I'm not qualified to understand your methodology, I'm just good at reading Stata's mind and figuring out what it is thinking when it announces a syntax error.
      Thanks a lot William. The code is indeed working.

      However, there seems to be an issue with my results. My indicator variables are not exhibiting results as they should ideally (i.e. for the reference category 1). Also depending on how i order the indicator variables one of the category gets dropped. for eg:

      note: 1L.state1nonstate0#c.soa_tier2_nocons1 omitted because of collinearity
      Robust
      LHS_thirdstep Coef. Std. Err. t P>t [95% Conf. Interval]
      c.soa_tier2_nocons1#cL.size -1.204929 .8239942 1.46 0.149 -2.853162 .4433053
      c.soa_tier2_nocons1#cL.profitability_w .8311909 .4674114 1.78 0.080 -.1037711 1.766153
      c.soa_tier2_nocons1#cL.provforNPA_to_net_advances_ w .4286864 .3364938 1.27 0.208 -.2444014 1.101774
      c.soa_tier2_nocons1#cL.net_advances_to_assets_w -.0698509 .0623602 1.12 0.267 -.1945898 .054888
      c.soa_tier2_nocons1#cL.market_funding_w .0651142 .0322979 2.02 0.048 .0005087 .1297196
      L.Listeddummy1iflisted#c.soa_tier2_nocons1
      0 23.0813 14.32946 1.61 0.112 -5.581884 51.74448
      1 22.723 13.72806 1.66 0.103 -4.737198 50.1832
      L.state1nonstate0#c.soa_tier2_nocons1
      0 -.4240838 1.735835 0.24 0.808 -3.89627 3.048102
      1 0 (omitted)
      Y5 .2792379 .5636733 0.50 0.622 -.8482766 1.406752
      Y6 -.637602 .6677788 0.95 0.344 -1.973358 .6981545
      Y7 .7873123 .4665592 1.69 0.097 -.1459451 1.72057
      Y8 .5926671 .6799688 0.87 0.387 -.7674731 1.952807
      Y9 1.562704 .8756274 1.78 0.079 -.1888116 3.31422
      Y10 2.134863 .874211 2.44 0.018 .3861808 3.883546
      Y11 1.988466 1.172886 1.70 0.095 -.3576549 4.334587
      Y12 2.454433 1.119152 2.19 0.032 .2157971 4.69307
      Y13 2.115506 1.135905 1.86 0.067 -.1566421 4.387655
      Y14 1.494296 1.297193 1.15 0.254 -1.100476 4.089068
      Y15 1.31945 1.45346 0.91 0.368 -1.587903 4.226803
      Y16 1.908256 1.379692 1.38 0.172 -.8515392 4.668051
      Y17 2.02002 1.334612 1.51 0.135 -.6496013 4.689642
      Y18 2.59642 1.417224 1.83 0.072 -.2384511 5.43129
      Y19 2.7659 1.513867 1.83 0.073 -.2622841 5.794085
      Y20 2.62843 1.773836 1.48 0.144 -.9197715 6.176631
      _cons -.7346817 2.278107 0.32 0.748 -5.291574 3.822211
      sigma_u 2.4584079
      sigma_e 1.777728
      rho .65663981 (fraction of variance due to u_i)
      this is happening even when I estimate without year FE
      (Std. Err. adjusted for 61 clusters in Bankcode)
      Robust
      LHS_thirdstep Coef. Std. Err. t P>t [95% Conf. Interval]
      c.soa_tier2_nocons1#cL.size .0172878 .3759817 0.05 0.963 -.7347875 .7693631
      c.soa_tier2_nocons1#cL.profitability_w .5583617 .2504609 2.23 0.030 .0573654 1.059358
      c.soa_tier2_nocons1#cL.provforNPA_to_net_advances_ w .4084313 .1672226 2.44 0.018 .0739362 .7429264
      c.soa_tier2_nocons1#cL.net_advances_to_assets_w .0417223 .0391258 1.07 0.291 -.0365409 .1199856
      c.soa_tier2_nocons1#cL.market_funding_w .0287254 .032788 0.88 0.384 -.0368603 .0943111
      L.Listeddummy1iflisted#c.soa_tier2_nocons1
      0 4.354254 4.168328 1.04 0.300 -3.983643 12.69215
      1 3.457041 3.648269 0.95 0.347 -3.840583 10.75467
      L.state1nonstate0#c.soa_tier2_nocons1
      0 3.063894 1.689645 1.81 0.075 -.3158989 6.443686
      1 0 (omitted)
      _cons .4912929 .6968191 0.71 0.484 -.9025529 1.885139
      sigma_u 3.1152293
      sigma_e 1.8472187
      rho .73986044 (fraction of variance due to u_i)
      Any help would be much appreciated.

      Thanks and regards.

      Comment

      Working...
      X