Adaptive learning in models with lagged variables