Description Usage Arguments Value References See Also Examples
View source: R/spec_density_covlagh_operator.R
Numerically calculate the lag-h covariance operators for functional time series dynamics defined directly by its spectral density operator. The calculation is done by numerically integrating the inverse formula, i.e. the spectral density multiplied by exp(-1i*lag*omega)
1 | spec_density_covlagh_operator(spec_density, lag, n_grid, n_grid_freq = 2000)
|
spec_density |
The spectral density operator defined as an integral operator through with the given kernel. Function of three variables, |
lag |
The lag of the autocovariance to evaluate. |
n_grid |
Number of grid points (spatial resolution) of the discretisation of [0,1]^2 for the operator kernel to evaluate. |
n_grid_freq |
The grid points for the spectral density to evaluate at. Partition of [0,pi]. |
lag-h autocovariance operator, matrix of size (n_grid
,n_grid
)
Rubin, Panaretos. Simulation of stationary functional time series with given spectral density. arXiv, 2020
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Define the spectral density operator as an integral operator with kernel
k_bbridge <- function(x,y) { pmin(x,y)-x*y }
spec_density <- function( omega, x,y ){ 1/(1-0.9 *cos(omega)) * k_bbridge( (x-omega/pi)%%1, (y-omega/pi)%%1 ) }
# evaluation setting
lag <- 1 # change here to evaluate different lag-h autocovariance operator. put "lag <- 0" for lag-0 covariance operator
n_grid <- 101
# calculate the lag-h autocovariance operator
covlagh <- spec_density_covlagh_operator(spec_density, lag, n_grid)
# visualise as a surface plot
persp(covlagh)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.