x: A numeric vector representing the predictor variable. Missing values are allowed.
df: Degrees of freedom, specifying the number of columns in the basis matrix. If df is provided, the function selects df - 1 - intercept internal knots based on appropriate quantiles of x, ignoring any missing values.
knots: A numeric vector specifying the internal breakpoints that define the spline. If provided, the number of degrees of freedom will be determined by the length of knots.
intercept: A logical value indicating whether to include an intercept in the basis. The default is FALSE.
boundary_knots: A numeric vector of length 2 specifying the boundary points where the natural boundary conditions are applied and the B-spline basis is anchored. If not supplied, the default is the range of non-missing values in x.
Returns
A matrix with dimensions c(length(x), df), where df is either provided directly or computed as length(knots) + 1 + intercept when knots are supplied. The matrix contains attributes that correspond to the arguments passed to the nscpp function.