I would like to estimate Poisson means from data sets where means are usually in the range 0.5 to 10. 0 (zeros) in the data are unambiguous; estimates of higher-event numbers degrade in rough proportion to the number of events.
This R code is a reasonable data simulator:
data<-rpois(100, 1.5)
datasim <- function (x, upto = 6) {
counts <- matrix(nrow = (upto+1), ncol = 2)
for (i in 1:(upto+1)) {
counts[i,1] <- i-1
counts[i,2] <- length(which(x==i-1))
}
return(counts)
}
simdata<-datasim(data, upto=3)
> simdata
[,1] [,2]
[1,] 0 19
[2,] 1 42
[3,] 2 19
[4,] 3 10
In general: if I have a subset of event counts, how can I estimate the Poisson mean and CI? I've looked at 'fitdistr', glm's, Poisson.exact, etc. but I haven't found a solution to this problem - I'd like to assure myself that the solution explicitly recognizes that some events are excluded from the data, and that the number of excluded data are known - that n=100 in the example.