Hello,
I have two different datasets, in the first one i have a ID identifier for each person and the date of birth ( i used the command date). Then, i have a second dataset in which each observation is a different day for different air pollution variables (CO, PM10 etc). What i want to do is to assign for each ID in my first dataset the mean of the air pollution variable for the 30 days before the date of birth.
I hope someone can help me out with this one, and any type of information on how i could procede it would be very helpful.
Thanks for the time!
Sebastian