Announcement

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

  • Dummy for two types of countries

    Hello,
    I have a panel dataset that consists of countries and firms for each county. I want to test the effect of Firm Growth, Asset Tangibility, Profitability and Liquidity on Leverage ratio.
    I want to see the effect of these variables and check whether they differ from developing to developed countries.

    I tried to do interaction terms of each variable and the group they belonged to, after grouping countries by their GDP (in Developed and Developing), but literature suggests I generate dummies rather than use interaction terms to distinguish between the results of these two groups of countries.

    My initial regression was:
    xtreg LEVERAGE c.l1.LEVERAGE##i.GDP_tv c.GROWTH##i.GDP_tv c.LIQUIDITY##i.GDP_tv c.PROFITABILITY##i.GDP_tv c.ASSETTANGIBILITY##i.GDP_tv i.Country_new, re cluster(Firm_new)

    Could anyone help me with how to interpret the regression with dummies now? I generated dummies as such:
    gen Countrydum=0
    replace Countrydum= 1 if GDP>20000 (These are the developed countries)

    My results are as in the attachment file (I am having a hard time with reporting results as suggested in the forum's guidelines, I beg your pardon for that).


    Click image for larger version

Name:	Results with dummy.png
Views:	3
Size:	78.8 KB
ID:	1400658



    Thank you.
    Attached Files
    Last edited by Armand Ndraxi; 06 Jul 2017, 09:55.

  • #2
    I'm not quite sure what you mean by the literature suggesting that you "generate dummies rather than use interaction terms..." A model with just dummy variables for developed versus less developed countries, without interactions, simply says that the effect of being developed does not vary by growth, liquidity etc. On the other hand, the code you show says (a) that you already have a categorical measure for development (i.GDP_tv, which I assume is dichotomous) and (b) you think the coefficient for that variable does vary by liquidity etc, hence the interaction terms. So, to accomplish what you need, just drop the interaction terms. Your code makes it clear that you understand factor variables, so it looks like you may just need to think through the difference in interpretation between models with and without interaction terms.
    Richard T. Campbell
    Emeritus Professor of Biostatistics and Sociology
    University of Illinois at Chicago

    Comment


    • #3
      Hello Richard,

      I see what you mean. Nonetheless, I used the interaction terms to check whether each variable was statistically significant in one group or the other. I am performing a comparative analysis, therefore I need to generate country dummies that distinguish countries in two groups, Developing and developed (I have the regression with interaction terms as a backup plan).

      After generating dummies that set 1 to countries that are developed (by 'if' command) and 0 to countries that are developing, I performed the regression.

      What I want to see if whether my independent variables vary in significance and magnitude from Developing to Developed countries. I seem to be unable to properly approach that, using dummies.

      Comment


      • #4
        Armand:
        Richard gave precious insight.
        In my opinion, you should:
        -make your code more efficient;
        -use -fvvarlist- and forget by hand-created dummies;
        -switch to -xtreg- with -fe- or -re- specification; -xtreg- is the way to go with panel data (event though a pooled OLS can outperform -xtreg-, sometimes);
        - the more interactions you add, the more complex is the dissemination of your results;
        - investigate whether omitted variable bias is going to bias your results.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Carlo,

          I ran the -xtreg, re- regression and the results are attached.

          The thing is that I want to see whether the effect of my independent variables on LEVERAGE changes among the two groups (Developing and Developed). I am having difficulties with interpreting this from my regression results.

          What I typed in was:
          xtreg logLEVERAGE GROWTH LIQUIDITY ASSETTANGIBILITY PROFITABILITY IR INFLATION GDPGROWTH Countrydum i.Country_new i.Year ,re cluster(Firm_new)*

          Do you suggest I go with Interaction terms rather than Dummy variables, or the other way around?


          Thank you.

          P.S I am also including the results of the regression with interaction terms.

          *also added some variables I would test separately (IR INFLATION GDPGROWTH) but decided to test them all together
          Attached Files

          Comment


          • #6
            Armand:
            go with interactions, then, if you feel confident about the explanation/dissemination of your results (by the way, I 'm having hard times in trying to wrap-up what you have typed. Please, use CODE delimiters for posting what you typed and what Stata gave you back. Thanks).
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Hello Carlo,

              I feel, I believe, ok with interactions and with dummies. The issue is that I do not know how to interpret the results of the regression with Dummy.

              More specifically, I generated my dummy through
              generate Countrydum = 0
              replace Countrydum= 1 if GDP>20000

              With that in mind, I do not know how to explain the results. What does the significance of Countrydum in my results imply (in terms of what the effect of the independent variables is on the dependent, and whether this effect changes among the two groups of countries)?

              Thank you.

              Comment


              • #8
                Armand:
                I still can't follow you in creating interactions by hand when -fvvarlist- can do it for you.
                That said, you have a log-linear regression model and the -Countrydum_ coefficient can be explained as follows:
                Code:
                . di exp(-.647483)-1
                -.47663858
                when adjusted for the remaining predictors, switching from Countrydum=0 to Countrydum=1, decreases -logLEVERAGE- by 47.66%.
                Whether this makes sense or not, I cannot say.

                However, in my opinion, the main issue now is getting yourself familiar with the way Stata deals with interactions (via -fvvarlist-).
                You can start off with a simple example, such as:
                Code:
                . sysuse auto.dta
                (1978 Automobile Data)
                . regress price c.mpg##i.foreign, baselevel
                
                      Source |       SS           df       MS      Number of obs   =        74
                -------------+----------------------------------   F(3, 70)        =      9.48
                       Model |   183435281         3  61145093.6   Prob > F        =    0.0000
                    Residual |   451630115        70  6451858.79   R-squared       =    0.2888
                -------------+----------------------------------   Adj R-squared   =    0.2584
                       Total |   635065396        73  8699525.97   Root MSE        =    2540.1
                
                -------------------------------------------------------------------------------
                        price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                --------------+----------------------------------------------------------------
                          mpg |  -329.2551   74.98545    -4.39   0.000    -478.8088   -179.7013
                              |
                      foreign |
                    Domestic  |          0  (base)
                     Foreign  |  -13.58741   2634.664    -0.01   0.996    -5268.258    5241.084
                              |
                foreign#c.mpg |
                     Foreign  |   78.88826   112.4812     0.70   0.485    -145.4485     303.225
                              |
                        _cons |   12600.54   1527.888     8.25   0.000     9553.261    15647.81
                -------------------------------------------------------------------------------
                calculate by hand the predicted values for both domestic and foreign cars and then compare what you have done with the results obtained by -predict-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  I was going to work up an example for you but Rich Williams has a set of notes on this issue which is far more clear and complete than anything I could write. See https://www3.nd.edu/~rwilliam/stats2/l51.pdf/
                  Richard T. Campbell
                  Emeritus Professor of Biostatistics and Sociology
                  University of Illinois at Chicago

                  Comment

                  Working...
                  X