csc.C3.test | R Documentation |
This function computes test of the equal predictive accuracy for cross-sectional clusters. It corresponds to C^{(3)}_{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 allows for strong cross-sectional dependence.
csc.C3.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.C1.test
data(forecasts)
y <- t(observed)
# just to reduce computation time restrict to energy commodities only
y <- y[1:8,]
f.bsr <- matrix(NA,ncol=ncol(y),nrow=8)
f.dma <- f.bsr
# extract prices predicted by BSR rec and DMA methods
for (i in 1:8)
{
f.bsr[i,] <- predicted[[i]][,1]
f.dma[i,] <- predicted[[i]][,9]
}
# 2 cross-sectional clusters: crude oil and other energy commodities
cs.cl <- c(1,4)
t <- csc.C3.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.