# WAVK: WAVK Statistic In funtimes: Functions for Time Series Analysis

## Description

Statistic for testing the parametric form of a regression function, suggested by \insertCiteWang_etal_2008;textualfuntimes.

## Usage

 1 WAVK(z, kn = NULL) 

## Arguments

 z pre-filtered univariate time series \insertCite@see formula (2.1) by @Wang_VanKeilegom_2007funtimes: Z_i=≤ft(Y_{i+p}-∑_{j=1}^p{\hat{φ}_{j,n}Y_{i+p-j}} \right)- ≤ft( f(\hat{θ},t_{i+p})- ∑_{j=1}^p{\hat{φ}_{j,n}f(\hat{θ},t_{i+p-j})} \right), where Y_i is observed time series of length n, \hat{θ} is an estimator of hypothesized parametric trend f(θ, t), and \hat{φ}_p=(\hat{φ}_{1,n}, …, \hat{φ}_{p,n})' are estimated coefficients of an autoregressive filter of order p. Missing values are not allowed. kn length of the local window.

## Value

A list with following components:

 Tn test statistic based on artificial ANOVA and defined by \insertCiteWang_VanKeilegom_2007;textualfuntimes as a difference of mean square for treatments (MST) and mean square for errors (MSE): T_n= MST - MSE =\frac{k_{n}}{n-1} ∑_{t=1}^T \biggl(\overline{V}_{t.}-\overline{V}_{..}\biggr)^2 - \frac{1}{n(k_{n}-1)} ∑_{t=1}^n ∑_{j=1}^{k_{n}}\biggl(V_{tj}-\overline{V}_{t.}\biggr)^2, where \{V_{t1}, …, V_{tk_n}\}=\{Z_j: j\in W_{t}\}, W_t is a local window, \overline{V}_{t.} and \overline{V}_{..} are the mean of the tth group and the grand mean, respectively. Tns standardized version of Tn according to Theorem 3.1 by \insertCiteWang_VanKeilegom_2007;textualfuntimes: Tns = Tn*(n/kn)^0.5 / (sigma^2 * (4/3)^0.5), where n is length and sigma^2 is variance of the time series. Robust difference-based Rice's estimator \insertCiteRice_1984funtimes is used to estimate sigma^2. p.value p-value for Tns based on its asymptotic N(0,1) distribution.

## Author(s)

Yulia R. Gel, Vyacheslav Lyubchich

## References

\insertAllCited

wavk_test

## Examples

 1 2 z <- rnorm(300) WAVK(z, kn = 7) 

funtimes documentation built on Nov. 28, 2020, 1:06 a.m.