class TestGLMPoissonCluFit(CheckCountRobustMixin): res2 = results_st.results_poisson_clu cov_type = 'cluster' model_cls = GLM mod_kwargs = {"family": families.Poisson()} cov_kwds = dict(groups=group, use_correction=True, df_correction=True) # TODO has no effect fit_kwargs = { "cov_type": cov_type, "cov_kwds": cov_kwds, "use_t": False } # True, @classmethod def setup_class(cls): mod = cls.model_cls(endog, exog, **cls.mod_kwargs) cls.res1 = mod.fit(disp=False, **cls.fit_kwargs) # The model results, t_test, ... should also work without # normalized_cov_params, see GH#2209 # Note: we cannot set on the wrapper res1, we need res1._results cls.res1._results.normalized_cov_params = None cls.bse_rob = cls.res1.bse cls.get_corr_fact()
class TestGLMPoissonClu(CheckCountRobustMixin): res2 = results_st.results_poisson_clu model_cls = GLM mod_kwargs = {"family": families.Poisson()} @classmethod def setup_class(cls): mod = cls.model_cls(endog, exog, **cls.mod_kwargs) cls.res1 = mod.fit(disp=False, **cls.fit_kwargs) cls.get_robust_clu()
class TestGLMPoissonHC1Generic(CheckCountRobustMixin): res2 = results_st.results_poisson_hc1 model_cls = GLM mod_kwargs = {"family": families.Poisson()} @classmethod def setup_class(cls): mod = cls.model_cls(endog, exog, **cls.mod_kwargs) cls.res1 = mod.fit(disp=False, **cls.fit_kwargs) get_robustcov_results(cls.res1._results, 'HC1', use_self=True) cls.bse_rob = cls.res1.bse cls.get_corr_fact(use_k=False)
class TestGLMPoissonHC1Fit(CheckCountRobustMixin): res2 = results_st.results_poisson_hc1 cov_type = 'HC1' model_cls = GLM mod_kwargs = {"family": families.Poisson()} fit_kwargs = {"cov_type": cov_type} @classmethod def setup_class(cls): mod = cls.model_cls(endog, exog, **cls.mod_kwargs) cls.res1 = mod.fit(disp=False, **cls.fit_kwargs) cls.bse_rob = cls.res1.bse cls.get_corr_fact(use_k=False)
class TestGLMPoissonCluGeneric(CheckCountRobustMixin): res2 = results_st.results_poisson_clu cov_type = 'cluster' model_cls = GLM mod_kwargs = {"family": families.Poisson()} @classmethod def setup_class(cls): mod = cls.model_cls(endog, exog, **cls.mod_kwargs) cls.res1 = mod.fit(disp=False, **cls.fit_kwargs) get_robustcov_results( cls.res1._results, cls.cov_type, groups=group, use_correction=True, df_correction=True, # TODO has no effect use_t=False, # True, use_self=True) cls.bse_rob = cls.res1.bse cls.get_corr_fact()