Interrupted Time Series With Gam Function R