Announcement

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

  • Time series data, using a moderator and counted variable

    Hi all!

    Currently I am focusing on my research about invisible diversity. Therefore, I collected data for about 200 firms for 10 different years consisting of one constant moderator (same for all the 10 years), one counted variable (which is the dependent variable) and one independent variable.
    My counted variable is the innovation performance of the firm per year.

    Since I have just recently started working with stata is my knowledge still lacking behind, so I was wondering whether you could help me with the type of command I need to use. Since it is the combination of so many different elements I get confused all the time.

    My ideal analysis is the following: I want to check whether the change in the independent variable (which fluctuates per year) has an influence on the counted variable (which fluctuates per year as well). This relationship is influenced by my moderator (which is a constant variable over all the years (so the same number in year 2008 as in 2017)).

    My database consists of the years 2008 till 2018 (each consisting of a measure for the dependent, independent and moderator variable (in which the moderator is consistent)).

    It would be a great help if someone could help me with some guidance!! Thanking you all in advance for taking the time to read this!

  • #2
    Okay, so I figured out that I have to command a nbreg to get a negative binomial regression analysis and that I can add the moderator by coupling my independent variables via dep.var##dep.var

    However, I still do not know how to integrate this all into one single time series data analysis. Since I do know how to individually do the nbreg and how to create the moderator within that analysis, does someone know how I can integrate these elements into one single analysis? I really want to check the changes over time per year and have that in one graph.

    Thanking you in advance.

    Comment


    • #3
      You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

      It looks like you have panel data - see the panel data documentation that comes with Stata. That is, you have multiple years for multiple firms. You need to have your data in long form if it is not already in long form.

      Panel data automatically makes me think about the xt set of estimators. As I understand it you want to let the parameter on your iv vary by firm. If so, you might consider
      xtset firm year
      xtpoisson y i.firm#iv iv,fe

      See Hausman to compare fixed and random effects.

      With count data, xtnbreg and xtpoisson are the most common approaches. If you search for them on this listserve, you'll see several commentators recommend xtpoisson. If you search this listserve, you can see their arguments.

      Comment

      Working...
      X