fport_wn: White Noise Hypothesis Tests for Functional Times Series

View source: R/fport_wn.R

fport_wnR Documentation

White Noise Hypothesis Tests for Functional Times Series

Description

It computes a variety of white noise tests for functional times series (FTS) data. All white noise tests in this package are accessible through this function.

Usage

fport_wn(
  f_data,
  test = "autocovariance",
  H = 10,
  iid = FALSE,
  M = NULL,
  stat_Method = "functional",
  pplot = FALSE
)

Arguments

f_data

A J \times N matrix of functional time series data, where J is the number of discrete points in a grid and N is the sample size.

test

A string specifying the hypothesis test. Currently available tests are referred to by their string handles: "autocovariance", "spherical" and "ch". Please see the Details section of the documentation.

H

A positive integer specifying the maximum lag for which test statistics are computed.

iid

A Boolean value used in the "autocovariance" test. If given TRUE, the hypothesis test will use the strong-white noise (SWN) assumption instead of the weak white noise (WWN) assumption.

M

A positive integer specifying the number of Monte Carlo simulations used to approximate the null distribution in the "autocovariance" test under the WWN assumption. If M = NULL, M = \text{floor}((\max(150 - N, 0) + \max(100 - J, 0) + (J / \sqrt{2}))), ensuring that the number of Monte Carlo simulations is adequate based on the dataset size.

stat_Method

A string specifying the test method to be used in the "ch" test. Options include:

"norm"

Uses V_{N,H}.

"functional"

Uses M_{N,H}.

pplot

A Boolean value. If TRUE, the function will produce a plot of p-values of the test as a function of maximum lag H, ranging from H=1 to H=20, which may increase the computation time.

Details

This function performs white noise hypothesis testing for functional time series (FTS) data. It offers several types of tests:

1. Test based on fACF (test = "autocovariance"): This test evaluates the sum of the squared L^2-norm of the sample autocovariance kernels:

KRS_{N,H} = N \sum_{h=1}^H \|\hat{\gamma}_{N,h}\|^2,

where \hat{\gamma}_{N,h}(t,s)=\frac{1}{N}\sum_{i=1}^{N-h} (X_i(t)-\bar{X}_N(t))(X_{i+h}(s)-\bar{X}_N(s)), \bar{X}_N(t) = \frac{1}{N} \sum_{i=1}^N X_i(t) It assesses the cumulative significance of lagged autocovariance kernels up to a user-specified maximum lag H. A higher value of KRS_{N,H} suggests a potential departure from a white noise process. The null distribution is approximated under both strong and weak white noise assumptions. Optional parameters include 'f_data', 'test', 'H', 'iid', 'M', and 'pplot'.

2. Test based on fSACF (test = "spherical"): This test evaluates the sum of the squared L^2-norm of the sample spherical autocorrelation coefficients:

S_{N,H} = N \sum_{h=1}^H \|\tilde{\rho}_{h}\|^2,

where \tilde\rho_h=\frac{1}{N}\sum_{i=1}^{N-h} \langle \frac{X_i - \tilde{\mu}}{\|X_i - \tilde{\mu}\|}, \frac{X_{i+h} - \tilde{\mu}}{\|X_{i+h} - \tilde{\mu}\|} \rangle, and \tilde{\mu} is the estimated spatial median of the series. It assesses the cumulative significance of lagged spherical autocorrelation coefficients up to a user-specified maximum lag H. A higher value of S_{N,H} suggests a potential departure from a white noise process. The null distribution is approximated under strong white noise assumptions. Optional parameters include 'f_data', 'test', 'H', and 'pplot'.

3. Test for Conditional Heteroscedasticity (test = "ch"): This test investigates whether the functional time series exhibits conditional heteroscedasticity. Two portmanteau-type statistics are used:

  • Norm-based statistic: V_{N,H} = N \sum_{h=1}^H \hat{\gamma}^2_{X^2}(h), where \hat{\gamma}^2_{X^2}(h) is the sample autocorrelation of the time series ||X_1||^2, \dots, ||X_N||^2, with H as the maximum lag length.

  • Fully functional statistic: M_{N,H} = N \sum_{h=1}^H \|\hat{\gamma}_{X^2,N,h}\|^2, where \hat{\gamma}_{X^2,N,h}(t,s) = \frac{1}{N} \sum_{i=1}^{N-h} [X_i^2(t) - \bar{X}^2(t)][X^2_{i+h}(s) - \bar{X}(s)], with \|\cdot\| representing the L^2 norm and \bar{X}^2(t) = \frac{1}{N} \sum_{i=1}^N X_i^2(t).

Optional parameters for this test include 'f_data', 'test', 'H', 'stat_Method', and 'pplot'.

Value

A summary is printed with a brief explanation of the test and the p-value.

References

[1] Kokoszka P., Rice G., Shang H.L. (2017). Inference for the autocovariance of a functional time series under conditional heteroscedasticity. Journal of Multivariate Analysis, 162, 32-50.

[2] Yeh CK, Rice G, Dubin JA (2023). “Functional spherical autocorrelation: A robust estimate of the autocorrelation of a functional time series.” Electronic Journal of Statistics, 17, 650–687.

[3] Rice, G., Wirjanto, T., Zhao, Y. (2020). Tests for conditional heteroscedasticity of functional data. Journal of Time Series Analysis. 41(6), 733-758. <doi:10.1111/jtsa.12532>.

Examples


data(Spanish_elec)
fport_wn(Spanish_elec, test = "autocovariance", pplot = TRUE)
fport_wn(Spanish_elec, test = "spherical", H = 15, pplot = TRUE)

# generate fARCH(1)
yd_arch <- dgp.fgarch(J = 50, N = 200, type = "arch")$garch_mat
fport_wn(yd_arch, test = "ch", H = 20, stat_Method = "norm", pplot = TRUE)
fport_wn(yd_arch, test = "ch", H = 20, stat_Method = "functional", pplot = TRUE)




FTSgof documentation built on Oct. 4, 2024, 1:06 a.m.