Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

疑似R2乗値

GLMでは通常のR2乗値は使えないため、疑似R2乗値(pseudo R-squared)というものが使われる

疑似R2の種類

McFaddenの疑似R2R^2は離散変数にのみ使える

Cox-Snellの疑似R2R^2は離散変数と連続変数の両方に使える

例

                 Generalized Linear Model Regression Results                  
==============================================================================
Dep. Variable:                    YES   No. Observations:                   32
Model:                            GLM   Df Residuals:                       24
Model Family:                   Gamma   Df Model:                            7
Link Function:           InversePower   Scale:                       0.0035843
Method:                          IRLS   Log-Likelihood:                -83.017
Date:                Mon, 30 Sep 2024   Deviance:                     0.087389
Time:                        02:19:33   Pearson chi2:                   0.0860
No. Iterations:                     6   Pseudo R-squ. (CS):             0.9800
Covariance Type:                  HC1                                         
======================================================================================
                         coef    std err          z      P>|z|      [0.025      0.975]
--------------------------------------------------------------------------------------
const                 -0.0178      0.007     -2.391      0.017      -0.032      -0.003
COUTAX              4.962e-05   9.02e-06      5.501      0.000    3.19e-05    6.73e-05
UNEMPF                 0.0020      0.000      6.680      0.000       0.001       0.003
MOR                -7.181e-05   2.18e-05     -3.288      0.001      -0.000    -2.9e-05
ACT                    0.0001   2.73e-05      4.097      0.000    5.83e-05       0.000
GDP                -1.468e-07    7.9e-08     -1.858      0.063   -3.02e-07    8.08e-09
AGE                   -0.0005      0.000     -3.336      0.001      -0.001      -0.000
COUTAX_FEMALEUNEMP -2.427e-06   4.15e-07     -5.852      0.000   -3.24e-06   -1.61e-06
======================================================================================
/usr/local/lib/python3.10/site-packages/statsmodels/genmod/generalized_linear_model.py:308: DomainWarning: The InversePower link function does not respect the domain of the Gamma family.
  warnings.warn((f"The {type(family.link).__name__} link function "
<Figure size 640x480 with 1 Axes>