ACTU PS5841 Data Science in Finance & Insurance – Autumn 2021 (Y. Wang) Assignment – 7
Assigned 11/09/21, Due 11/16/21 Tuesday
数据科学代写 Problem 1. Poisson RegressionThe file data.csv contains accident counts for 5 age groups, along with the corresponding exposure.
Problem 1. Poisson Regression 数据科学代写
The file data.csv contains accident counts for 5 age groups, along with the corresponding exposure. You decided to use a Poisson regression fit the data:
ln(E(Accidentsi)) = ln(personyearsi) + β0 + β1Agei
A.Fit the data using sklearn and report the following:
a1.[βˆ0, βˆ1]
a2. The corresponding log-likelihood value.
B.Fit the data using statsmodels and report the following: 数据科学代写
b1.[βˆ0, βˆ1]
b2. The corresponding log-likelihood value
b3. The corresponding pseudo R2 when compared to the naive model
ln(E(Accidentsi)) = ln(personyearsi) + β0