
Last chance! 50% off unlimited learning
Sale ends in
## S3 method for class 'kstest':
plot(x, ...,
lwd=par("lwd"), col=par("col"), lty=par("lty"),
lwd0=lwd, col0=col, lty0=lty)
"kstest"
produced by a method for kstest
.plot.default
.NULL
.plot
method for the class "kstest"
.
An object of this class represents the outcome of
a spatial Kolmogorov-Smirnov test, computed by kstest
.The plot displays the two cumulative distribution functions that are compared by the test: namely the empirical cumulative distribution function of the covariate at the data points, and the predicted cumulative distribution function of the covariate under the model, both plotted against the value of the covariate.
kstest
# synthetic data: nonuniform Poisson process
X <- rpoispp(function(x,y) { 100 * exp(x) }, win=square(1))
# fit uniform Poisson process
fit0 <- ppm(X, ~1)
# test covariate = x coordinate
xcoord <- function(x,y) { x }
# test wrong model
k <- kstest(fit0, xcoord)
# plot result of test
plot(k, lwd0=3)
Run the code above in your browser using DataLab