WAVK function

WAVK Statistic

WAVK Statistic

Statistic for testing the parametric form of a regression function, suggested by if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="Wang_etal_2008;textual",package="funtimes",cached_env=.Rdpack.currefs) .

WAVK(z, kn = NULL)

Arguments

  • z: filtered univariate time series if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="@see formula (2.1) by@Wang_VanKeilegom_2007",package="funtimes", cached_env=.Rdpack.currefs) :
Zi=(Yi+pj=1pϕ^j,nYi+pj)(f(θ^,ti+p)j=1pϕ^j,nf(θ^,ti+pj)), Z_i=\left(Y_{i+p}-\sum_{j=1}^p{\hat{\phi}_{j,n}Y_{i+p-j}} \right)-\left( f(\hat{\theta},t_{i+p})-\sum_{j=1}^p{\hat{\phi}_{j,n}f(\hat{\theta},t_{i+p-j})} \right),
where $Y_i$ is observed time series of length $n$, $\hat{\theta}$

is an estimator of hypothesized parametric trend $f(\theta, t)$, and $\hat{\phi}_p=(\hat{\phi}_{1,n}, \ldots, \hat{\phi}_{p,n})'$

are estimated coefficients of an autoregressive filter of order $p$. Missing values are not allowed.
  • kn: length of the local window.

Returns

A list with following components: - Tn: test statistic based on artificial ANOVA and defined by if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="Wang_VanKeilegom_2007;textual",package="funtimes",cached_env=.Rdpack.currefs)

as a difference of mean square for treatments (MST) and mean square for errors (MSE): 
Tn=MSTMSE=knn1t=1T(Vt.V..)21n(kn1)t=1nj=1kn(VtjVt.)2, T_n= MST - MSE =\frac{k_{n}}{n-1} \sum_{t=1}^T\biggl(\overline{V}_{t.}-\overline{V}_{..}\biggr)^2 -\frac{1}{n(k_{n}-1)} \sum_{t=1}^n \sum_{j=1}^{k_{n}}\biggl(V_{tj}-\overline{V}_{t.}\biggr)^2,
where $\{V_{t1}, \ldots, 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 $t$th group and the grand mean, respectively.
  • Tns: standardized version of Tn according to Theorem 3.1 by if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="Wang_VanKeilegom_2007;textual",package="funtimes",cached_env=.Rdpack.currefs) :
Tns=(nkn)12Tn/(43)12σ2,Tns=Tn(n/kn)0.5/(sigma2(4/3)0.5), T_{ns} = \left( \frac{n}{k_n} \right)^{\frac{1}{2}}T_n \bigg/\left(\frac{4}{3}\right)^{\frac{1}{2}} \sigma^2,Tns = Tn*(n/kn)^0.5 / (sigma^2 * (4/3)^0.5),
where $n$ is the length and $sigma^2$ is the variance of the time series. Robust difference-based Rice's estimator if(!exists(".Rdpack.currefs")) .Rdpack.currefs \<-new.env();Rdpack::insert_citeOnly(keys="Rice_1984",package="funtimes",cached_env=.Rdpack.currefs)

is used to estimate $sigma^2$.
  • p.value: pp-value for Tns based on its asymptotic N(0,1)N(0,1) distribution.

Examples

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

References

if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_all_ref(.Rdpack.currefs)

See Also

wavk_test

Author(s)

Yulia R. Gel, Vyacheslav Lyubchich

  • Maintainer: Vyacheslav Lyubchich
  • License: GPL (>= 2)
  • Last published: 2023-03-21

Useful links