linearmodels.iv.absorbing.AbsorbingLSResults.absorbed_rsquared

property AbsorbingLSResults.absorbed_rsquared : float

Coefficient of determination (R**2), ignoring absorbed variables.

Returns:

The coefficient of determination of the regressors that were not absorbed.

Return type:

float

Notes

The total sum of squares is that of the dependent variable once the absorbed variables have been removed. The coefficient of determination is NaN if it is zero, up to rounding error, e.g., if the absorbed variables explain the dependent variable, or if it does not vary. No error or warning is raised.

The limit is the rounding error of the computation. The variables are absorbed exactly only if they are a single categorical variable and the model is not weighted. Otherwise an iterative algorithm is used, and its error is larger, by default about 1e-8 relative to the size of the dependent variable for LSMR (see lsmr_options of fit), so that a dependent variable that the absorbed variables explain exactly can have a total sum of squares that is not recognized as zero.