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
Related Posts with How to assign different Treatment depending on the date of birth
Generating new variable based on ICD9 code range anywhere in the rowGreetings, A sample data set for my problem is shown below. I am trying to generate few new variabl…
Simple addplot syntax - how do I graph 2 sets of observations on one graph?Hi, Sorry to be that guy, but I can't find any stata help files or forum posts to clear this up. If…
Variables chosen for multiple imputationDear Statalist, I have a question regarding to choosing variables for multiple imputation. For exam…
REGALL: Stata module to run and compare regressionsREGALL: Stata module to run and compare all regressions derived from complete sets of regressors Ab…
Using Loops with tabulationHi there, I never really learned how to use loops, but feel like in this scenario it might be useful…
Subscribe to:
Post Comments (Atom)
0 Response to How to assign different Treatment depending on the date of birth
Post a Comment