Wakame
Wakame

Reputation: 607

statsmodel: No. Iterations

The question may simple, but I would like to ask question about the result from statsmodel.

According to the reference, we can get the result from

print(gamma_results.summary())

https://www.statsmodels.org/devel/glm.html

                Generalized Linear Model Regression Results                  
==============================================================================
Dep. Variable:                    YES   No. Observations:                   32
Model:                            GLM   Df Residuals:                       24
Model Family:                   Gamma   Df Model:                            7
Link Function:          inverse_power   Scale:                       0.0035843
Method:                          IRLS   Log-Likelihood:                -83.017
Date:                Tue, 16 Aug 2022   Deviance:                     0.087389
Time:                        13:46:12   Pearson chi2:                   0.0860
No. Iterations:                     6   Pseudo R-squ. (CS):             0.9800
Covariance Type:            nonrobust                                         
======================================================================================
                         coef    std err          z      P>|z|      [0.025      0.975]
--------------------------------------------------------------------------------------
const                 -0.0178      0.011     -1.548      0.122      -0.040       0.005
COUTAX              4.962e-05   1.62e-05      3.060      0.002    1.78e-05    8.14e-05
UNEMPF                 0.0020      0.001      3.824      0.000       0.001       0.003
MOR                -7.181e-05   2.71e-05     -2.648      0.008      -0.000   -1.87e-05
ACT                    0.0001   4.06e-05      2.757      0.006    3.23e-05       0.000
GDP                -1.468e-07   1.24e-07     -1.187      0.235   -3.89e-07    9.56e-08
AGE                   -0.0005      0.000     -2.159      0.031      -0.001   -4.78e-05
COUTAX_FEMALEUNEMP -2.427e-06   7.46e-07     -3.253      0.001   -3.89e-06   -9.65e-07
======================================================================================

Would you tell me what it means No. Iterations:?

Upvotes: 1

Views: 86

Answers (1)

Ignacio Peletier
Ignacio Peletier

Reputation: 2206

Most of the GLMs do not have an analytical solution, such as the linear regression does.

When you lack an analytical solution you have to use an optimization algorithm to achieve an "optimal" solution.

No. Iterations is the number of iterations that were needed by the optimization algorithm to reach a good enough solution (given some exit criteria).

Hope this helps!

Upvotes: 2

Related Questions