Hello,
I am working with two different datasets, one is a survey (dataset 1) that includes a date variable indicting when the respondent was interviewed. The other is a dataset of events that occurred (dataset2), with each event having an associated date.
I would like to create a variable that records the number of events that occurred in the month prior to the individual's interview date. I have created an "interval window" with start and end date in the survey data file (dataset1). And I have read about the ssc command range join. However, I am not sure what variable I can use to actually match the observations across the datasets (what key variable to use). Unlike examples such as those elaborated on here, I dont have a key var similar across both.
I am working with two different datasets, one is a survey (dataset 1) that includes a date variable indicting when the respondent was interviewed. The other is a dataset of events that occurred (dataset2), with each event having an associated date.
I would like to create a variable that records the number of events that occurred in the month prior to the individual's interview date. I have created an "interval window" with start and end date in the survey data file (dataset1). And I have read about the ssc command range join. However, I am not sure what variable I can use to actually match the observations across the datasets (what key variable to use). Unlike examples such as those elaborated on here, I dont have a key var similar across both.
Comment