Tests the null hypothesis that a benchmark forecasting method has conditional superior predictive ability over competing alternatives, uniformly across all conditioning states. Based on Li, Liao, and Quaedvlieg (2022).
Arguments
- Y
An
n x Jmatrix of loss differentials with respect to the benchmark. Positive values indicate the benchmark outperforms competitorjin periodt.- X
An
n x 1numeric vector of the conditioning variable.- level
Significance level (e.g., 0.05).
- trim
Trim observations where the conditioning variable exceeds this many standard deviations from the mean. Use
0(default) for no trimming.- prewhiten
Order of pre-whitening VAR for HAC estimation. Use
0for standard Newey-West, or-1(default) for AIC-based lag selection.- preselect
Logical; perform adaptive inequality selection? Default
TRUE.- R
Integer; number of bootstrap replications for critical value computation. Default
10000.
Value
A list with class "cspa_test" containing:
- theta
Infimum of the upper confidence bound. Negative values lead to rejection of the null.
- pvalue
P-value for the test.
- reject
Logical; whether the null is rejected at the given level.
- level
Significance level used.
- h_hat
Estimated conditional mean functions (
n x Jmatrix).- sigma_jx
Estimated standard deviations (
J x nmatrix).- kp
Critical value from adaptive inequality selection.
- Vhat
Logical matrix indicating selected (j, x) pairs.
- X
Conditioning variable (after trimming).
- Y
Loss differentials (after trimming).
- K
Number of series terms used.
- prewhiten_order
Pre-whitening lag order actually used.
