a possible way how to splice it in is presented in the smespline package in R, which uses lme with a specific random effects matrix that I don't understand. Probably we have to rebuild this matrix in "Z", but this seems complicated.
I started with something, but I will probably drop this for now.
Currently trying to figure out how onewould penalize the splines using a random effect
Verbyla 1999 introduces this https://rss.onlinelibrary.wiley.com/doi/pdf/10.1111/1467-9876.00154
a possible way how to splice it in is presented in the smespline package in R, which uses lme with a specific random effects matrix that I don't understand. Probably we have to rebuild this matrix in "Z", but this seems complicated.
I started with something, but I will probably drop this for now.