Announcement

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

  • Which method to use with panel data?

    Hi everyone,

    I need to analyze the change of company score over time. So I have a dependant variable (company score) and I want to know whether it increases or decreases over time. Whoch method/regression to use? 🙏

    As control variables I have country, nr of employees, industry and company size.

    I would really appreciate an answer, because I need it for a project!
    Last edited by sladmin; 29 Sep 2023, 05:25. Reason: anonymize original poster

  • #2
    if that's all you need, just take the ratio of that last period to the first period for each company.

    Comment


    • #3
      Originally posted by George Ford View Post
      if that's all you need, just take the ratio of that last period to the first period for each company.
      What type of regression should I use? Thanks

      Comment


      • #4
        you don't need a regression to determine whether a score has gone up or down. that's just a computation.

        what exactly is your hypothesis?

        Comment


        • #5
          Is for a research project so I need a more sophisticated approach.

          So the dependant variable is esg score. I have multiple comapnies amd two countries.

          There is a regulation implemented from 2017 in one country which might impact the esg score of companies in that country. Hence, I want to see how this esg score changed during 2013-2016; and 2017-2022. And then I want to compute the same for the companies of the other country that is not affected by the regulation.

          So my hypothesis is: The esg score of companies in the country affected by the regulation will have an increasing trend post regulation (2017-2022). Thanks!

          Comment


          • #6
            An increasing trend or a higher mean ESG score?

            Comment


            • #7
              Yes a higher mean esg score

              Comment


              • #8
                Here's a rough sketch:

                Code:
                ssc install reghdfe  //if you don't have it.  makes life easier.
                
                g post = year>=2017
                g treated = country == "treatedcountryname"
                g lemployees = ln(employees)
                g lcompanysize = ln(companysize)
                
                reghdfe esg_score c.treated#c.post lemployees lcompanysize , absorb(country year industry) cluster(country industry)
                I suspect employees and company size are highly correlated, so you probably can get by with one or the other.

                The coefficient on c.treated#c.post is your treatment effect.

                This is a guess based on what you have said. You can't cluster on country alone because there's only 2. I suspect you have enough if you cluster on both country and industry (you need at least 10 or so, but more is better). In the results, you'll see at the bottom how many clusters you have.






                Comment


                • #9
                  Thank you! I got these results.

                  This means that the mean esg score for the treated country's companies post regulation decreases for 0.188 as one year goes by?

                  And is there a way to depict in graphs the trend (the change of mean esg scores) for each country over the years? I thought of using panelvar but I am not sure.

                  And the p-value is quite high..

                  Thanks a lot again and really appreciated!
                  Attached Files
                  Last edited by sladmin; 29 Sep 2023, 05:25. Reason: anonymize original poster

                  Comment


                  • #10
                    A trend is not the same as a means difference. Here, you are comparing the mean ESG scores across two time periods between two groups.

                    Mean ESG scores did not rise more for the treated than the untreated. In fact, the ESG score is slightly lower for the companies in the treated group after the treatment, but the t-stat is tiny so you've basically got no difference. The model explains nothing outside the fixed effects, as all your probability levels are >0.10. If employees and size are correlated, you might get significance if you drop one.

                    If you want the trend, then you need to estimate a coefficient on the trend. You've got four trends--before treatment controls, after treatment controls, before treatment treated, and after treatment treated.

                    This may work but I'm not exactly sure it's the right way to do it. You may need to drop year from absorb.

                    Code:
                    g lesg_score = ln(esg_score) 
                     reghdfe lesg_score year c.treated#c.year c.treated#c.post#c.year c.post#c.year lcompanysize , absorb(country year industry) cluster(country industry)
                    Also do this just as a check:

                    Code:
                    tabstat esg_score if ~post, by(treated)
                    tabstat esg_score if post, by(treated)
                    To crudely see if there's any there there.

                    I suspect there are lots of papers using ESG scores as the dependent variable. I'd look at those.

                    Comment


                    • #11
                      Unfortunately there are not many papers or not at all that take esg score as dependent variable. There is one paper that tests basically the same thing and uses difference in deifference approach but that paper has two group of countries and not only two countries, so in my case diff-in-diff does not make sense because there might be spillover effects.

                      What would be the best way to test if the mean of esg scores increases after 2017? Separately for each country.

                      Comment


                      • #12
                        Code:
                        reg esg_score post if ~treated
                        reg esg_score post if treated
                        
                        areg esg_score post if ~treated , absorb(industry)
                        areg esg_score post if treated , absorb(industry)

                        Comment


                        • #13
                          This is the diff-in-difference approach, correct? Why are there 4 regressions?

                          Comment


                          • #14
                            reghdfe is straight up DID.

                            The first two regressions are simply separating it out by country to tell you how they changed. The DID estimator can be computed, but hypothesis testing is straightforward with the reghdfe model.

                            the second set of regressions is similar but includes an industry fixed effect.

                            try this.

                            Code:
                            preserve
                            collapse (mean) sdq_score  , by(industry post treated)
                            * you'll have 60 observations in each period.
                            reg sdq_score c.treated#c.post post treated
                            restore
                            or

                            Code:
                            preserve
                            collapse (mean) sdq_score  [aw=companysize], by(industry post treated)
                            reg sdq_score c.treated#c.post post treated
                            restore
                            The latter weights the sdq_score by company size when computing the mean.

                            Comment


                            • #15
                              Can we say something about this? Is it statistically significant? This is basically the DID approach from your earlier recommendation, I just filtered the data. Thanks a lot!
                              Click image for larger version

Name:	DIDresults.png
Views:	1
Size:	30.3 KB
ID:	1720436

                              Comment

                              Working...
                              X