The constructor is not called directly, but as with gam(mgcv)
is used internally.
A 'finish at zero' constraint is achieved by setting the last (m+1) spline coefficients to zero. According to the B-spline basis functions properties, the value of the spline, f(x)
, is determined by m+2
non-zero basis functions, and only m+1
B-splines are non-zero at knots. Only m+2
B-splines are non-zero on any [k_i, k_{i+1})
, and the sum of these m+2
basis functions is 1.
If the knots of the spline are not supplied, then they are placed evenly throughout the covariate values with an exception of the m
inner knots preceeding the last inner knot that are joined with that last knot. This is done in order to avoid an otherwise plateau fit at the right-end region. If the knots are supplied, then the number of supplied knots should be k+m+2
, and the range of the middle k-m
knots must include all the covariate values.
Note: when a plateau region is expected at the righ-end covariate region, the smooth might result in some decrease when approaching to zero.