How can I predict/interpret results of Poisson regression? We are working on a project where we want to find the pure premium for which we first want to fit Poisson regression.
Data Used: data(dataCars) from insauranceData package in R
We have an offset term exposure which takes value between 0 and 1
when I fit my model then I am getting rates between 0 and 1
but when I calculate the original rates to compare my prediction, there are values in 365claims/year  (since few observations had claimed within 0.0027 exposure time)
So is my interpretation of no of claims using Poisson GLM incorrect or is it wrong to compare the rates calculated using the model and calculated from the original data ?
What is the right method to go about it? Please Help
Following are the codes attached:

library(insuranceData)
library(forcats)
library(caret)

data(dataCar)
data1 <- dataCar
#Data Cleaning & Pre-processing
data2 <- unique(data1)
data3 <- data2[data2$veh_value > quantile(data2$veh_value, 0.0001),] 
data4 <- data3[data3$veh_value < quantile(data3$veh_value, 0.999), ]
#Regrouping vehicle categories
top9 <- c('SEDAN','HBACK','STNWG','UTE','TRUCK','HDTOP','COUPE','PANVN','MIBUS')
data4$veh_body <- fct_other(data4$veh_body, keep = top9, other_level = 'other')
#Converting catagorical variables into factors
names <- c('veh_body' ,'veh_age','gender','area','agecat')
data4[,names] <- lapply(data4[,names] , factor)
str(data4)
##data partition - original data
data <- data4
data_partition <- createDataPartition(data$numclaims, times = 1,p = 0.8,list = FALSE)
str(data_partition)
training <- data[data_partition,]
testing  <- data[-data_partition,]


##data partition - re-sampled data
data <- data4
data_partition <- createDataPartition(data$numclaims, times = 1,p = 0.8,list = FALSE)
str(data_partition)
training <- data[data_partition,]
testing  <- data[-data_partition,]


#Number of Claims(Orignal Data)
table(training$numclaims)
ggplot(training,aes(numclaims))+geom_bar(fill="deepskyblue4")+
  geom_text(aes(label = ..count..), stat = "count", vjust = -0.3, colour = "black")+
  xlab("No of Claims")+
  ylab("Count of Claims")+
  ggtitle("Histogram of Number of Claims(in given exposure)")+
  theme(plot.title = element_text(hjust=0.5))+
  theme_update()

#Poisson model with offset
poissonglm <- glm(numclaims ~veh_value+veh_body+veh_age+gender+ area+ agecat+offset(log(exposure)),data=training, family = "poisson")
summary(poissonglm)

predict(poissonglm,newdata=data,type="response")




Our Models Predicts the Rate but since now the exposure term is taken care of,so the Rates are No of claims per year so Rate=No of Claims (here)?
I want my predictions to be in some range of counts (i.e 0 1 2 4) which I can compare with the number of claims in my original data.
 A: 
"when I fit my model then I am getting rates between 0 and 1 but when I calculate the original rates to compare my prediction, there are values in 365claims/year"

When I try to reproduce your problem, then I find no predicted values above 365. Or maybe you are looking at some different result?


I want my predictions to be in some range of counts (i.e 0 1 2 4) which I can compare with the number of claims in my original data.

The predictions are for the individual means or rates. Based on the rates you can make predictions for the number of counts in a particular bin.
The expected number of counts in a particular bin is equal to the sum of probability over all individuals
$$E[\text{total number of cases } x_i = k] = \sum_{i=1}^n P(x_i = k)$$
code example:
means = predict(poissonglm,newdata=data,type="response")

probs_individual = sapply(0:10, function(x) dpois(x,means))
expected = colSums(probs_individual)
print(round(expected))

This gives the following table
Number of claims   0     1      2     3   
Expected counts    62681 4440   228   0

Your original data has more often 3 or more claims than predicted. This might be because the true distribution is not Poisson and can be overdispersed (or the true data is Poisson distributed, but you can't describe the outliers well with your regressors/predictors).
