https://github.com/cran/spatstat
Raw File
Tip revision: 5d0edca8999a842af2ce258da8f917019ba84eb0 authored by Adrian Baddeley on 21 March 2011, 14:59:03 UTC
version 1.21-5.1
Tip revision: 5d0edca
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