| csms | R Documentation |
Constructs the confidence set for the most superior forecasting method
by inverting the CSPA test, as described in Section 2.3 of Li, Liao, and
Quaedvlieg (2022). The set contains all methods j for which the
CSPA null hypothesis (with j as benchmark) is not rejected.
csms(
losses,
X,
level,
trim = 0,
prewhiten = -1L,
preselect = TRUE,
R = 10000L,
method_names = NULL
)
losses |
An |
X |
An |
level |
Significance level (e.g., 0.05). |
trim |
Trimming parameter (standard deviations). Default |
prewhiten |
Pre-whitening order. Default |
preselect |
Logical; adaptive inequality selection. Default
|
R |
Integer; Gaussian process replications. Default |
method_names |
Optional character vector of method names. If
|
For each method j in 0, ..., J, the CSPA test is applied
with j as the benchmark. The confidence set is:
\widehat{\mathcal{M}}_{n,1-\alpha} = \{0 \le j \le J :
\text{CSPA test with } j \text{ as benchmark does not reject}\}
A list with class "csms" containing:
in_set |
Logical vector; which methods are in the confidence set. |
set_members |
Names of methods in the confidence set. |
theta |
Theta values for each method as benchmark. |
pvalues |
P-values for each method as benchmark. |
method_names |
Names of all methods. |
level |
Significance level. |
n_methods |
Total number of methods. |
Li, J., Liao, Z., and Quaedvlieg, R. (2022). Conditional Superior Predictive Ability. Review of Economic Studies, 89(2), 843-875.
set.seed(42)
n <- 300
X <- arima.sim(list(ar = 0.5), n = n, sd = sqrt(0.75))
losses <- matrix(rnorm(n * 4), n, 4)
csms(losses, X, level = 0.05, trim = 2, R = 500L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.