I assume that I miss the correct English terms here to search for myself.
I calculate the incidence rate like this:
> observed_cases_n = 112575
> population_n = 752487
> rate_relation = 1000
> CI = 95
> ir = observed_cases_n / population_n * rate_relation
The result is
> ir
[1] 149.6039
Is the term "incidence rate" correct here?
Now I want to compute the confidence interval for that. I can do this with Python code but I don't know how to translate that into R. This is the Python code.
import math
from statistics import NormalDist
ir = 149.6039
# "incidence rate" as cases per 1.000 people
rate_relation = 1000
# Strength of the confidence interval
CI = 95
# Variance of raw incidence rate
ir_variance = ir * (rate_relation - ir) / population_n
nd = NormalDist(mu=1, sigma=0.5).inv_cdf((1 + CI / 100) / 2)
# Confidence interval
ci_lower = ir - nd * math.sqrt(ir_variance)
ci_upper = ir + nd * math.sqrt(ir_variance)
print(f'The {CI}% confidence interval is {ci_lower} to {ci_upper}.')