Hello,
this is a follow-up to this older thread: https://www.statalist.org/forums/for...sis-panel-data
Let me quickly describe my data. Since it's mostly confidential, I cannot provide any examples.
I have firm-level and industry-level data at an annual frequency from 1999 to 2019. My hypothesis is that business sentiment determines firm debt via investment. I.e. if sentiment is more positive, firms invest more and hence take in more debt. Hence I have the following setup:
Treatment variable: sentiment, this is at industry level
Mediator variable: investment, this is at firm level
Outcome variable: debt growth, this is at firm level
The first possible problem is that the treatment is at group level. How problematic is this? In the R mediation package, this can be explicitly considered. In Stata's mediate it cannot - unless I oversaw it.
The second possible problem is that my firm panel is unbalanced. The industry-level data is there every year, the firm data is not. Will this be a problem in mediation analysis?
The third and biggest problem is that it is panel data. Back in the old thread, Clyde Schechter wrote:
(highlighted by me)
So the highlighted part means in my specific case: if a firm increases its investment (within effect) and hence increases its debt (within effect), this can be because it became more optimistic compared to last year (within effect) or compared to another firm (between effect), right?
Now I'm in the fortunate position that any cross-sectional effects are of no interest to me anyway. One could, of course, argue that a pure cross-sectional regression also reveals the true causal effect (given it is there): a firm that is more optimistic at any given point in time should invest more than its less optimistic peer. However, any positive relationship one might find could be biased due to structural differences between firms and/or industries. So the prudent course of action seems to be to rely only on the longitudinal variance for inference.
What I ultimately would like to know, again following Clyde Schechter's remarks, is:
If I simply deduct its own panel mean from each variable (*) and then put that into the mediate command in Stata, is that an appropriate application?
(*) Which is nothing else than "manually" doing what xtreg with panel FE would do "behind the scenes". I have to set up my regression dataset this way and then run reg rather than xtreg, anyway, because as I've said some of my data is industry level and some is firm level and the firm data is unbalanced. Hence, xtreg computes different means for the same variable for different firms which are not observed during the same time periods.
this is a follow-up to this older thread: https://www.statalist.org/forums/for...sis-panel-data
Let me quickly describe my data. Since it's mostly confidential, I cannot provide any examples.
I have firm-level and industry-level data at an annual frequency from 1999 to 2019. My hypothesis is that business sentiment determines firm debt via investment. I.e. if sentiment is more positive, firms invest more and hence take in more debt. Hence I have the following setup:
Treatment variable: sentiment, this is at industry level
Mediator variable: investment, this is at firm level
Outcome variable: debt growth, this is at firm level
The first possible problem is that the treatment is at group level. How problematic is this? In the R mediation package, this can be explicitly considered. In Stata's mediate it cannot - unless I oversaw it.
The second possible problem is that my firm panel is unbalanced. The industry-level data is there every year, the firm data is not. Will this be a problem in mediation analysis?
The third and biggest problem is that it is panel data. Back in the old thread, Clyde Schechter wrote:
Originally posted by Clyde Schechter
View Post
So the highlighted part means in my specific case: if a firm increases its investment (within effect) and hence increases its debt (within effect), this can be because it became more optimistic compared to last year (within effect) or compared to another firm (between effect), right?
Now I'm in the fortunate position that any cross-sectional effects are of no interest to me anyway. One could, of course, argue that a pure cross-sectional regression also reveals the true causal effect (given it is there): a firm that is more optimistic at any given point in time should invest more than its less optimistic peer. However, any positive relationship one might find could be biased due to structural differences between firms and/or industries. So the prudent course of action seems to be to rely only on the longitudinal variance for inference.
What I ultimately would like to know, again following Clyde Schechter's remarks, is:
Originally posted by Clyde Schechter
View Post
(*) Which is nothing else than "manually" doing what xtreg with panel FE would do "behind the scenes". I have to set up my regression dataset this way and then run reg rather than xtreg, anyway, because as I've said some of my data is industry level and some is firm level and the firm data is unbalanced. Hence, xtreg computes different means for the same variable for different firms which are not observed during the same time periods.