Hi all,
I have a panel dataset where i'm trying to create a variable that lists the month and year in which a given event first occured, however i'm struggling with the format of the date variables. I have variables for each individual wave of data collection that specify the month (iintdatmw*) and year (iintdatyw*) data was collected.
idauniq iintdatmw1 iintdatyw1 iintdatmw2 iintdatyw2
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
I have the data in long format so there are 9 observations for each wave of study, shown for id 100035 above. The data shows that in w1 this person was interviewed 10/2002 and in w2 interviewed 2/2005 – is there a way to create variables that would give the month and year also in long form? I have ~12000 obs in this dataset and have been wracking my brain over finding a solution, any help would be appreciated!
Many thanks,
Robyn
I have a panel dataset where i'm trying to create a variable that lists the month and year in which a given event first occured, however i'm struggling with the format of the date variables. I have variables for each individual wave of data collection that specify the month (iintdatmw*) and year (iintdatyw*) data was collected.
idauniq iintdatmw1 iintdatyw1 iintdatmw2 iintdatyw2
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
100035 10 2002 2 2005
I have the data in long format so there are 9 observations for each wave of study, shown for id 100035 above. The data shows that in w1 this person was interviewed 10/2002 and in w2 interviewed 2/2005 – is there a way to create variables that would give the month and year also in long form? I have ~12000 obs in this dataset and have been wracking my brain over finding a solution, any help would be appreciated!
Many thanks,
Robyn
Comment