estimate_iid_distr_MC {fdaACF} | R Documentation |
Estimate distribution of the fACF under the iid. hypothesis using MC method
Description
Estimate the distribution of the autocorrelation function under the hypothesis of strong functional white noise. This function uses Montecarlo's method to estimate the distribution.
Usage
estimate_iid_distr_MC(Y, v, autocovSurface, matindex, nsimul = 10000,
figure = FALSE, ...)
Arguments
Y |
Matrix containing the discretized values
of the functional time series. The dimension of the
matrix is |
v |
Discretization points of the curves, by default
|
autocovSurface |
An |
matindex |
A vector containing the L2 norm of
the autocovariance function. It can be obtained by calling
function |
nsimul |
Positive integer indicating the number of
MC simulations that will be used to estimate the distribution
of the statistic. Increasing the number of simulations will
improve the estimation, but it will increase the computational
time.
By default, |
figure |
Logical. If |
... |
Further arguments passed to the |
Value
Return a list with:
-
ex
: Knots where the distribution has been estimated -
ef
: Discretized values of the estimated distribution. -
Reig
: Raw values of the i.i.d. statistic for each MC simulation.
Examples
# Example 1
N <- 100
v <- seq(from = 0, to = 1, length.out = 10)
sig <- 2
Y <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 1
autocovSurface <- obtain_autocovariance(Y,nlags)
matindex <- obtain_suface_L2_norm (v,autocovSurface)
# Remove lag 0
matindex <- matindex[-1]
MC_dist <- estimate_iid_distr_MC(Y,v,autocovSurface,matindex)
plot(MC_dist$ex,MC_dist$ef,type = "l",main = "ecdf obtained by MC simulation")
grid()
# Example 2
N <- 400
v <- seq(from = 0, to = 1, length.out = 50)
sig <- 2
Y <- simulate_iid_brownian_bridge(N, v, sig)
nlags <- 20
autocovSurface <- obtain_autocovariance(Y,nlags)
matindex <- obtain_suface_L2_norm (v,autocovSurface)
# Remove lag 0
matindex <- matindex[-1]
MC_dist <- estimate_iid_distr_MC(Y,v,autocovSurface,matindex)
plot(MC_dist$ex,MC_dist$ef,type = "l",main = "ecdf obtained by MC simulation")
grid()