optim.tuning | R Documentation |
As the title
optim.tuning(
X,
S,
h = 1,
length_tau = 5,
M_est = FALSE,
start.prob = 0.95,
...
)
X |
A |
S |
A strictly positive integer corresponding to the chosen number of non-overlapping blocks. |
h |
A strictly positive integer corresponding to how many neighboring blocks will be removed. |
length_tau |
A strictly positive integer corresponding to the length of the vector of candidate robustification parameters. |
M_est |
A |
start.prob |
A |
... |
Additional arguments. |
max.tau |
A positive |
A numeric
vector with each entry corresponds the selected robustification parameter for for each coordinate.
Haotian Xu and Stephane Guerrier
n = 100
p = 50
Sigma = diag(1, p)
set.seed(12345)
X = VAR1_simu(n = n, mu = rep(-5, p), skip = 300, Sigma.mat = Sigma, rho = 0.7, err.dist = "pareto")
cv_result = optim.tuning(X, S = 10, h = 1, length_tau = 10, M_est = FALSE)
tau_cv = median(cv_result)
max(abs(apply(X, 1, FUN = function(x){trunc_mean(x, tau_cv)}) - rep(-5,50)))
max(abs(apply(cbind(cv_result, X), 1, FUN = function(x){trunc_mean(x[-1], x[1])}) - rep(-5,50)))
max(abs(apply(X, 1, FUN = function(x){mean(x)}) - rep(-5,50)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.