def _estimate_scale(self, resid): """ Estimates the scale based on the option provided to the fit method. """ if isinstance(self.scale_est, str): if self.scale_est.lower() == 'mad': return scale.mad(resid) if self.scale_est.lower() == 'stand_mad': return scale.stand_mad(resid) elif isinstance(self.scale_est, scale.HuberScale): return scale.hubers_scale(self.df_resid, self.nobs, resid) else: return scale.scale_est(self, resid)**2
def test_mad(self): n = scale.mad(self.X) assert_equal(n.shape, (10, ))
def test_mad(self): n = scale.mad(self.X) assert_equal(n.shape, (10,))