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