Consistent Estimation of Agent Based Models