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? Thanks! K. --------------------------------- [[alternative HTML version deleted]]
On 02-Jun-07 01:06:48, 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? > > Thanks! > > K.Have a look at the package spatstat: Description: Spatial Point Pattern data analysis, modelling and simulation including multitype/marked points and spatial covariates It has a flexible repertoire of spatial point processes that you can simulate from. Best wishes, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 02-Jun-07 Time: 08:33:17 ------------------------------ XFMail ------------------------------
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