I would like to model repeated measures data with R and the library splines.
However, I am kind of confused about the difference between the bs () and ns () functions. (I am sorry if this might be a stupid question, but I just cannot figure it out by reading the documentation or online examples). I have constructed models with both functions and the predictions from ggpredict look quite the same. However, the parameters in the outputs are not exactly identical.
Here are my models:
bs_model = lmer(outcome ~ bs(time, degree=1,knots =1) * group + age_sc + sex + (time|subject), data) ns_model = lmer(outcome ~ ns(time, knots =1) * group + age_sc + sex + (time|subject), data)
Can someone tell me what the difference is, between these two models?