An algorithm for reducing errors-in-variable bias in simple