Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Posts
    33

    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)

    Person_no Age_Diag

    with certain freq dist for Age_Diag

    -->Cohort B (not taking medication and 4 times as many people)

    Person_no Age_diag

    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.

    Can someone point me in the right direction here?
    Last edited by brucezepplin; 11-28-12 at 10:42.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5

  3. #3
    Join Date
    Jul 2011
    Posts
    33
    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.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Reread the link I provided. Pay special attention to number 1.

    Andy

  5. #5
    Join Date
    Jul 2011
    Posts
    33
    Thanks Andy - have edited my original post with the version of DB2 I am using - 9.7.

    Is it worth me putting my version number into a signature?

    Arron.

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •