Computing Generalized Empirical Likelihood and Generalized Method of Moments with R