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

Description Usage Arguments Examples

View source: R/functional-spectral-density.R

Description

Compare the spectral density operator of two Functional Time Series and localize frequencies at which they differ, and (spatial) regions where they differ

Usage

1
2
Spec_compare_localize_freq_curvelength(X, Y, B.T = (dim(X)[1])^(-1/5), W,
  alpha = 0.05, accept = 0, reject = 1, verbose = 0, demean = FALSE)

Arguments

X

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.

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

alpha

level for the test

accept,reject

values for accepted, rejected regions

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ma.scale2=ma.scale1=c(-1.4,2.3,-2)
ma.scale2[3] = ma.scale1[3]+.4
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=2^9, noise.type='wiener')
Y=Simulate_new_MA(a2, T.len=2^9, noise.type='wiener')
ans0=Spec_compare_localize_freq_curvelength(X, Y, W=Epanechnikov_kernel, alpha=.01, demean=TRUE)
print(ans0)
plot(ans0)
rm(ma.scale1, ma.scale2, a1, a2, X, Y, ans0)

stavakol/ftsspec documentation built on May 30, 2019, 10:43 a.m.