Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rcellnumber

Generate Random Numbers of Points for Cell Process


Description

Generates random integers for the Baddeley-Silverman counterexample.

Usage

rcellnumber(n, N = 10, mu=1)

Arguments

n

Number of random integers to be generated.

N

Distributional parameter: the largest possible value (when mu <= 1). An integer greater than 1.

mu

Mean of the distribution (equals the variance). Any positive real number.

Details

If mu = 1 (the default), this function generates random integers which have mean and variance equal to 1, but which do not have a Poisson distribution. The random integers take the values 0, 1 and N with probabilities 1/N, (N-2)/(N-1) and 1/(N(N-1)) respectively. See Baddeley and Silverman (1984).

If mu is another positive number, the random integers will have mean and variance equal to mu. They are obtained by generating the one-dimensional counterpart of the cell process and counting the number of points in the interval from 0 to mu. The maximum possible value of each random integer is N * ceiling(mu).

Value

An integer vector of length n.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

References

Baddeley, A.J. and Silverman, B.W. (1984) A cautionary example on the use of second-order methods for analyzing point patterns. Biometrics 40, 1089-1094.

See Also

Examples

rcellnumber(30, 3)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.