PIT_test {GAS} | R Documentation |
Goodness of fit for conditional densities
Description
This function implements density goodness of fit procedure of Diebold et al. (1998).
Usage
PIT_test(U, G = 20, alpha = 0.05, plot = FALSE)
Arguments
U |
|
G |
|
alpha |
|
plot |
|
Details
This function implements density goodness of fit procedure of Diebold et al. (1998). The test relays on the result that, if the series of estimated conditional distributions is the true one, then the PIT series evaluated accordingly are iid Unif(0, 1) distributed. The test of the iid Uniform(0, 1) assumption consists of two parts. The first part concerns the independent assumption, and it tests if all the conditional moments of the data, up to the fourth one, have been accounted for by the model, while the second part checks if the conditional distribution assumption is reliable by testing if the PITs are Uniform over the interval (0, 1). See also Jondeau and Rockinger (2006) and Vlaar and Palm (1993).
Value
A list
with elements: (i) Hist
and (ii) IID
. The fist element Hist
concerns
the test of the unconditional assumption of uniformity of the PIT, it is a list
with elements:
-
test
Statistic test. -
crit
The critical value of the test. -
pvalue
The pvalue of the test. -
hist
The histogram, evaluated using the hist function. -
confidence
Approximated asymptotic confidence level.
The second element IID
concerns the iid assumption, it is a list
with elements:
-
test
A namednumeric
vector with elements:test1
,test2
,test3
,test4
representing the Lagrange Multiplier test for the first four conditional moments of the PITs. -
crit
The critical value of the test. -
pvalue
A namednumeric
vector with elements:pvalue1
,pvalue2
,pvalue3
,pvalue4
representing the pvalues of the Lagrange Multiplier test for the first four conditional moments of the PITs.
Author(s)
Leopoldo Catania
References
Diebold FX, Gunther TA and Tay AS (1998).
"Evaluating Density Forecasts with Applications to Financial Risk Management."
International Economic Review, 39(4), 863-883.
Jondeau E and Rockinger M (2006).
"The Copula-Garch Model of Conditional Dependencies: An International Stock Market Application."
Journal of International Money and Finance, 25(5), 827-853.
doi: 10.1016/j.jimonfin.2006.04.007.
Vlaar PJ and Palm FC (1993). "The Message in Weekly Exchange Rates in the European Monetary System: Mean Reversion, Conditional Heteroscedasticity, and Jumps." Journal of Business & Economic Statistics, 11(3), 351-360. doi: 10.1080/07350015.1993.10509963.
Examples
data("StockIndices")
GASSpec = UniGASSpec(Dist = "std", ScalingType = "Identity",
GASPar = list(location = FALSE, scale = TRUE,
shape = FALSE))
FTSEMIB = StockIndices[, "FTSEMIB"]
Fit = UniGASFit(GASSpec, FTSEMIB)
U = pit(Fit)
Test = PIT_test(U, G = 20, alpha = 0.05, plot = TRUE)