| hypersimgrid {FieldSim} | R Documentation |
The function hypersimgrid yields discretization of sample path of a
Gaussian hyperboloïd indexed field on the S grid following the
procedure described in Brouste et al. (2009).
hypersimgrid(R,Ne=100,Nr=100,nbNeighbor=4,S)
R |
a covariance function (defined on the sphere) of a Random spherical field to simulate. |
Ne |
a positive integer. Ne is the number
of simulation points associated with the uniform distributed discretization
of the hyperboloïd for the first step of the algorithm (Accurate simulation step) |
Nr |
a positive integer. Nr is the number of simulation points
associated with the uniform distributed discretization
of the hyperboloïd for the second step of the algorithm (Refined simulation step). |
nbNeighbor |
a positive integer. nbNeighbor must be between 1 and 32.
nbNeighbor is the number of neighbors to use in the second step
of the algorithm. |
S |
a matrix with 3 rows and N columns. (S[1,n],S[2,n],S[3,n])
is the point of the hyperboloïd where the field must be simulated. |
The function hypersimgrid yields discretization of sample path of a
Gaussian hyperboloid indexed field associated with the covariance function given
by R.
A list with the following components:
S |
a matrix with 3 rows and N columns. (S[1,n],S[2,n],S[3,n])
is the point where the field has been simulated. |
Wg |
the vector of length at more N
containing the value of the simulated field at point
(S[1,n],S[2,n],S[3,n]) |
time |
the CPU time |
Alexandre Brouste (http://subaru.univ-lemans.fr/sciences/statist/pages_persos/Brouste/) and Sophie Lambert-Lacroix (http://ljk.imag.fr/membres/Sophie.Lambert/).
A. Brouste, J. Istas and S. Lambert-Lacroix (2009). On simulation of manifold indexed fractional Gaussian fields.
# Load FieldSim library
library(FieldSim)
## Define the grid
Z <- 2
n <- 30
phi <- Z/n*(0:(n-1))
theta <- 2*pi/n*(0:(n-1))
S <- numeric(0)
for (kk in 1:(n-1)){
S <- cbind(S,rbind(cos(theta[kk])*sinh(phi),sin(theta[kk])*sinh(phi),cosh(phi)))
}
## Define the autocovariance function
d<-function(x){
u <- -x[1]*x[4]-x[2]*x[5]+x[3]*x[6]
if (u<1){u<-1}
acosh(u)
}
R<-function(x){
H<-0.3
1/2*(d(c(0,0,1,x[1:3]))^{2*H}+d(c(0,0,1,x[4:6]))^{2*H}-d(x)^{2*H})
}
Wg <- hypersimgrid(R,Ne=50,Nr=100,nbNeighbor=4,S)$Wg