https://github.com/cran/spatstat
Raw File
Tip revision: c051fec12a8c32ed44640be5caf8ebff6657624a authored by Adrian Baddeley on 24 July 2011, 14:28:01 UTC
version 1.23-0
Tip revision: c051fec
NAinCov.R
# tests/NAinCov.R
# Testing the response to the presence of NA's in covariates

require(spatstat)
X <- runifpoint(42)
Y <- as.im(function(x,y) { x+y }, owin())
Y[owin(c(0.2,0.4),c(0.2,0.4))] <- NA
# fit model: should produce a warning but no failure
misfit <- ppm(X, ~Y, covariates=list(Y=Y))
# covariance matrix: all should be silent
v <- vcov(misfit)
ss <- vcov(misfit, what="internals")





back to top