par2bsp {bspline}R Documentation

Convert parameters to B-spline function

Description

Convert parameters to B-spline function

Usage

par2bsp(n, qw, xk, covqw = NULL, sdy = NULL, sdqw = NULL)

Arguments

n

Integer scalar, polynomial order of B-splines

qw

Numeric vector or matrix, coefficients of B-splines, one set per column in case of matrix

xk

Numeric vector, knots

covqw

Numeric Matrix, covariance matrix of qw (can be estimated in smbsp).

sdy

Numeric vector, SD of each y column (can be estimated in smbsp).

sdqw

Numeric Matrix, SD of qw thus having the same dimension as qw (can be estimated in smbsp).

Value

Function, calculating B-splines at arbitrary points and having interface f(x, select) where x is a vector of abscissa points. Parameter select is passed to qw[, select, drop=FALSE] and can be missing. This function will return a matrix of size length(x) x ncol(qw) if select is missing. Elsewhere, a number of column will depend on select parameter. Column names in the result matrix will be inherited from qw.


[Package bspline version 2.2.2 Index]