Announcement

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

  • Factor variables and time-series operators error

    Hi,

    I have a firm level data and I am estimating an investment function using dynamic panel data and GMM methods.One of my explanatory variables is cashflow (which enters contemporaneously and with two lags). To test the hypothesis that cash flow sensitivity of investment differs between large and small firms, I am interacting cashflow with a dummy variable size, which takes value 1 if a firm is large and 0 otherwise. I want to interact size with all the lags of cashflow as well. I am using the code:

    xi: regress investment l.investment i.size.l(0/2).cashflow i.time, vce(cluster code)


    But this generates the following error:
    factor variables and time-series operators not allowed
    r(101);


    Any suggestions how I can proceed? I can of course manually define lags of cashflow as different variables and interact those with size, but I was hoping for a more efficient way of doing this.




  • #2
    I think you need i.size##l(0/2).cashflow. Also, if cashflow is a continuous variable you need to make that explicit when you include it in an interaction term. So it would then be: i.size##cl(0/2).cashflow

    Comment


    • #3
      Thanks Clyde,

      cashflow is indeed a continuous variable.

      I tried:

      xi: regress investment l.investment i.listed##cl(0/2).d_s l2.error i.listed##cl(0/2).cashflow i.time, vce(cluster code)

      and

      xi: regress investment l.investment i.listed##l(0/2).d_s l2.error i.listed##l(0/2).cashflow i.time, vce(cluster code)



      But get the error: interactions not allowed r(101);

      Comment


      • #4
        Get rid of the xi prefix.

        Best
        Daniel

        Comment


        • #5
          Thank you!

          Comment

          Working...
          X