Announcement

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

  • Regression with multiple dummies variable

    Hi everyone,

    I was wondering if someone could help me resolving this problem :

    I want to regress word export variation between two year (Var) on exporter, importer and industry dummies to capture the exporter, importer, and industy specific effect on world trade variation. I have encoded each of my three variables with encode(): exporter (141 countries), importer (233 countries),industry (5498 products), and I have extended the number of variable by default with STATA/SE with set maxvar. Then I ran the following regression concidering my dummies as categorical variables as follow :

    reg var i.exporter i.importer i.industry

    Unfortunatelly stata runs but is not able to complete the process (I mean I have to break the process manually with the red cross). However, when I run the following regression, it works :

    reg var i.exporter i.importer

    So I guess that I have too many variable in my regression.

    My first request is : do you have another way to estimate these effects ?

    Secondly, I am not interested in the effect of each dummy variable (exporter1 exporter2 importer1 importer2 industry1 industry2...) but in the three overall exporter effect, importer effect, industry effect. Is there a way to compute each exporter dummy effect in an overall expoter effect, each importer dummy effect in an overall importer effect, etc. ?



    Thank you for your answer !

    Best,

    Raphaël




  • #2
    Unfortunatelly stata runs but is not able to complete the process (I mean I have to break the process manually with the red cross).
    I don't know what you mean by that. It sounds like you're just too impatient to let the process go to completion. If I remember correctly, the time required for a regression goes up as the cube of the number of regressors. Even if its only the square or the 3/2 power, with an enormous number of industries this is going to be slow. But even if it ran quickly, it sounds like the output regression table would go on for pages and pages, and most of that would be output that you aren't even interested in, namely, industry effects.

    So I suggest you try using
    Code:
    xtset industry
    xtreg var i.exporter i.importer, fe
    This will be equivalent from a modeling perspective and will get around both the time issue and the massive amount of irrelevant output.

    Comment


    • #3
      Dear Clyde,

      Thank you for your quick answer.

      My concern with xtreg is that, as mentioned in my previous post, I am interested in having the three fixed effect coefficient : exporter, importer, but also industry. If I run this regression I have only the fixed effects coefficients only for exporter and importer.

      Click image for larger version

Name:	Capture d’écran 2022-01-13 201732.png
Views:	1
Size:	11.4 KB
ID:	1645017


      Would you know a specification that could give me the coefficient of all the three fixed effect ?

      Thank you again for your time,

      Comment


      • #4
        Oh, I misread what you wrote in #1. I thought you were interested only in the separate effects for each exporter and importer, but not for industry.

        I don't understand the output you are showing in #3. The variables there are reporter and partner. But in #1 you are talking about importer, exporter and industry variables.

        Going back to those original variables, and saying that you don't care about the levels of any of them, just an overall effect for importer as a whole, exporter as a whole, and industry as a whole sounds like an old-fashioned ANOVA style partitioning of total variance. Now unless the data set is balanced, the proportion of variance attributable to each of these concepts will depend on the order in which they are introduced into the model. Most people prefer to report the proportion when entered last. So you could do something like this:
        Code:
        anova var exporter importer industry
        anova var exporter importer
        anova var exporter industry
        anova var importer industry
        The difference in R2 between each of the last three models and the first one is an estimate of the proportion of variance attributable to the omitted variable.

        Is that what you're looking for?

        Comment


        • #5
          Thank you very much Clyde, as you said I have a few caveat to use ANOVA, as my result will depend on the order in which each effect are introduced.... . To be quite honest, and to go straight to the point, I am trying to replicate a methode in a paper that precisely underline weakness of ANOVA like method... wp05-23.pdf (cepii.fr) (p.16 and 17 equation (2) and (3)°. But I would understand if don't want spend time to have a look on this method :-).
          Thank you for all !

          Comment


          • #6
            Well, I'm curious to see what you are trying to do, and if possible, I would help out. I have the time, but I do not know this website cepii.fr, and my browser warns me that it is not secure. Can you copy/paste here an excerpt of that paper showing the equations and as much text as needed to explain the variables used in the equations?

            Comment


            • #7
              And if I attach it ? Did you receive it ?
              Attached Files

              Comment


              • #8
                Sorry, but I don't do downloads from people I don't know.

                Comment


                • #9
                  Sorry for the delay, it was night in France..
                  I understand your point of view. See bellow screen shots of the paper (p.16 and 17 in particular equation (2) and (3)). (You will find the full version of this paper taping the following titlle in your google bar : "World Trade Competitiveness: A Disaggregated View by Shift-Share Analysis"
                  Thank you again for your effort !

                  Click image for larger version

Name:	1.png
Views:	2
Size:	173.1 KB
ID:	1645070
                  Click image for larger version

Name:	3.png
Views:	2
Size:	106.8 KB
ID:	1645072



                  Click image for larger version

Name:	2.png
Views:	2
Size:	207.6 KB
ID:	1645071

                  Comment


                  • #10
                    Sorry, pages have been mixed up when my post have been up loaded... . I try to do it again
                    Click image for larger version

Name:	1.png
Views:	2
Size:	173.1 KB
ID:	1645074
                    Click image for larger version

Name:	2.png
Views:	2
Size:	207.6 KB
ID:	1645075
                    Click image for larger version

Name:	3.png
Views:	2
Size:	106.8 KB
ID:	1645076

                    Comment


                    • #11
                      Thanks for posting that. I don't understand what the writer means by "normalized." And I'm not following the large number of subscripts and superscripts flying around here. There's also a lot of economics jargon (e.g. "sectoral structural effects") that obscures my comprehension. So I'm going to bow out of this. I think it will take more time than I can reasonably devote to this to figure it out. Sorry I can't be of more help here. I hope that somebody else who has been following along will recognize these equations and based on familiarity be able to quickly provide you with a solution.

                      Comment


                      • #12
                        No worry at all Clyde. Just e.g "sectoral structural effects" can be translated in econometric jargon as industry fixed effect. Thank you again for the time you spent on this post and your effort.
                        Best

                        Comment

                        Working...
                        X