Learn R Programming

MultiHorizonSPA (version 1.0.0)

Test_aSPA: Test average Superior Predictive Ability

Description

Implements the test for average Superior Predictive Ability (aSPA) of Quaedvlieg (2021)

Usage

Test_aSPA(LossDiff, weights, L, B = 999)

Arguments

LossDiff

the T x H matrix forecast path loss differential

weights

the 1 x H vector of weights for the losses at different horizons. For instance weights <- matlab::ones(1,20)/20

L

integer, the parameter for the moving block bootstrap

B

integer, the number of bootstrap iterations. Default 999

Value

A list containing two objects:

"p_value"

the p-value for aSPA

"t_aSPA"

the statistics for aSPA

References

Quaedvlieg, Rogier. "Multi-horizon forecast comparison." Journal of Business & Economic Statistics 39.1 (2021): 40-53.

See Also

Test_uSPA

Examples

Run this code
# NOT RUN {
## Test for aSPA and uSPA
data(LossDiff_aSPA)
weights <- matlab::ones(1,20)/20
Test_aSPA(LossDiff=LossDiff_aSPA, weights=weights, L=3, B=10)

# }

Run the code above in your browser using DataLab