I'm trying to use gams in R and encountered weird behaviors using Duchon splines.
Here is my code :
> fit <- gam(Load ~ s(Date, k=3, bs='ds'), data=data0)
Error in qr.qty(qru, t(qr.qty(qru, D)[-ind, ])) :
'qr' and 'y' must have the same number of rows
> fit <- gam(Load ~ s(Date, k=4, bs='ds'), data=data0)
data0 is a dataframe of dim 3028, 20 Load and Date are the names of two of the columns of data0 (with numeric values)
Can someone enlight my on why it pass with k>=4 and fails with k=3 ?
In my understanding qr referer to the design matrix of the model and y to the response variable, and there are the same in both cases...
Thanks for the help.