Dear All, this is my first post here. Excuse me for doing anything wrong. I have a question I cannot find a solution for, even though I hope it is not too complicated.
I have panel data that is in a wide format containing individual survey responses over nine different waves. For some of my analyses, I need the panel data to be in a long format. To be able to reshape the data, however, I must have a variable representing the different waves, ie the time dimension. I know how to reshape the data, and create the ID-variable but I am not sure how to create the time-variable.
For now, the data includes nine different variables with the participants of each wave. It also includes nine variables with the start date of the survey and nine variables with the end date of the survey. Are these variables sufficient if I want to create a variable constituting the time component of my panel data in a long format? And how should I proceed with reshaping this?
Thanks in advance. If this were unclear, feel free to ask any questions.
//Tim
Related Posts with Generate time-variable for panel data in long format
using foreeach loop for doing repeating worki want to save observations in different files on the basis of values of variable order. i have lots…
Returns of different companiesHello, I am new in Stata. I have stock price data of many companies. I would like to get the return…
Changing yes/no observations into 1/0I have a list of variables that contain answers Yes and No, I am trying to replace them with 1 and 0…
How to create a variable for the nth observation using datesHello! I have a long dataset with dates corresponding to visits (variable name "date"). Each person…
confirm numeric format returns error code 111I'm wanting to use confirm numeric format to check that a user-entered format is valid, but when the…
Subscribe to:
Post Comments (Atom)
0 Response to Generate time-variable for panel data in long format
Post a Comment