R port of the Stata package ivreg2.