A b-spline basis for smooth covariate effects, e.g. prevalence = ~ s(day).
Matches stm::s() exactly — including the df = min(10, nval - 1) default —
so spline-term coefficients agree with stm. (You can also use
splines::bs()/splines::ns() directly.)
Arguments
- x
Numeric predictor.
- df
Basis dimension; defaults to
min(10, length(unique(x)) - 1).- ...
Passed to
splines::bs().