Hi,

I appreciate if any one could give me clues about the following problem.

I have a map data, x, y, z, and d, where (x,y) is the coordinate of a 
point and d is a distance from the urban center (0,0), and z is 
population density.  Then I would like to calculate local standard 
deviations of these points.  Let me say hypothetically,

x <- rnorm(100)
y <- rnorm(100)
z <- runif(100)
d <- sqrt(x^2+y^2)*runif(100,1,1.5)

mod <- gam(z~s(x,y,by=d))

std.res.loc <- residuals/loc.std

So, I would like to calculate loc.std.  Is there any function available 
for this? Or should I manually compute it?

I am reading "Generalized Additive Model: Introduction to R" by Dr. Wood.

Thank you very much.

Tk

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to