statsmodels.genmod.generalized_estimating_equations.GEEResults.pseudo_rsquared#
- GEEResults.pseudo_rsquared(kind='cs')#
Pseudo R-squared
Cox-Snell likelihood ratio pseudo R-squared is valid for both discrete and continuous data. McFadden’s pseudo R-squared is only valid for discrete data.
Cox & Snell’s pseudo-R-squared: 1 - exp((llnull - llf)*(2/nobs))
McFadden’s pseudo-R-squared: 1 - (llf / llnull)
- Parameters:
- kind{‘cs’, ‘mcf’},
optional Type of pseudo R-square to return
- kind{‘cs’, ‘mcf’},
- Returns:
floatPseudo R-squared
Notes
nobsin the Cox & Snell pseudo-R-squared is the number of observations. If the model hasfreq_weights, it is their sum, so that the value is the same as for the data with each observation repeated according to its frequency weight.var_weightsdo not changenobs.Changed in version 0.15.1:
nobsis the sum of thefreq_weightsinstead of the number of rows.