Hello,
I have data which is as below. ISO_O is the country, StartYear and EndYear are the years of commencement and finish of a political leader's reign. I would like to create a panel type structure and also generate a dummy for the years that the leader was in power.
input str4 ISO_O int(StartYear EndYear) float Duration
"ABW" 2017 2019 3
"ARG" 2007 2015 9
"AUS" 2010 2013 4
"AUT" 2016 2017 2
"AUT" 2004 2004 1
end
[/CODE]
Therefore, for instance, for ABW the dummy would be '1' for years 2017,2018 and 2019 (i.e. 3 years, which is indicated by the duration variable too).
Thanks in advance for your help and insights.
Related Posts with Year Dummies for a duration
Issues related to sample size in gravity modelDear all I'm new here. I'm currently working on gravity model and would be glad if someone could he…
HDFE-PPML. Interacting dyadic fixed effects with the time trendHello, I am currently estimating a standard gravity model to estimate the effect of trade agreements…
Computing conditional probabilities, Pr(success(t) = 1 | success(t-1) = 0), in a panel datasetDear all, I have a panel dataset where individuals are assigned a "success" variable over time. Onc…
Merge panel and time series datasetIn my panel data set i have mdate, decile (identity), and return variable. In my time series dataset…
Scatter Plot and normalizing variables (logs)Hi, I am dealing with panel data analysis (fixed effects with robust standard errors). The data has…
Subscribe to:
Post Comments (Atom)
0 Response to Year Dummies for a duration
Post a Comment