def test_bse_other(self):
        res1, res2 = self.res1, self.res2

        moms = res1.model.momcond(res1.params)
        w = res1.model.calc_weightmatrix(moms)
        # try other versions for bse,
        # TODO: next two produce the same as before (looks like)
        bse = np.sqrt(np.diag((res1._cov_params(has_optimal_weights=False,
                                            weights=res1.weights))))
        # TODO: doesn't look different
        #assert_allclose(res1.bse, res2.bse, rtol=5e-06, atol=0)
        bse = np.sqrt(np.diag((res1._cov_params(has_optimal_weights=False,
                                               #use_weights=True #weights=w
                                                         ))))
        #assert_allclose(res1.bse, res2.bse, rtol=5e-06, atol=0)

        #This doesn't replicate Stata oneway either
        nobs = instrument.shape[0]
        w0inv = nobs / np.dot(instrument.T, instrument)
        q = self.res1.model.gmmobjective(self.res1.params, w)#self.res1.weights)
        #assert_allclose(q, res2.Q, rtol=5e-6, atol=0)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/regression/tests/test_gmm.py/TestGMMStOneiter.test_bse_other/swapped operands of `/`