generating points from random to overdispersed on a raster grid.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

generating points from random to overdispersed on a raster grid.

Patrick Giraudoux
Dear listers,

On a simulation purpose, I would like to generate data variying from
random to various degrees of overdispersion on a raster grid.  For
instance on a matrix 1000 x 1000, to select a number of pixels that
could be considered spatially aggregated (with a possibility for tuning
the degree of aggregation from "random" - no aggregation - to strong
clusters).

Has anyone heard about how to proceed or an idea about it?

Best,

Patrick



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: generating points from random to overdispersed on a raster grid.

Roger Bivand
Administrator
On Sat, 20 Jun 2020, Patrick Giraudoux wrote:

> Dear listers,
>
> On a simulation purpose, I would like to generate data variying from
> random to various degrees of overdispersion on a raster grid.  For
> instance on a matrix 1000 x 1000, to select a number of pixels that
> could be considered spatially aggregated (with a possibility for tuning
> the degree of aggregation from "random" - no aggregation - to strong
> clusters).
>
> Has anyone heard about how to proceed or an idea about it?
This sounds very much like spatstat, but could you provide a short code
example to show what the discretised output should be? Are these
presence/absence in the grid cells?

Best wishes,

Roger

>
> Best,
>
> Patrick
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: generating points from random to overdispersed on a raster grid.

Patrick Giraudoux
Le 22/06/2020 à 16:20, Roger Bivand a écrit :

> On Sat, 20 Jun 2020, Patrick Giraudoux wrote:
>
>> Dear listers,
>>
>> On a simulation purpose, I would like to generate data variying from
>> random to various degrees of overdispersion on a raster grid. For
>> instance on a matrix 1000 x 1000, to select a number of pixels that
>> could be considered spatially aggregated (with a possibility for tuning
>> the degree of aggregation from "random" - no aggregation - to strong
>> clusters).
>>
>> Has anyone heard about how to proceed or an idea about it?
>
> This sounds very much like spatstat, but could you provide a short
> code example to show what the discretised output should be? Are these
> presence/absence in the grid cells?
>
> Best wishes,
>
> Roger

Good point Roger. Actually some earlier answers helped be even to
clarify the problem in my mind... I did not realise at first there was
two hidden components in my question. I becomes clear that the way to 
adress the issue is scale dependent. If  the need is to simulate spatial
aggregation of points (e.g. vole colonies or vole individuals), thus we
probably need to dig in Akos' proposition and spatstat, indeed. If the
need is to simulate overdispersed densities (e.g. according to a e.g.
negbinomial distribution), thus selecting pixels randomly on a raster
and giving them the values computed on the negbinomial distribution
should make it. Both can be combined to obtain a perfect mess

The ball is now in my and collaborator's court !

Thanks anyway to responders who really helped be to go a step further
(below David Pleydell's answer, a former postdoc now researcher at INRA,
contacted directly off list, but this might be of interest or other
listers).


------------------------------------------------------------------------
Le 22/06/2020 à 13:01, David Pleydell a écrit :

Hi Patrick

(...)

Since the Poisson is a special case of negative binomial then why not?

https://en.wikipedia.org/wiki/Negative_binomial_distribution#Poisson_distribution

According to the above chunk of wikipedia, as r -> Inf the neg binomial
converges to Poisson. So in a spatial model you could include log(r) (or
log(1/r)) as a Gaussian random field (or Markov random field, or 2-D
spline etc etc).  You would need to give some thought as to how to
parameterise this - i.e. if there was no data would you
want over-dispersed vs Poisson to be equally likely, or should the prior
favour one or the other?

If this is a (modestly sized) spatial model it should be possible to use
the conditional-autoregressive (CAR) priors that Andrew Lawson has
written for nimble (https://r-nimble.org/nimbleExamples/CAR.html). These
are adaptations of what has previously been implemented in geo-BUGS
(with the added advantage of the flexibility and transparency of nimble).

One potential limit of this option is that under-dispersion is assumed
to not take place. So a slightly different approach would be needed
for potentially territorial animals (e.g. blackbirds). In this case a
gamma distribution could be more flexible: when scale=1 then
mean=variance, when scale <1 variance<mean, when scale>1 variance>mean.





        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo