751ef43a9daa9fc32fabd121578a7033c33a80b5,linearmodels/system/model.py,IVSystemGMM,fit,#IVSystemGMM#,1187

Before Change


            delta = beta_last - beta
            if vinv is None:
                winv = np.linalg.inv(w)
                nvar = sum(map(lambda a: a.shape[1], wx))
                ninstr = sum(map(lambda a: a.shape[1], wz))
                xpz = np.zeros((nvar, ninstr))
                n = m = 0
                for i in range(k):
                    _x, _z = wx[i], wz[i]
                    xpz[n:n + _x.shape[1], m:m + _z.shape[1]] = _x.T @ _z
                    n += _x.shape[1]
                    m += _z.shape[1]
                v = (xpz @ winv @ xpz.T) / nobs
                vinv = inv(v)
            norm = delta.T @ vinv @ delta
            beta_last = beta

After Change


            delta = beta_last - beta
            if vinv is None:
                winv = np.linalg.inv(w)
                xpz = blocked_cross_prod(wx, wz, eye(k))
                xpz = xpz / nobs
                v = (xpz @ winv @ xpz.T) / nobs
                vinv = inv(v)
            norm = delta.T @ vinv @ delta
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 36

Instances


Project Name: bashtage/linearmodels
Commit Name: 751ef43a9daa9fc32fabd121578a7033c33a80b5
Time: 2017-11-27
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/system/model.py
Class Name: IVSystemGMM
Method Name: fit


Project Name: bashtage/linearmodels
Commit Name: 751ef43a9daa9fc32fabd121578a7033c33a80b5
Time: 2017-11-27
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/system/model.py
Class Name: IVSystemGMM
Method Name: _blocked_gmm


Project Name: bashtage/linearmodels
Commit Name: 751ef43a9daa9fc32fabd121578a7033c33a80b5
Time: 2017-11-27
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/system/model.py
Class Name: IVSystemGMM
Method Name: fit


Project Name: bashtage/linearmodels
Commit Name: 751ef43a9daa9fc32fabd121578a7033c33a80b5
Time: 2017-11-27
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/system/covariance.py
Class Name: GMMHomoskedasticCovariance
Method Name: cov