h_eval {dspline}R Documentation

Evaluate H basis

Description

Evaluates the falling factorial basis of a given order, with respect to given design points, at arbitrary query points.

Usage

h_eval(k, xd, x, col_idx = NULL)

Arguments

k

Order for the falling factorial basis. Must be >= 0.

xd

Design points. Must be sorted in increasing order, and have length at least k+1.

x

Query points. Must be sorted in increasing order.

col_idx

Vector of indices, a subset of 1:n where n = length(xd), that indicates which columns of the constructed matrix should be returned. The default is NULL, which is taken to mean 1:n.

Details

The falling factorial basis functions of order k, defined with respect to design points x_1 < \ldots < x_n, are denoted h^k_1, \ldots, h^k_n. For their precise definition and further references, see the help file for h_mat(). The current function produces a matrix of evaluations of the falling factorial basis at an arbitrary sequence of query points. For each query point x, this matrix has a corresponding row with entries:

h^k_j(x), \; j = 1, \ldots, n.

Value

Sparse matrix of dimension length(x) by length(col_idx).

See Also

h_mat() for constructing evaluations of the falling factorial basis at the design points.

Examples

xd = 1:10 / 10
x = 1:9 / 10 + 0.05
h_mat(2, xd)
h_eval(2, xd, x)

[Package dspline version 1.0.2 Index]