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 |
x |
Query points. Must be sorted in increasing order. |
col_idx |
Vector of indices, a subset of |
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)