Announcement

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

  • Calculating confidence intervals for predicted incidence rates

    Hello all
    I am using data on counts of children with abscesses per day within each year.

    Using the trend in the years prior to the pandemic (2013-2019), I would like to predict the incidence of these events in the years during and since the pandemic (2020-2022), to see if the observed incidence now is following the pre-pandemic trend.

    Because there is variation in the number of days of observation each year I have created the variable "counts_per_day"

    I have used national population data to offset the model

    Firstly i have run

    poisson event_per_day year if year < 2020, exposure(population)

    then

    predict abscess_ir, ir

    This gives the incidence rate for all years (abscess_ir). I would like to plot this with 95% confidence intervals, - does anyone know how to calculate confidence intervals for this?

    Any help would be fantastic!

    Best wishes

    Joe


  • #2
    Graph of counts per day per 100,000.pdf

    Attached is an example of what I would like to create - with observed counts per 100,000 in green and predicted counts per 100,000 as the line with grey confidence intervals.

    I created this using

    gen count_per_day_incidence = (event_per_day/ population) * 100000

    twoway lfitci count_per_day_incidence year if (year < 2020), range(2013 2023) || scatter (count_per_day_incidence year), ytitle("counts per day per 100,000") ylabel(, angle(horizontal)) xscale(range(2013 2023)) xlabel(#10) xmtick(none) legend(off) graphregion(fcolor(white) ifcolor(white))

    But I understand lfitci is fitting a linear model, wheras I ideally would like to fit a poisson model to these data

    Thanks again!

    Joe

    Comment

    Working...
    X