eval.Gspline: Evaluate a G-spline in a grid of values
Description
This function computes values of
$$f(x) = \sum_{j=1}^g c_j \varphi_{\mu_j, \sigma_j^2}(x)$$
in a grid of $x$ values.
In above expression, $\varphi_{\mu_j, \sigma_j^2}(x)$
denotes a density of $N(\mu_j, \sigma_j^2)$.
Usage
eval.Gspline(Gspline, grid)
Arguments
Gspline
A data frame with at least three columns named
``Knot'', ``SD basis'' and ``c coef.'' which determine
$\mu_1, \dots,\mu_g$,
$\sigma_1, \dots, \sigma_g$ and
$c_1,\dots, c_g$. Data.frame with such
properties can be found e.g. as sp
grid
A numeric vector giving the grid of $x$ values at
which the G-spline is to be evaluated.
Value
A data.frame with columns named ``x'' (grid) and ``y'' (G-spline
values).