Description Usage Arguments Details Value Author(s) See Also Examples
Illustrate a one-sample Kolmogorov-Smirnov test by plotting the empirical distribution deviation.
1 | inla.ks.plot(x, y, diff=TRUE, ...)
|
x |
a numeric vector of data values. |
y |
a cumulative distribution function such as 'pnorm'. |
diff |
logical, indicating if the normalised difference should be
plotted. If |
... |
additional arguments for |
In addition to the (normalised) empirical distribution deviation, lines for the K-S test statistic are drawn, as well as +/- two standard deviations around the expectation under the null hypothesis.
A list with class "htest"
, as generated by
ks.test
Finn Lindgren finn.lindgren@gmail.com
1 2 3 4 5 6 7 8 9 10 | ## Check for N(0,1) data
data = rowSums(matrix(runif(100*12)*2-1,100,12))/2
inla.ks.plot(data, pnorm)
## Not run:
## Check the goodness-of-fit of cross-validated predictions
result = inla(..., control.predictor=list(cpo=TRUE))
inla.ks.plot(result$pit, punif)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.