My own implementation of the GMM estimator.