Announcement

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

  • #16
    Hi Carlo,

    On my second question regarding the categorical variable with 3 values (0, 1 and 2) (post #13) your answer was: 2) no, the code does not change.
    When I put the code in by hand instead of c.regen##i.categorical, I have to specify the model as follows:
    beta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error.

    This seems different than your answer that the model does not change if period was a categorical with 3 values:
    xtreg <depvar> =b0 + b1ReGen + b2Period + b3ReGen*Period + b4Firmsize + error

    (I left the b2*categoricalvar out because fixed-eeffect models omit those anyway)

    Am i right to assume that ' eta = b0 + b1ReGen + b2ReGen*Categoricalvar==1dummy + b3ReGen*Categorical==2dummy + error ' is the right answer? This is important as I have to write the model down in my thesis and I can't write that I did c.regen##i.period

    Second question: If I am only interested in the interaction between regen and the categorical (3 values) variable, c.regen##i.categoricalvar also includes the b2Categoricalvar (e.g. b2Period) although I am not interested in that one but in the interaction with regen only. Is it in this case better to not use c.regen##i.categoricalvar but to use:
    xtreg beta regen regen*catevar==1dummy regen*catevar==2dummy, fe robust ?
    I am asking this because the coefficients and p-values are different when excluding the b2Catevar

    I look forward to your answer.

    Kind regards,
    Julian

    Comment


    • #17
      Julian:
      if your code actually was:
      Code:
      xtreg <depvar> c.ReGen##i.period Firmsize, fe
      it does not change if your categorical variable (I mean the same categorical variable) is composed of 2 or n levels; obviously, the coefficients of the model may change if you have n vs 2 levels in the same categorical variable (set aside that the -fe- machinery wipes out everything is time-invariant).
      My guess is that most part of your problem rests on not using -fvvarlist- notation and not sharing what you typed and what Stata gave you back (as per FAQ).

      As far as your second question is concerned, I'm not clear with what you're after; you state you have a three-level categorical variable, but your code (that remains difficul to decipher) reports two dummies.
      Without using Stata standard terminology, your questions are at risk to be ignored.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #18
        Hi Carlo,

        I am sorry for not sharing what Stata gives me. I'll do that now to attempt to make it clearer. I have to write out the models (not Stata code) that I use in my analysis, The model I am concerned with now is about industry, in which that variable is 0 for electric utilities, 1 for oil & gas and 2 for multiline utilities. In Stata I use:

        xtreg beta c.ReGen##i.Industry Firmsize, fe robust

        This gives me the following results:
        Click image for larger version

Name:	Schermafbeelding 2020-04-17 om 15.40.04.png
Views:	1
Size:	71.5 KB
ID:	1547489


        While I think this is correct (thanks to your help!) I still have to write down the model in my thesis. Because fixed-effect models wipes out the industry variables, I noticed this model was the same as :
        Click image for larger version

Name:	Schermafbeelding 2020-04-17 om 15.40.35.png
Views:	1
Size:	57.8 KB
ID:	1547490


        in which rog is : regen*oil &gas dummy, and rem: regen*multiline utility and the electric utility is incorporated in the 'normal' regen variable. This brought me to think that when I have to write out the model, I have to write down:

        beta = b0 + b1ReGen + b2ReGen*OilGasdummy + b3ReGen*Multilinedummy + b4Firmsize + error.
        This also correctly conveys that there are multiple coefficients (b2 and b3) for the interaction between regen and the industry.
        If I write the model down as:
        beta = b0 + b1ReGen + b2Regen*Industry + b3Firmsize + error, I don't show that there are multiple coefficients for the interaction between ReGen*Industry (because I only show b2 as an interaction).

        My second question is in regard to the hypothesis I try to examine:
        The positive effects of renewable energy generation are more pronounced in recent years.

        In this hypothesis I am interested in the ReGen*Period interaction, and I am in doubt if I need to include the 'normal' Period variable or not, according to my hypothesis. so whether I need to examine (not code but the model that I am examining):

        beta = b0 + b1ReGen + b2ReGen*Period + b3Firmsize + error
        or:
        beta = b0 + b1ReGen + b2Period + b3ReGen*Period + b4Firmsize + error

        The code you helped me with automatically uses the second model, but I am not sure thats right for my hypothesis, as my supervisor is very strict in that I examine exactly what I say in my hypothesis. I hope I made it clearer now. I look forward to your answer!

        Kind regards,
        Julian
        Last edited by Julian Neijzen; 17 Apr 2020, 07:44.

        Comment


        • #19
          Julian:
          1) I would stick with your fist code. The fact that -fe- machinery, as expected, wipes out time-invariant regressors is absoultely acceptable, whereas creating interaction by hand trying to avoid what is excpected sounds as methodologically weak. That said, if you should go -fe- but are interested in estimatiog the coefficients of time-invariant predictors, you may want to consider the community-contributd programme -mundlak-.
          Besides, your within R-sq is pretty low; it calls for checking possible model misspecification (by the way, most of your coefficients show quite wide confidence intervals).
          2) beta = b0 + b1ReGen + b2Period + b3ReGen*Period + b4Firmsize + error is the way to go, as your other code arbitrarily includes only one of the conditional main effect (Regen).
          In their current version, though, given the Prob>F values, your regression models are not more informative than the panel-wise average of your regressands.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X