Calculate confidence intervals for Poisson counts or rates using Byar's method, and return tidy output

pois_byar_ci(
  data,
  x,
  pt,
  factor = 1000,
  conf.level = 0.95,
  digits = 2,
  rate_ci_only = TRUE
)

Arguments

data

Input dataset containing counts and person time

x

count or vector of counts

pt

person-time at risk or vector of person-times

factor

per how many person-time

conf.level

confidence level (default = 0.95)

digits

number of digits to round to

rate_ci_only

only print rate and CIs (default = TRUE)

Value

original dataframe with rate, lower, upper variables added

Examples

if (FALSE) { # \dontrun{
pois_byar_ci(data=counts, x="deaths", pt="person_years")
 } # }