def do1(self, reml, irf, ds_ix):

        # No need to check independent random effects when there is
        # only one of them.
        if irf and ds_ix < 6:
            return

        irfs = "irf" if irf else "drf"
        meth = "reml" if reml else "ml"

        rslt = R_Results(meth, irfs, ds_ix)

        # Fit the model
        md = MixedLM(rslt.endog, rslt.exog_fe, rslt.groups,
                     rslt.exog_re)
        if not irf:  # Free random effects covariance
            if np.any(1e-5 < np.diag(rslt.cov_re_r)):
                with warnings.catch_warnings():
                    warnings.simplefilter("ignore")
                    mdf = md.fit(gtol=1e-7, reml=reml)
            else:
                mdf = md.fit(gtol=1e-7, reml=reml)
        else:  # Independent random effects
            k_fe = rslt.exog_fe.shape[1]
            k_re = rslt.exog_re.shape[1]
            free = MixedLMParams(k_fe, k_re, 0)
            free.fe_params = np.ones(k_fe)
            free.cov_re = np.eye(k_re)
            free.vcomp = np.array([])
            if np.any(np.diag(rslt.cov_re_r) < 1e-5):
                with warnings.catch_warnings():
                    warnings.simplefilter("ignore")
                    mdf = md.fit(reml=reml, gtol=1e-7, free=free)
            else:
                mdf = md.fit(reml=reml, gtol=1e-7, free=free)

        assert_almost_equal(mdf.fe_params, rslt.coef, decimal=4)
        assert_almost_equal(mdf.cov_re, rslt.cov_re_r, decimal=4)
        assert_almost_equal(mdf.scale, rslt.scale_r, decimal=4)

        k_fe = md.k_fe
        assert_almost_equal(rslt.vcov_r, mdf.cov_params()[0:k_fe, 0:k_fe],
                            decimal=3)

        assert_almost_equal(mdf.llf, rslt.loglike[0], decimal=2)

        # Not supported in R except for independent random effects
        if not irf:
            assert_almost_equal(mdf.random_effects[0], rslt.ranef_postmean,
                                decimal=3)
            assert_almost_equal(mdf.random_effects_cov[0],
                                rslt.ranef_condvar,
                                decimal=3)

    # Run all the tests against R
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/regression/tests/test_lme.py/TestMixedLM.do1/swapped operands of `<`