Spec_compare_localize_freq: Compare the spectral density operator of two Functional Time...

Description Usage Arguments Details References Examples

Description

Compare the spectral density operator of two Functional Time Series and localize frequencies at which they differ.

Usage

1
2
3
Spec_compare_localize_freq(X, Y, B.T = (dim(X)[1])^(-1/5), W, autok = 2,
  subgrid.density, verbose = 0, demean = FALSE, K.fixed = NA,
  subgrid.density.relative.to.bandwidth)

Arguments

X,Y

The T \times nbasis matrices of containing the coordinates, expressed in some functional basis, of the two FTS that to be compared. expressed in a basis.

B.T

The bandwidth of frequencies over which the periodogram operator is smoothed. If B.T=0, the periodogram operator is returned.

W

The weight function used to smooth the periodogram operator. Set by default to be the Epanechnikov kernel

autok

A variable used to specify if (and which) pseudo-AIC criterion is used to select the truncation parameter K.

subgrid.density

Only used if subgrid=TRUE. Specifies the approximate number of frequencies within the bandwidth over which the periodogram operator is smoothed.

verbose

A variable to show the progress of the computations. By default, verbose=0.

demean

A logical variable to choose if the FTS is centered before computing its spectral density operator.

K.fixed

The value of K used if autok=0.

subgrid.density.relative.to.bandwidth

logical parameter to specify if subgrid.density is specified relative to the bandwidth parameter B.T

Details

X,Y must be of equal size T.len \times d, where T.len is the length of the time series, and d is the number of basis functions. Each row corresponds to a time point, and each column corresponds to the coefficient of the corresponding basis function of the FTS.

autok=0 returns the p-values for K=1, …, \code{K.fixed}. autok=1 uses the AIC criterion of Tavakoli \& Panaretos (2015), which is a generalization of the pseudo-AIC introduced in Panaretos et al (2010). autok=2 uses the AIC* criterion of Tavakoli \& Panaretos (2015), which is an extension of the AIC criterion that takes into account the difficulty associated with the estimation of eigenvalues of a compact operator.

References

Tavakoli, Shahin and Panaretos, Victor M. "Detecting and Localizing Differences in Functional Time Series Dynamics: A Case Study in Molecular Biophysics", 2014, under revision

Panaretos, Victor M., David Kraus, and John H. Maddocks. "Second-order comparison of Gaussian random functions and the geometry of DNA minicircles." Journal of the American Statistical Association 105.490 (2010): 670-682.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
ma.scale2=ma.scale1=c(-1.4,2.3,-2)
ma.scale2[3] = ma.scale1[3]+.0
a1=Generate_filterMA(10, 10, MA.len=3, ma.scale=ma.scale1)
a2=Generate_filterMA(10, 10, MA.len=3, ma.scale=ma.scale2)
X=Simulate_new_MA(a1, T.len=512, noise.type='wiener')
Y=Simulate_new_MA(a2, T.len=512, noise.type='wiener')
ans0=Spec_compare_localize_freq(X, Y, W=Epanechnikov_kernel, autok=2,
subgrid.density=10, verbose=0, demean=FALSE,
subgrid.density.relative.to.bandwidth=TRUE)
plot(ans0)
plot(ans0, method='fdr')
PvalAdjust(ans0, method='fdr') ## print FDR adjusted p-values
abline(h=.05, lty=3)
ans0=Spec_compare_localize_freq(X, Y, W=Epanechnikov_kernel, autok=0,
subgrid.density=10, verbose=0, demean=FALSE,
subgrid.density.relative.to.bandwidth=TRUE, K.fixed=4) ## fixed values of K
plot(ans0)
plot(ans0, 'fdr')
plot(ans0, 'holm')
PvalAdjust(ans0, method='fdr')
rm(ans0)

ftsspec documentation built on May 1, 2019, 7:04 p.m.