'The residual degree of freedom, defined as the number of observations
minus the rank of the regressor matrix.'

@property
def df_resid(self):

    if (self._df_resid is None):
        if (self.rank is None):
            self.rank = np_matrix_rank(self.exog)
        self._df_resid = (self.nobs - self.rank)
    return self._df_resid
