csc.test {pEPA} | R Documentation |
Computes Test for Cross-Sectional Clusters.
Description
This function computes test of the equal predictive accuracy for cross-sectional clusters. 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 if either: K \ge 2
and significance level
\le 0.08326
, or 2 \le K \le 14
and significance level
\le 0.1
, or K = \{ 2,3 \}
and significance level
\le 0.2
, where K
denotes the number of time clusters.
Usage
csc.test(evaluated1,evaluated2,realized,loss.type="SE",cl,dc=FALSE)
Arguments
evaluated1 |
same as in |
evaluated2 |
same as in |
realized |
same as in |
loss.type |
same as in |
cl |
|
dc |
|
Value
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 |
References
Qu, R., Timmermann, A., Zhu, Y. 2024. Comparing forecasting performance with panel data. International Journal of Forecasting 40, 918–941.
See Also
Examples
data(forecasts)
y <- t(observed)
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]
f.dma[i,] <- predicted[[i]][,9]
}
# 2 cross-sectional clusters: energy commodities and non-energy commodities
cs.cl <- c(1,9)
t <- csc.test(evaluated1=f.bsr,evaluated2=f.dma,realized=y,loss.type="SE",cl=cs.cl)