I am running a glm model with Poisson Regression and I wanted to know a couple of things.
1) If my model has overdispersion?
2) I am using this model for insurance purposes ~ that is for rating so can I model with all categorical variables / factors or do I need to convert it to numeric variables
3) How can I plot the exp(coefficients) for each variable in R
Here is the code :
rr1 = exp(coef(fit))
write.csv(rr1,file="Coeffmod.csv")
4) Also if someone can please tell me how to check the goodness of fit for the model?
Thank you so much!
Any answer is much appreciated!
Here are my outputs:
Call:
glm(formula = NYDF$Gr_Actual ~ NYDF$Gr_DTC + NYDF$Gr_Construction.Type +
NYDF$Gr_Constr.Year + NYDF$Gr_Constr.Year.Roof + NYDF$Gr_Sq..Footage +
NYDF$Gr_Foundation.Basement.Percentage + NYDF$Gr_Num_stories +
NYDF$Gr_Num_Baths + NYDF$Number.Of.Fireplaces + NYDF$Gr_FireAlarm +
NYDF$Gr_Central.Air + NYDF$Gr_Full.Bath.Quality + NYDF$Gr_Structure.Type +
NYDF$Gr_Roof.Geometry.Type + NYDF$Gr_Roof.Covering.Type +
NYDF$Gr_Opening.Protection.Type + NYDF$Gr_Special.Loss.Settlement +
NYDF$Gr_ShortTerm.Rental + NYDF$Gr_Single.Occupancy + NYDF$Gr_Absentee.Landlord +
NYDF$Gr_Theft.Coverage + NYDF$Gr_Vacancy.Coverage + NYDF$Gr_Mold.Limit +
NYDF$Gr_Property.Occupancy + NYDF$Gr_Property.Usage + NYDF$Hurricane.Deductible +
NYDF$Gr_AOP.Deductible + NYDF$Coverage.A + NYDF$Gr_CovB +
NYDF$Gr_CovC + NYDF$Gr_CovD + NYDF$Gr_Garage.Type + NYDF$Coverage.L +
NYDF$Coverage.M + NYDF$Payment.Plan.Type + NYDF$Gr_Insurance.Scoring +
NYDF$Gr_Affiliation + NYDF$Gr_Seasonal.Surcharge.Factor +
NYDF$Gr_Secured.Community + NYDF$Gr_Additional.Amounts.Of.Insurance +
NYDF$Gr_Mechanical.Breakdown.Coverage + NYDF$Gr_Identity.Fraud.Coverage +
NYDF$Gr_Lapse.in.Coverage + NYDF$Gr_Prop.manager + NYDF$Gr_HomeFeatures +
NYDF$Gr_Water.Backup.Coverage, family = poisson(link = "log"),
data = NYDF)
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 13608.9 on 7970 degrees of freedom
Residual deviance: 9808.9 on 7776 degrees of freedom
(737 observations deleted due to missingness)
AIC: 10780
Number of Fisher Scoring iterations: 17