This is my first post, I hope I express myself and my question in an understandable manner.
I have panel data on all countries (variable name: country) and on their respective oil discoveries from 1868 to 2014 (variable name: year). I created a dummy variable that takes the value 1 if in a given year and country oil was discovered, and is 0 otherwise (discovery_dummy).
Now I want to create a dummy variable that takes value 1, if in the 10 years prior to the oil discovery, another oil discovery occurred in the same country.
Is there a code that allows generating a dummy that indicates whether in the same country in which oil was discovered, 10 years prior to the oil discovery, oil had already been discovered? This code would have to somehow flexible apply the ten year period to the entire year range of 1868-2014 and account for oil discoveries within each country.
Thanks in advance!
Related Posts with Dummy for event in prior ten years
Regarding Interval data (generating more years and duplicating values)Dear, Can anyone help me to manage the data? I have interval data. Since the data are only availabl…
What is the reference for excluding a covariate if there is many missing observation?Normally, I exclude a covariate out of the regression equation if there are many missing observation…
Combining multiple roc curvesHello all, I have used logit for multiple roc curves and am looking for how to put them all on the …
Error after -cem- command (coarsened exact matching)Hi all, Using Stata 17, I am trying to run coarsened exact matching commands (i.e., -cem-) introduc…
Regarding Interval data (generating more years and duplicating values)Dear, Can anyone help me to manage the data? I have interval data. Since the data are only availabl…
Subscribe to:
Post Comments (Atom)
0 Response to Dummy for event in prior ten years
Post a Comment