Announcement

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

  • A dependent variable that is restricted within a bound.

    Hi,
    I am using panel data with several count variables.
    Is it possible to look at the effect of one count variable on another count variable, but only within a certain time of the first count variable changing. e.g. if the independent count variable changes from 0 to 1 how does this affect the dependent variable, within a 3 year window.

    I am investigating the retaliation impacts of an SPS measure change i.e. if one country implements a measure, will the corresponding country retaliate with a measure:

    SPSi j t = b0 + b1SPSj i t + ... (where i and j represent different countries)

    So far i have been using a poisson fixed effects model but I would like to implement the time restrictions mentioned above, i.e. look at the effect of a change in main independent variables on my dependent variable, but only within a 3 year window of each respective change occurring.
    Is this possible? How would I go about this?

    Any help would be appreciated.
    Regards,
    Anthony

  • #2
    You didn't get a quick answer. 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. Knowing exactly what you ran would help us suggest how you can run it differently.

    I assume you've xtset your data. If so, you can either lead the dv (F.SPSI) or lag the rhs variable (L.SPSJ). You can simply put an if after the estimator. But what is not clear is your three year window. That suggests you're using a different dv (t to t+2 or something). Again, you can calculate this easily and then put it in as a dv.

    Comment


    • #3
      Thanks for the reply.

      The regression I am running is as follows:

      Code:
       xtpoisson Reverse_PC Count_PC Count_CA Reverse_ADP Reverse_QC Reverse_NTM_PC Reverse_CV,fe
      Reverse_PC represents an SPS measure placed on country j by i
      Count_PC represents an SPS measure placed by country i on j

      At the moment when i run the regression like this, it is looking at whether a change in Count_PC will lead to a change in Reverse_PC. However, it is the case that some measures in Count_PC are implemented, and run for a long period of time. e.g. a Count_PC measure may last 10 years, and if the Reverse_PC measure changes in the 8th year of those 10 years, this regression will consider that as a correlated/causal. I would only like to consider changes of Count_PC on Reverse_PC within a certain time period (e.g. 3 years) i.e. even if the Count_PC measure changes from 0 to 1 and stays that way for 10 years, i only want to record the impact of that change on the other variable within a 3 years window of the initial change occurring.

      Hope this makes sense.
      Regards,
      Anthony


      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input byte(Reverse_PC Count_PC Count_CA) int Reverse_ADP byte(Reverse_QC Reverse_NTM_PC Reverse_CV)
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 2 0 0 0
      0 0 0 2 0 0 0
      0 0 0 2 0 0 0
      0 0 0 2 0 0 0
      0 0 0 1 0 0 0
      0 0 0 1 0 0 0
      0 0 0 3 0 0 0
      0 0 0 3 0 0 0
      0 0 0 2 0 0 0
      0 0 0 2 0 0 0
      0 0 0 2 1 0 0
      0 0 0 2 1 0 0
      0 0 0 2 0 0 0
      0 0 0 1 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 1 0 0 0 0 0
      0 1 0 0 0 0 0
      0 1 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      1 0 0 0 0 0 0
      2 0 0 0 0 0 0
      2 0 0 0 0 0 0
      2 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      1 0 0 1 0 0 0
      1 0 0 1 0 0 0
      1 0 0 1 0 0 0
      0 0 0 2 0 0 0
      0 0 0 1 0 0 0
      0 0 0 1 0 0 0
      0 0 0 1 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      1 0 0 0 0 0 0
      1 0 0 0 0 0 0
      1 0 0 0 0 0 0
      1 0 0 0 0 0 0
      1 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      0 0 0 0 0 0 0
      1 0 0 0 0 0 0
      1 0 0 0 0 0 0
      0 0 0 0 0 0 0
      end
      edit: i have 11,000 observations, in this data sample there are very few non 0 values for some variables, throughout the actual dataset they do contain more values greater than 0.
      Last edited by Anthony ODowd; 04 Oct 2019, 08:02.

      Comment

      Working...
      X