\'ve started working with gams recently and I am having a bit of trouble with gamm. I built my model with the gam function and everything runs smoothly with the following co