Dear statalist community,
I am conducting an analysis on green tariffs and renewable rebounds. Precisely, I want to understand whether households that switched to a green tariff tend to consume more electricity than people who use grey energy.
The dataset that I am using is the German Socio-Economic Panel.
What I want to do is to set the year of the switch as the reference year for each household. So, for example, household 1 switched to a green tariff in 2012. Therefore, 2012 = 0, 2013 = 1, 2014 = 2 and 2011 = -1, 2020 = -2. On the other hand, household 2 switched to a green tariff in 2013. So, 2013 = 0, 2014 = 1, 2015 = 2, and 2012 = -1.
How can I do this on Stata?
There is anyone who is able to help me?
Thank you very much!
Related Posts with Panel: setting one year as the reference year.
Graph: Large gap between xlabel and legendHi I am trying to make a graph similar to this one: Code: sysuse auto, clear gen xvar = _n keep if…
Error in expressionHello, I am created a local variable `tif' which loops over around 45 terms (string). local tif "0…
Program rclass, "invalid name" returnsHi all, I am hoping someone can help me. I am trying to simulate data with autocorrelation. When I e…
Problem with multiple id on a panel dataHi, I'm working with bonds of many companies between 2010 and 2020 quarterly. Every bond is unique, …
net reclassification index (NRI) and integrated discrimination index (IDI)*computing confidence intervalsHi All, I am having difficulties obtaining 95% CI's from the NRI and IDI command in stata. I have p…
Subscribe to:
Post Comments (Atom)
0 Response to Panel: setting one year as the reference year.
Post a Comment