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
outreg2Good morning, I am looking to create a table for logistic regression results, with a title, odds rat…
Automate file names using current dateHi All! I'm trying to create a local string reflecting the current date in the format, "YYYY-MM-DD"…
ANOVA test for clusteringHi, I want to check whether there is a need to cluster my results. I am doing a panel regression re…
Major change in coefficient when adding a squared variable in fixed effects model. Interpretation?When I use the xtreg command with fixed effects to look at the correlation between use of marijuana …
using tabstat for mean annual procedure volumeGood morning, I have a dataset of companies (ik), case-number, year, procedure-type and quintiles. …
Subscribe to:
Post Comments (Atom)
0 Response to Year Dummies for a duration
Post a Comment