Testing the goodness-of-fit of the distributions given in a sevdist or a freqdist object to the loss data.
A data frame giving the losses (cell$Loss) and the user-defined period (cell$Period) in which the loss occured.
A loss severity model (sevdist object) or a loss frequency model (freqdist object)
If object is of type sevdist, then Anderson-Darling, Cramer-von-Mises and Kolmogorov-Smirnov test is performed on the loss data of a single cell and the respected fitted distribution given by the sevdist object.
If object is of type freqdist, then a χ^2 goodness-of-fit test will be performed.
If object is of type sevdist, then the return is a list with the test results from all three tests: [] Anderson-Darling, [] Cramer-von-Mises, [] Kolmogorow-Smirnov.
If object is of type freqdist, then the functions returns the result of the χ^2 test.
Refer with $p.value to the p-values and $statistic to the test statistic of each of the tests.
Marius Pfeuffer, Christina Zou
Anderson, Theodore W., and Donald A. Darling. Asymptotic theory of certain "goodness of fit" criteria based on stochastic processes. The annals of mathematical statistics (1952): 193-212.
Anderson, Theodore W., and Donald A. Darling. "A test of goodness of fit". Journal of the American statistical association 49.268 (1954): 765-769.
Birnbaum, Z. W., and Fred H. Tingey. "One-sided confidence contours for probability distribution functions". The Annals of Mathematical Statistics 22.4 (1951): 592-596.
Conover, William Jay, and William Jay Conover. "Practical nonparametric statistics" (1980).
Csorgo, Sandor, and Julian J. Faraway. "The exact and asymptotic distributions of Cramer-von Mises statistics". Journal of the Royal Statistical Society. Series B (Methodological) (1996): 221-234.
Durbin, James. "Distribution theory for tests based on the sample distribution function". Society for Industrial and Applied Mathematics, 1973.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
data("lossdat") opriskmodel = list() opriskmodel[] = list() opriskmodel[]$freqdist = fitFreqdist(lossdat[],"pois") opriskmodel[]$sevdist = fitPlain(lossdat[],"gamma") # perform test on the sevdist object goftest(lossdat[], opriskmodel[]$sevdist) # show result for e.g. only the Kolmogorow-Smirnov test test = goftest(lossdat[], opriskmodel[]$sevdist) test[]$p.value test[]$statistic # perform test on the freqdist object goftest(lossdat[], opriskmodel[]$freqdist) # the p-value is given by goftest(lossdat[], opriskmodel[]$freqdist)$p.value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.