rlgcp: Generate log-Gaussian Cox point patterns

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rlgcp.r

Description

Generate one (or several) realisation(s) of the log-Gaussian cox process in a region S x T.

Usage

1
2
3
 rlgcp(s.region, t.region, replace=TRUE, npoints=NULL, nsim=1, nx=100, 
 ny=100, nt=100,separable=TRUE,model="exponential",param=c(1,1,1,1,1,2),
 scale=c(1,1),var.grf=1,mean.grf=0,lmax=NULL,discrete.time=FALSE,exact=FALSE)

Arguments

s.region

two-column matrix specifying polygonal region containing all data locations. If s.region is missing, the unit square is considered.

t.region

vector containing the minimum and maximum values of the time interval. If t.region is missing, the interval [0,1] is considered.

npoints

number of points to simulate. If NULL, the number of points is from a Poisson distribution with mean the double integral of lambda(s,t) over s.region and t.region.

nsim

number of simulations to generate. Default is 1.

separable

Logical. If TRUE, the covariance function of the Gaussian random field is separable.

model

vector of length 1 or 2 specifying the model(s) of covariance of the Gaussian random field. If separable=TRUE and model is of length 2, then the elements of model define the spatial and temporal covariances respectively. If separable=TRUE and model is of length 1, then the spatial and temporal covariances belongs to the same class of covariances, among "matern", "exponential", "stable", "cauchy" and "wave" (see Details). If separable=FALSE, model must be of length 1 and is either "gneiting" or "cesare" (see Details).

param

(alpha1, alpha2,alpha3,alpha4,alpha5,alpha6). Vector of parameters of the covariance function (see Details).

scale

vector of length 2 defining the spatial and temporal scale.

var.grf

variance of the Gaussian random field.

mean.grf

mean of the Gaussian random field.

replace

logical allowing times repeat.

nx,ny,nt

define the size of the 3-D grid on which the intensity is evaluated.

lmax

upper bound for the value of lambda(x,y,t).

discrete.time

if TRUE, times belong to N, otherwise belong to R^+.

exact

logical allowing exact simulation of Gaussian random fields (see manual for details).

Details

We implemented stationary, isotropic spatio-temporal covariance functions.

Separable covariance functions

c(h,t) =c_s(||h||) c_t(|t|), h in S, t in T

The purely spatial and purely temporal covariance functions can be:

Non-separable covariance functions

The spatio-temporal covariance function can be:

Value

A list containing:

xyt

matrix (or list of matrices if nsim>1) containing the points (x,y,t) of the simulated point pattern. xyt (or any element of the list if nsim>1) is an object of the class stpp.

s.region, t.region

parameters passed in argument.

Lambda

nx * ny * nt array (or list of array if nsim>1) of the intensity.

Author(s)

Edith Gabriel <edith.gabriel@univ-avignon.fr>, Peter J Diggle.

References

Chan, G. and Wood A. (1997). An algorithm for simulating stationary Gaussian random fields. Applied Statistics, Algorithm Section, 46, 171–181.

Chan, G. and Wood A. (1999). Simulation of stationary Gaussian vector fields. Statistics and Computing, 9, 265–268.

Gneiting T. (2002). Nonseparable, stationary covariance functions for space-time data. Journal of the American Statistical Association, 97, 590–600.

See Also

plot.stpp, animation and stan for plotting space-time point patterns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# non separable covariance function: 
lgcp1 <- rlgcp(npoints=200, nx=50, ny=50, nt=50, separable=FALSE, model="gneiting",
 param=c(1,1,1,1,1,2), var.grf=1, mean.grf=0)
N <- lgcp1$Lambda[,,1];for(j in 2:(dim(lgcp1$Lambda)[3])){N <-
N+lgcp1$Lambda[,,j]}
## Not run: 
image(N,col=grey((1000:1)/1000));box()
animation(lgcp1$xyt, cex=0.8, runtime=10, add=TRUE, prevalent="orange")

## End(Not run)
# separable covariance function: 
lgcp2 <- rlgcp(npoints=200, nx=50, ny=50, nt=50, separable=TRUE, model="exponential",
 param=c(1,1,1,1,1,2), var.grf=2, mean.grf=-0.5*2)
N <- lgcp2$Lambda[,,1];for(j in 2:(dim(lgcp2$Lambda)[3])){N <-
N+lgcp2$Lambda[,,j]}
## Not run: 
image(N,col=grey((1000:1)/1000));box()
animation(lgcp2$xyt, cex=0.8, pch=20, runtime=10, add=TRUE,
prevalent="orange")

## End(Not run)

stpp documentation built on May 2, 2019, 4:50 p.m.