psi {robcp} | R Documentation |
Computation of values tranformed by their median, MAD and a ψ function.
psi(y, fun = "HLm", k, constant = 1.4826)
y |
vector or matrix with each column representing a time series (numeric). |
fun |
character string specifiyng 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. |
Let x = (y - Median(y)) / MAD(y) be the standardized values of a single time series.
Available ψ functions are:
marginal Huber for location:
fun = "HLm"
.
ψ_{HLm}(x) = k * 1_{x > k} + z * 1_{-k ≤ x ≤ k} - k * 1_{x < -k}.
global Huber for location:
fun = "HLg"
.
ψ_{HLg}(x) = x * 1_{0 < |x| ≤ k} + k* x/|x| * 1_{|x| > k}.
marginal sign for location:
fun = "VLm"
.
ψ_{VLm}(x_i) = sign(x_i).
global sign for location:
fun = "VLg"
.
ψ_{VLg}(x) = x / |x| * 1_{|x| > 0}.
marginal Huber for covariance:
fun = "HCm"
.
ψ_{HCm}(x) = ψ_{HLm}(x) ψ_{HLm}(x)^T.
global Huber for covariance:
fun = "HCg"
.
ψ_{HCg}(x) = ψ_{HLg}(x) ψ_{HLg}(x)^T.
marginal sign covariance:
fun = "VCm"
.
ψ_{VCm}(x) = ψ_{VLm}(x) ψ_{VLm}(x)^T.
gloabl sign covariance:
fun = "VCg"
.
ψ_{VCg}(x) = ψ_{VCg}(x) ψ_{VCg}(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. At the global sign covariance matrix the last element of the main diagonal is left out.
Transformed numeric vector or matrix with the same number of rows as y
.
Sheila Görz
psi(rnorm(100))