I am attempting to draw out confidence limits from some count data I have. I can do this manually, for example
poisson.test(53,conf.level = 0.95)
LCI = 39.7, UCI = 69.3
So I have some basics! I have some very very basic test data to practice on, but I am having trouble applying poisson.test for each row and then extracting the LCI/UCI. The dataset is:
region <- c("A","B")
count <- c(53,36)
data <- data.frame(region,count)
Ideally, my output would look like this:
I have tried using apply() but that hasn't quite worked. Any tips on how to get this out and into a table without having to perform the manual calculation and enter it into a spreadsheet? Thanks in advance!