@classmethod
    def setup_class(self):
        # replicating OLS by GMM - high agreement
        self.params_tol = [1e-11, 1e-12]
        self.bse_tol = [1e-12, 1e-12]
        exog = exog_st  # with const at end
        res_ols = OLS(endog, exog).fit()
        #Note: start is irrelevant but required
        start = np.ones(len(res_ols.params))
        nobs, k_instr = instrument.shape
        w0inv = nobs / np.dot(exog.T, exog)
        #w0 = np.linalg.inv(w0inv)

        mod = gmm.LinearIVGMM(endog, exog, exog)
        res = mod.fit(start, maxiter=0, inv_weights=w0inv,
                        #optim_method='bfgs', optim_args={'gtol':1e-6, 'disp': 0},
                        optim_args={'disp': 0},
                        weights_method='iid',
                        wargs={'centered':False, 'ddof':'k_params'},
                        has_optimal_weights=True)

        # fix use of t distribution see #2495 comment
        res.use_t = True
        res.df_resid = res.nobs - len(res.params)
        self.res1 = res

        #from .results_gmm_griliches import results_onestep as results
        #self.res2 = results
        self.res2 = res_ols


#------------------
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/regression/tests/test_gmm.py/TestGMMStOneiterOLS_Linear.setup_class/swapped operands of `/`