@classmethod
    def setup_class(self):
        # compare to Stata default options, twostep GMM
        self.params_tol = [5e-5, 5e-6]
        self.bse_tol = [5e-6, 5e-7]
        exog = exog_st  # with const at end
        start = OLS(endog, exog).fit().params
        nobs, k_instr = instrument.shape
        w0inv = np.dot(instrument.T, instrument) / nobs
        #w0 = np.linalg.inv(w0inv)

        mod = gmm.IVGMM(endog, exog, instrument)
        res10 = mod.fit(start, maxiter=2, inv_weights=w0inv,
                        optim_method='bfgs', optim_args={'gtol':1e-6, 'disp': 0},
                        wargs={'centered':False})
        self.res1 = res10

        from .results_gmm_griliches import results_twostep as results
        self.res2 = results
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/regression/tests/test_gmm.py/TestGMMStTwostep.setup_class/original