The functional single-index model (FSIM) is given by the expression:
$$Y_i=r(\langle\theta_0,X_i\rangle)+\varepsilon_i, \quad i=1,\dots,n,$$
where \(Y_i\) denotes a scalar response,
\(X_i\) is a functional covariate valued in a separable Hilbert space \(\mathcal{H}\) with an inner product \(\langle \cdot, \cdot\rangle\). The term \(\varepsilon\) denotes the random error, \(\theta_0 \in \mathcal{H}\) is the unknown functional index and \(r(\cdot)\) denotes the unknown smooth link function; \(n\) is the training sample size.
Given \(\theta \in \mathcal{H}\), \(h>0\) and a testing sample {\(X_j,\ j=1,\dots,n_{test}\)}, the predicted responses (see the value y.estimated.test
) can be computed using the kernel procedure using
$$
\widehat{r}_{h,\theta}(X_j)=\sum_{i=1}^nw_{n,h,\theta}(X_j,X_i)Y_i,\quad j=1,\dots,n_{test},
$$
with Nadaraya-Watson weights
$$
w_{n,h,\theta}(X_j,X_i)=\frac{K\left(h^{-1}d_{\theta}\left(X_i,X_j\right)\right)}{\sum_{i=1}^nK\left(h^{-1}d_{\theta}\left(X_i,X_j\right)\right)},
$$
where
\(K\) is a kernel function (see the argument kind.of.kernel
).
for \(x_1,x_2 \in \mathcal{H}, \) \(d_{\theta}(x_1,x_2)=|\langle\theta,x_1-x_2\rangle|\) is the projection semi-metric.
If the argument y.test
is provided to the program (i. e. if(!is.null(y.test))
), the function calculates the mean squared error of prediction (see the value MSE.test
). This is computed as mean((y.test-y.estimated.test)^2)
.