Description Usage Arguments Value Author(s) See Also Examples
Generate one (or several) realisation(s) of the Poisson cluster process in a region S x T.
1 2 3  | 
s.region | 
 two-column matrix specifying polygonal region containing
all data locations.  
If   | 
t.region | 
 vector containing the minimum and maximum values of
the time interval. If   | 
nparents | 
 number of parents. If NULL,   | 
npoints | 
 number of points to simulate. If NULL (default), the
number of points is from a Poisson distribution with mean the double integral 
of the intensity over   | 
lambda | 
 intensity of the parent process. Can be either a numeric
value, a function, or a 3d-array (see   | 
mc | 
 average number of children per parent. It is used when
  | 
nsim | 
 number of simulations to generate.  | 
cluster | 
 distribution of children: “uniform”, “normal” and “exponential” are currently implemented. Either a single value if the distribution in space and time is the same, or a vector of length 2, giving first the spatial distribution of children and then the temporal distribution.  | 
dispersion | 
 scale parameter. It equals twice the standard deviation of location of children relative to their parent for a normal distribution of children; the mean for an exponential distribution and half range for an uniform distribution.  | 
infectious | 
 If TRUE, offspring's times are always greater than parent's time).  | 
edge | 
 specify the edge correction to use "larger.region" or "without".  | 
larger.region | 
 By default, the larger spatial region is the convex hull 
of   | 
tronc | 
 parameter of the truncated exponential distribution for the distribution of children.  | 
... | 
 additional parameters of the intensity of the parent process.  | 
A list containing:
xyt | 
 matrix (or list of matrices if   | 
s.region, t.region | 
 parameters passed in argument.  | 
Edith Gabriel <edith.gabriel@univ-avignon.fr>, Peter J Diggle.
plot.stpp, animation and stan for plotting space-time point patterns.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | # homogeneous Poisson distribution of parents
data(northcumbria)
pcp1 <- rpcp(nparents=50, npoints=500, s.region=northcumbria, t.region=c(1,365),
cluster=c("normal","exponential"), maxrad=c(5000,5))
## Not run: 
animation(pcp1$xyt, s.region=pcp1$s.region, t.region=pcp1$t.region,runtime=5)
## End(Not run)
# inhomogeneous Poisson distribution of parents
lbda <- function(x,y,t,a){a*exp(-4*y) * exp(-2*t)}
pcp2 <- rpcp(nparents=50, npoints=500, cluster="normal", lambda=lbda, 
a=4000/((1-exp(-4))*(1-exp(-2))))
## Not run: 
stan(pcp2$xyt)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.