Estimating regression models of finite but unknown order