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, sploy)

where sploy is the boundary.

But after generating the points, how can I assign values of X and Y, such that 
when I run moran I on X and Y, I will get a high spatial autocorrelation values?

If I generate X and Y this way:

X<-runif(nrow(nsp.u2),20,150)
err<-rnorm(nrow(nsp.u2))
ratio<-.75
Y<-ratio*X+err

And then do cbind(nsp.u2, X, Y). The X and Y in the dataset are not spatially 
clustered.

Any ideas on how I can make X and Y spatially clustered?

Thanks!! 

K.





On Fri, 1 Jun 2007, Kitty Lee wrote:

> Dear R-users,
> 
> I'm trying to do some spatial simulation. I have two covariates, Z and
> C. I want to examine their relationship under different spatial
> distribution.
> 
> I have no problem simulating completely spatial random process but I'm
> totally stuck on poisson (cluster) pattern. I already have a dataset
> with Z and C (obs=575) and I know the relationship between them. Using
> these 575 cases, how can I simulate a clustered process and have a
> dataset that has four columns:
> 
> x-coor y-coor z c
> 
> I know I can use rpois or pcp.sim to generate points that clustered and
> then use cbind to attach Z and C values. But the problem is my
> observations will not be spatially clustered. How can I simulate so that
> now Z is spatially clustered?

Although you are not being very clear, I think that unless both Z and C
are marked point processes (ie. both take (discrete) values and are
observed at different points), this is not a spatial point process
problem. If Z and C are observed at the same points, and what you are
looking for are clusters of correlated values of Z with C, the clusters
are not the locations of the points, but rather the co-occurrence of
high/low values of Z and C respectively. How to go forward from here would
depend on what kind of process you are actually interested in. More 
detail might help - as might following up on R-sig-geo, rather than on the 
general list. 

> 
> Thanks!
> 
> K.
>  
>        
> ---------------------------------
> 
> 
>  [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

       
---------------------------------
Building a website is a piece of cake. 

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to