0

I am using sci-kit learn to estimate the p-values of my GLM with a Tweedie link function.

First, I estimate the p-values with statsmodels to see the values I should be matching to. Here is the result from statsmodels:

Statsmodel Tweedie GLM Coefficients and P-Values

Then, I create the same model in sci-kit learn and try to estimate p-values:

Sci-kit Learn Model Coefficients

Manual Calculation of P-Values

These p-values are quite far off of statsmodels. I would expect some difference since the coefficients don't match perfectly (but generally are pretty close), but this difference between p-values is quite large.

I believe the error is in how my variance-covariance matrix is being calculated (vcov in the screenshot above). Do you know what the variance-covariance matrix estimation should look like for a weighted GLM?

I'm trying to estimate p-values for a TweedieRegressor in sklearn. I expected my estimated p-values to match the p-values from a statsmodel GLM with a Tweedie link function.

Sue
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 10 '23 at 07:49

0 Answers0