| inla.ks.plot {INLA} | R Documentation |
Illustrate a one-sample Kolmogorov-Smirnov test by plotting the empirical distribution deviation.
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 \pm
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
## 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)