Unanswered: select a cohort based on a frequency distribution
Hi there - *using DB2 9.7* I am selecting patients from a medical database for asthma and medication A. I take their age at diagnosis and want to control for this. Given that I have the ages of all these people at first diagnosis, I have a frequency distribution. I would like to select a cohort 4 times as large from the same medical database who have asthma, but are not given medication A and I want the cohort to match the frequency distribution of age at first diagnosis of those who do take medication A:
-->Cohort A (taking medicaton A)
with certain freq dist for Age_Diag
-->Cohort B (not taking medication and 4 times as many people)
with same freq dist on Age_Diag as Cohort A.
The only way (and primitive way) is to find out how many people are in each age band (say 0-10,11-20.....) then multiply this number by 4 for each band m, then select the first (can you take a random sample) m people from the database who have asthma but do not take the meds. Do this for each age band.
You can see that this will take me a long time, and i want to extend this to many other areas of medicine.
At least to my understanding I feel I have explained to problem, what data is available to me and the method I am using to tackle the problem. If there is anything which needs further explaining to supplement and understanding to the problem via forum members questions, I'm more than happy to elaborate on my post.