
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)
s.region
is missing, the unit square is considered.t.region
is missing, the interval [0,1] is considered.s.region
and t.region
.separable=TRUE
and
model
is of length 2, then the elements of model
define the
spatial and temporal covariances rnsim
>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
.nsim
>1)
of the intensity.Separable covariance functions
The purely spatial and purely temporal covariance functions can be:
Non-separable covariance functions
The spatio-temporal covariance function can be:
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.# 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]}
image(N,col=grey((1000:1)/1000));box()
animation(lgcp1$xyt, cex=0.8, runtime=10, add=TRUE, prevalent="orange")
# 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]}
image(N,col=grey((1000:1)/1000));box()
animation(lgcp2$xyt, cex=0.8, pch=20, runtime=10, add=TRUE,
prevalent="orange")
Run the code above in your browser using DataLab