kerfon {far} | R Documentation |
Functional Kernel estimation
Description
Modelization of fdata
using functional kernel.
Usage
kerfon(data, x, r, hmin, hmax, na.rm=TRUE)
Arguments
data |
A |
x |
The name of the studied variable. |
r |
Number of observations used to cross validate the model. |
hmin |
Minimal value of the bandwidth. |
hmax |
Maximal value of the bandwidth. |
na.rm |
Logical. Does the |
Details
This function constructs a functional kernel model and performs the estimation of it's bandwidth.
One nonparametric way to deal with the conditional expectation
\rho(x)=\mbox{I$\!$E}\left[ X_{i}\left| X_{i-1}=x\right. \right]
, where is a
$H$-valued process, is to consider a predictor inspired by the
classical kernel regression, as in Nadaraja and Watson. This estimator
is defined by :
Where K is a kernel, is the
norm in H, and
is the bandwidth (
\in
\mbox{I$\!$R}^+_*
).
The function kerfon
use the cross validation to determinate a
value for . This method have been chosen because of the
lack of theoretical results about this model. The parameters
hmin
and hmax
are used, when provided, to control the
permissible values of . By default, those parameters are
respectively equals to
and
, where
is the estimated squared root of the variance operator of
X. To choose the value of
, you need to provide the same
value for both
hmin
and hmax
.
During the cross-validation, considering that the fdata object
x
contains observations, the function use the first
observations as the past values, and compute the mean
square norm of the errors on the last
observations.
Of course, if the model created is then used to compute prediction
through predict.kerfon
, the whole set of observations (the
observations) are used as the past values.
As fdata
object may contains several variables, a way is
provided to select the studied variable (the function only works
with one variable for the moment).
Value
A kerfon object. A method for the print
function is
provided.
For information, the object is a list with the following elements :
call |
the call of the function. |
h |
the bandwidth (three values : optimal, minimum, maximum) |
x |
the name of the chosen variable |
xdata |
the past values for |
ydata |
the associated values for |
Author(s)
J. Damon
See Also
Examples
# Simulation of a FARX process
data1 <- simul.farx(m=10,n=400,base=base.simul.far(20,5),
base.exo=base.simul.far(20,5),
d.a=matrix(c(0.5,0),nrow=1,ncol=2),
alpha.conj=matrix(c(0.2,0),nrow=1,ncol=2),
d.rho=diag(c(0.45,0.90,0.34,0.45)),
alpha=diag(c(0.5,0.23,0.018)),
d.rho.exo=diag(c(0.45,0.90,0.34,0.45)),
cst1=0.0)
# Cross validation
model1 <- kerfon(data=data1, x="X", r=10, na.rm=TRUE)
print(model1)