Announcement

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

  • Code for regrression

    CODE]reghdfe tariff c.emissions##i.year a(industry) cluster(industry)[/CODE]
    Code:
    reghdfe tariff c.emissions##i.year i.industry a(industry)  cluster(industry)
    Hi everyone,
    Thanks for providing help time to time. I have panel data for tariff emissions and industry. I am trying to regress tariff on emissions with interaction term and year fixed effects in the first code and then included industry fixed effects in the second one.

    1. I want the regression table to have a coefficient for each year(example: 2010-2015) which would sum up the coefficients value of i.year, emissions and interaction term for a particular year. This way I get a coefficient summing up the whole effect for each year.

    2. Is there a different code to get a regressregressionthat looks like those in reserach papers other than outreg2

    Thanking you

  • #2
    I want the regression table to have a coefficient for each year(example: 2010-2015) which would sum up the coefficients value of i.year, emissions and interaction term for a particular year.
    I don't understand what you want here. If you mean actually adding up _b[emissions] + _b[emissions#y.year] + _b[year] you will be calculating a meaningless number. While adding the coefficient of emissions and the interaction term makes sense to get a year y-specific effect of emissions on tariff, adding _b[year] to that is inappropriate--they aren't even the same units. The first two of those terms have units of tariff/emissions, but _b[year] just has units of tariff.

    Is there a different code to get a regressregressionthat looks like those in reserach papers other than outreg2
    -help etable-

    As an aside, the code you show in #1 cannot be the code you are running because it contains a syntax error. In this particular instance, that doesn't impair the ability to respond to your questions. But, in general, it is usually important to show the exact code you are actually using. The best way to do that is by copy/pasting from your do-file or the Results window directly into the Forum editor--that minimizes the risk of getting it wrong.

    Comment


    • #3
      Thank you your advice is of great help.

      Comment


      • #4
        Maybe something like this:

        Code:
        webuse nlswork , clear
        reghdfe ln_wage c.age##i.year , absorb(idcode)
        margins, dydx(age) over(year)

        Comment


        • #5
          Thankyou George. Do you know any robustness checks I can perform other than linktest ?

          Comment

          Working...
          X