simulated method of moments in r