Announcement

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

  • Mediation analysis with panel data

    Hello everyone,

    I'm very new to econometrics and Stata. I need to conduct a mediation analysis with panel data. Specifically, I do have a sample of 1068 firms over 10 years (2012-2021). However, I have a big issue: the mediation variable is time-invariant because I have only data for one year (2020). For this reason, I'm thinking to reduce the time period of my study (maybe only 3 years: 2018-2020), supposing that the mediator doesn't change over the selected period. I'm using xtreg and carrying out two different regressions: one on the mediator variable, the other one on the response variable, including the if option of time. That is the code that I'm using:

    Regression on the mediator variable (i.e., fsi_mean_comp);
    xtreg fsi_mean_comp Capital_exp Capital_str Firm_profitab unc Firm_size CEO_cd CSR_committee gdp_percapita free_press perc_corptax indep_board eco_free belong_EU industriadummy1 euzonedummy1 leveragefin1 if Year>=2018

    Regression on the response variable (i.e., ESG):
    xtreg ESG unc fsi_mean_comp Capital_exp Capital_str Firm_profitab Firm_size CEO_cd CSR_committee gdp_percapita free_press perc_corptax indep_board eco_free belong_EU industriadummy1 euzonedummy1 leveragefin1 if Year>=2018

    Just to be clear as much as possible. I'm testing x--->z--->y where x is "unc" (independent variable), z is "fsi_mean_comp" (mediator variable) and y is "ESG" (response variable). All other variables are control variables.

    However, the results of the first regression are pretty weird (see image "xtreg on mediatore"). While you can have a look to the results of the second regression on the response variable in the image "xtreg on sustainability". Could anyone help me to understand how I can bypass the problem of the time-invariance of the mediator?

    Thank you so much!
    Cristina



    Attached Files
Working...
X