Dear Kitty,
What I usually do when I want to generate a spatially varying variable
is to generate some points at random in the study area and then do a
kernel smoothing on those points. The values of my variable at (x,y) are
the values of the kernel smoothing at that point.
Hope this helps.
Virg
I conducted similar simulations using invIrM in the spdep package. Dr. Anselin
has a nice tutorial entitled Spatial Regression Analysis in R, A Workbook (
http://www.sal.uiuc.edu/stuff/stuff-sum/pdf/rex1.pdf ) (90 pp., 456K) at
http://www.sal.uiuc.edu/stuff/stuff-sum/tutorials where I began to
Yes, let me be more specific.
Say I have two variables, X and Y. I know that at the individual level, the
relationship between them is:
Y=a + bX+ error
I try to run some simulation where X is spatially clustered.
I can generate spatially clustered points, e.g.
nsp.u2<-pcp.sim(25,40,.001, sp