@cache_readonly
    def _r2_raw(self):
        Y = self._y_trans.values.squeeze()
        X = self._x_trans.values

        resid = np.dot(X, self._beta_raw) - Y

        SSE = (resid ** 2).sum()

        if self._use_centered_tss:
            SST = ((Y - np.mean(Y)) ** 2).sum()
        else:
            SST = (Y ** 2).sum()

        return 1 - SSE / SST
dataset/ETHPy150Open pydata/pandas/pandas/stats/plm.py/PanelOLS._r2_raw/swapped operands of `-`