Description Usage Arguments Details Value Author(s) Examples
Kolmogorov-Smirnov-Fits for BPAs.
1 |
val |
Data for K-S / C-M test |
ds |
BPA or handle of a pbox |
... |
Optional pbox parameters (points, BPAs) |
Evaluates the fit of a pbox using a Kolmogorov-Smirnov test
The method dskstest evaluates the fit of a pbox using a Kolmogorov-Smirnov test. The function works both on point values and interval data. The syntax is close to the R syntax for a probabilistic K-S test ks.test(). Both a BPA and a parametric pbox (in form of a CDF and a set of precise/imprecise parameters) can be tested.
The example generates a random set of points and a random set of intervals from a normal distribution (mean=0.3, sd=1.2). It tests, if a pbox with mean=[-0.5,0.5] and sd=1 fits the point data. In a second example, the user passes a normal CDF with parameters mean=0 and sd=[1,2] to the test. dskstest checks, if it fits the interval data.
BPA representing a pbox sampled from fhandle / K-S test results.
Philipp Limbourg <p.limbourg@uni-due.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 | data=rnorm(100,0.3,1.2)
intervaldata=cbind(data,data+runif(100,0,0.2))
mu=0; sigma=1
mu2=dsstruct(c(-0.5,0.5,1)); sigma2=dsstruct(c(1,2,1))
pbox=dsodf(qnorm,1000,mu2,sigma)
print("K-S result, pbox on data:")
ks=dskstest(data,pbox)
print(ks)
print("K-S result, precise mu, imprecise sigma on interval data:")
ks2=dskstest(intervaldata,pnorm,list(mu,sigma2))
print(ks2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.