Allin Cottrell,
Your script halt due to the d1^hat replace the d1 original data series