data(copper)
X <- copper$SouthPoints
D <- distmap(copper$SouthLines)
fit <- ppm(X, ~polynom(Z, 5), covariates=list(Z=D))
plot(effectfun(fit, "Z"))
plot(effectfun(fit, "Z", se.fit=TRUE), shade=c("hi", "lo"))
fit <- ppm(X, ~x + polynom(Z, 5), covariates=list(Z=D))
plot(effectfun(fit, "Z", x=20))
fit <- ppm(X, ~x)
plot(effectfun(fit, "x"))
Run the code above in your browser using DataLab