Description Usage Arguments Details Value Author(s) References See Also Examples
Generate one (or several) realisation(s) of the log-Gaussian cox 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 |
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 |
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 |
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). |
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:
Exponential: c(r)=exp(-r),
Stable: c(r)=exp(-r alpha), alpha in [0,2],
Cauchy: c(r)=(1+r^2)^(-alpha), alpha > 0,
Wave: c(r)=sin(r)/r if r>0, c(0)=1,
Matern: c(r)={(alpha r)^nu}/{2^(nu-1) Gamma(nu)} K_nu(alpha r), nu>0 and alpha>0.
K_nu is the modified Bessel function of second kind:
K_nu(x) = (pi/2) * (I_(-alpha)(x) - I_nu(x))/sin(pi nu),
with I_nu(x) = (x/2)^nu sum_{k=0}^infty 1/(k! Gamma(nu+k+1)) (x/2)^(2k).
The parameters alpha1 and alpha2 correspond to the parameters of the spatial and temporal covariance respectively. For the Matern model, the parameters alpha1, alpha3 and alpha2, alpha4 correspond to the parameters nu, alpha of the spatial and temporal covariance.
Non-separable covariance functions
The spatio-temporal covariance function can be:
gneiting: c(h,t)=psi(t/beta2)^(-alpha6) phi( (h/beta1)/psi(t/beta2) ), beta1, beta2 >0,
If alpha2=1, phi(r) is the Stable model.
if alpha2=2, phi(r) is the Cauchy model.
If alpha2=3, phi(r) is the Matern model.
If alpha5=1, psi^2(r) = (r^alpha3+1)^alpha4,
If alpha5=2, psi^2(r) = (alpha4^(-1) r^alpha3 +1)/(r^alpha3+1),
If alpha5=3, psi^2(r) = -log(r^alpha3+1/alpha4)/ log(alpha4),
The parameter alpha1 is the respective parameter for the model of phi(.), alpha3 in (0,2], alpha4 in (0,1] and alpha6 >= 2.
cesare: c(h,t) = (1 + (h/beta1)^alpha1 + (t/beta2)^alpha2)^(-alpha3), beta1, beta2 >0, alpha1, alpha2 in [1,2] and alpha3 >= 3/2.
A list containing:
xyt |
matrix (or list of matrices if |
s.region, t.region |
parameters passed in argument. |
Lambda |
nx * ny * nt array (or list of array if |
Edith Gabriel <edith.gabriel@univ-avignon.fr>, Peter J Diggle.
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.
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 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.