csc.C1.test | R Documentation |
This function computes test of the equal predictive accuracy for cross-sectional clusters. It corresponds to C^{(1)}_{nT}
statistic in the referenced paper by Akgun et al. (2024). The null hypothesis of this test is that a pair of forecasts have the same expected accuracy among cross-sectional clusters. However, their predictive accuracy can be different across the clusters, but the same among each cluster. The test is suitable for situations with cross-sectional independence.
csc.C1.test(evaluated1,evaluated2,realized,loss.type="SE",cl)
evaluated1 |
same as in |
evaluated2 |
same as in |
realized |
same as in |
loss.type |
same as in |
cl |
|
class htest
object, list
of
statistic |
test statistic |
parameter |
|
alternative |
alternative hypothesis of the test |
p.value |
p-value |
method |
name of the test |
data.name |
names of the tested data |
Akgun, O., Pirotte, A., Urga, G., Yang, Z. 2024. Equal predictive ability tests based on panel data with applications to OECD and IMF forecasts. International Journal of Forecasting 40, 202–228.
pool_av.test
, csc.C3.test
data(forecasts)
y <- t(observed)
# just to save time
y <- y[,1:40]
f.bsr <- matrix(NA,ncol=ncol(y),nrow=56)
f.dma <- f.bsr
# extract prices predicted by BSR rec and DMA methods
for (i in 1:56)
{
f.bsr[i,] <- predicted[[i]][1:40,1]
f.dma[i,] <- predicted[[i]][1:40,9]
}
# 2 cross-sectional clusters: energy commodities and non-energy commodities
cs.cl <- c(1,9)
t <- csc.C1.test(evaluated1=f.bsr,evaluated2=f.dma,realized=y,loss.type="SE",cl=cs.cl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.