This function estimates the spectral density operator of a Functional Time Series (FTS)
1 2 3 4 
X 
A T \times nbasis matrix of containing the coordinates of the FTS expressed in a basis. Each row corresponds to a time point, and each column corresponds to the coefficient of the corresponding basis function of the FTS. 
W 
The weight function used to smooth the periodogram operator. Set by default to be the Epanechnikov kernel 
B.T 
The bandwidth of frequencies over which the periodogram operator
is smoothed. If 
only.diag 
A logical variable to choose if the function only computes
the marginal spectral density of each basis coordinate
( 
trace 
A logical variable to choose if only the trace of the spectral
density operator is computed. 
demean 
A logical variable to choose if the FTS is centered before computing its spectral density operator. 
subgrid 
A logical variable to choose if the spectral density operator
is only returned for a subgrid of the Fourier frequencies, which can be
useful in large datasets to reduce memory usage. 
subgrid.density 
Only used if 
verbose 
A variable to show the progress of the computations. By
default, 
subgrid.density.relative.to.bandwidth 
logical parameter to specify if

A list containing the following elements:
The estimated spectral density operator. The first dimension corresponds to the different frequencies over which the spectral density operators are estimated.
The frequencies over which the spectral density is estimated.
The number of Fourier frequencies over which the periodogram operator was smoothed.
The equivalent Bandwidth used in the weight function W(), as defined in Bloomfield (1976, p.201).
The weight function used to smooth the periodogram operator.
The L2 norm of the weight function W.
spec.pgram function of R.
Bloomfield, P. (1976) "Fourier Analysis of Time Series: An Introduction", Wiley.
Panaretos, V. M. and Tavakoli, S., "Fourier Analysis of Functional Time Series", Ann. Statist. Volume 41, Number 2 (2013), 568603.
1 2 3 4 5 6 7 8  ma.scale1=c(1.4,2.3,2)
a1=Generate_filterMA(10, 10, MA.len=3, ma.scale=ma.scale1)
X=Simulate_new_MA(a1, T.len=512, noise.type='wiener')
ans=Spec(X, trace=FALSE, only.diag=FALSE)
plot(ans)
plot(Spec(X, trace=FALSE, only.diag=FALSE, subgrid=TRUE, subgrid.density=10,
subgrid.density.relative.to.bandwidth=FALSE))
rm(ans)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.