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.
Usage
csms(
losses,
X,
level,
trim = 0,
prewhiten = -1L,
preselect = TRUE,
R = 10000L,
method_names = NULL
)Arguments
- losses
An
n x (J+1)matrix where each column contains the loss series for a forecasting method. All methods are treated symmetrically (no pre-specified benchmark).- X
An
n x 1numeric vector of the conditioning variable.- level
Significance level (e.g., 0.05).
- trim
Trimming parameter (standard deviations). Default
0.- prewhiten
Pre-whitening order. Default
-1(AIC).- preselect
Logical; adaptive inequality selection. Default
TRUE.- R
Integer; Gaussian process replications. Default
10000.- method_names
Optional character vector of method names. If
NULL, uses"M1", "M2", ....
Value
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.
Details
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}\}$$
