this could use df_model, so we don't need to calculate rank twice if self._df_resid is not set yet.

This could be a case for the resettable cache decorator, but I don't think it works nicely with the check in fit() (would need to check _cache). I don't have any experience with the resettable cache.