This function implements density goodness of fit procedure of Diebold et al. (1998).
PIT_test(U, G =20, alpha =0.05, plot =FALSE)
Arguments
U: numeric Vector of Probability Integral Transformation (PIT).
G: numeric Number of bins of the empirical cumulative density function of the PIT.
alpha: numeric Test confidence level.
plot: logical Indicates whether the istogram of the PIT has to be displaied. By defauld plot = FALSE.
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).
Returns
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.
The second element IID concerns the iid assumption, it is a list with elements:
test A named numeric 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 named numeric 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. tools:::Rd_expr_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. tools:::Rd_expr_doi("10.1080/07350015.1993.10509963") .