linearmodels.panel.results.RandomEffectsResults.corr_squared_within¶
- property RandomEffectsResults.corr_squared_within : float¶
Within coefficient of determination using squared correlation.
Notes
The within rsquared measures the fit of the dependent purged of entity effects on the exogenous purged of entity effects.
This measure is based on the squared correlation between the entity-wise demeaned dependent variables and their demeaned predictions.
\[Corr[y_{it}-\bar{y}_i, (x_{it}-\bar{x}_i)\hat{\beta}]\]This measure does not account for weights.
It is NaN if the dependent variable does not vary within entities, up to rounding error, since the correlation is not defined, and it is 0 if the demeaned predictions do not vary. No error or warning is raised.