psi {robcp} | R Documentation |
Transformation of time series
Description
Standardizes (multivariate) time series by their median, MAD and transforms the standardized time series by a \psi
function.
Usage
psi(y, fun = c("HLm", "HLg", "SLm", "SLg", "HCm", "HCg", "SCm", "SCg"), k,
constant = 1.4826)
Arguments
y |
vector or matrix with each column representing a time series (numeric). |
fun |
character string specifying the transformation function |
k |
numeric bound used for Huber type psi-functions which determines robustness and efficiency of the test. Default for |
constant |
scale factor of the MAD. |
Details
Let x = \frac{y - med(y)}{MAD(y)}
be the standardized values of a univariate time series.
Available \psi
functions are:
marginal Huber for location:
fun = "HLm"
.
\psi_{HLm}(x) = k * 1_{\{x > k\}} + x * 1_{\{-k \le x \le k\}} - k * 1_{\{x < -k\}}
.
global Huber for location:
fun = "HLg"
.
\psi_{HLg}(x) = x * 1_{\{0 < |x| \le k\}} + \frac{k x}{|x|} * 1_{\{|x| > k\}}
.
marginal sign for location:
fun = "SLm"
.
\psi_{SLm}(x_i) = sign(x_i)
.
global sign for location:
fun = "SLg"
.
\psi_{SLg}(x) = x / |x| * 1_{\{|x| > 0\}}
.
marginal Huber for covariance:
fun = "HCm"
.
\psi_{HCm}(x) = \psi_{HLm}(x) \psi_{HLm}(x)^T
.
global Huber for covariance:
fun = "HCg"
.
\psi_{HCg}(x) = \psi_{HLg}(x) \psi_{HLg}(x)^T
.
marginal sign covariance:
fun = "SCm"
.
\psi_{SCm}(x) = \psi_{SLm}(x) \psi_{SLm}(x)^T
.
gloabl sign covariance:
fun = "SCg"
.
\psi_{SCg}(x) = \psi_{SCg}(x) \psi_{SCg}(x)^T
.
Note that for all covariances only the upper diagonal is used and turned into a vector. In case of the marginal sign covariance, the main diagonal is also left out. For the global sign covariance matrix the last element of the main diagonal is left out.
Value
Transformed numeric vector or matrix with the same number of rows as y
.
Author(s)
Sheila Görz
See Also
Examples
psi(rnorm(100))