Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to calculate mid-year population (i.e., as of 1st July)?

    Hi All,
    I am struggling with how to calculate mid-year population (as of 1st July) to calculate crude incidence for some prescription by GPs for each included year (i.e., 1997-2019) in a city. The denominator data contains the list of everyone who visited to GPs between 1997-2019 in that city, and multiple prescriptions possible for same individual. Data are available by date of visit to GP. Now, I need to calculate crude incidence of that prescription for each year. I am struggling to calculate mid-year (as of 1st July) population to use it as denominator as per the study protocol. May request to help me on how to calculate mid-year population?

    Thank you in advance for your help.

  • #2
    The answer would seem utterly dependent on what population data you have, on whether you are just interpolating between populations at known dates, and on whether you have data on births, deaths and migration to apply.

    Comment


    • #3
      Thanks Nick. We have DoB, DoD if happen, and date of visit to GP. So, the denominator population will be anyone who visited to GP and we are ignoring migration etc. Your guidance will be appreciated.

      Comment


      • #4
        I see. That's much easier than I feared but you still need to show (realistic) sample data with variable names to get a definitive answer. See https://www.stata-journal.com/sjpdf....iclenum=dm0042 for a survey of how to count distinct values. Given identifier variable and a year variable then

        Code:
        egen tag = tag(id year)
        egen patients = total(tag), by(year)
        indicates one way forward.
        Last edited by Nick Cox; 06 Aug 2020, 08:45.

        Comment


        • #5
          Thanks NIck. I am expecting real data soon with me. I'll be back to you once I get that.

          Comment

          Working...
          X