Surely the question has a simple answer, but I'm out of ideas on how to find an answer for the following issue:
I have a long data panel with more than 1000 observations per year, with a dummy variable that explains if a company has been innovating or not, it takes values from 2000 to 2008, and is called "innov1". I have a second variable with the same values but from 2009 to 2012, called "innov2", how can I merge these two variables into a joint variable collecting data from 2000 to 2008? I'm using:
Code:
sort id year xtset id year reshape long innov, i(innov1 innov2) j(year).
Code:
reshape long innov, i(id) j(year)
Code:
variable year already exists Data are already long.
Thank you very much in advance for your help.
0 Response to Reshape panel data variable to create a new merged variable
Post a Comment