Skip to content
Prev 16501 / 20628 Next

mgcv gamm problem with factor-smooth interaction and AR1 errors

Without really trying to understand your models and whether my
suggestion does the same thing, I found that this works:

m6 = gamm(x~s(index, by=subject, bs='fs'),
correlation=corAR1(form=~index|subject), data=df, method = 'REML')

I just looked at the differences between lines and saw that "subject"
was specified as a named argument in some lines, but not others.

Phillip
On 04/23/2018 05:46 PM, Mathew Guilfoyle wrote: