The function BRISC_simulation simulates correlated data (known structure) using Nearest Neighbor
Gaussian Processes (NNGP). BRISC_simulation uses the sparse Cholesky representation of Vecchia’s
likelihood developed in Datta et al., 2016. BRISC_simulation uses BRISC_correlation
for this purpose.
BRISC_simulation(coords, sim_number = 1,
seeds = NULL, sigma.sq = 1,
tau.sq = 0, phi = 1, nu = 1.5,
n.neighbors = NULL, n_omp = 1,
cov.model = "exponential",
search.type = "tree",
stabilization = NULL,
verbose = TRUE, tol = 12)A list comprising of the following:
the matrix coords.
the used value of n.neighbors.
the used covariance model.
parameters of covarinace model; accounts for stabilization.
the \(n \times sim_number\) matrix of generated independent data. Here \(i^{th}\) column denotes the data corresponding to the \(i^{th}\) simulation.
the \(n \times sim_number\) matrix of generated correlated data. Here \(i^{th}\) column denotes the data corresponding to the \(i^{th}\) simulation.
time (in seconds) required after preprocessing data in R,
reported using,
proc.time().
an \(n \times 2\) matrix of the observation coordinates in \(R^2\) (e.g., easting and northing).
number of simulations. Default value is 1.
seeds which are used in generation of the initial independent data. Default value is NULL.
If non-null, the number of seeds must be equal to sim_number.
value of sigma square. Default value is 1.
value of tau square. Default value is 0.1.
value of phi. Default value is 1.
starting value of nu, only required for matern covariance model. Default value is 1.5.
number of neighbors used in the NNGP. Default value is 15.
number of threads to be used, value can be more than 1 if source code is compiled with OpenMP support. Default is 1.
keyword that specifies the covariance function to be used in modelling the spatial dependence structure
among the observations. Supported keywords are: "exponential", "matern", "spherical", and "gaussian"
for exponential, Matern, spherical and Gaussian covariance function respectively. Default value is "exponential".
keyword that specifies type of nearest neighbor search algorithm to be used. Supported keywords are:
"brute", "tree" and "cb".
"brute" and "tree" provide the same result, though
"tree" should be faster. "cb" implements fast code book search described in Ra and Kim (1993)
modified for NNGP. If locations do not have identical coordinate values on the axis used for the nearest neighbor
ordering (see order argument) then "cb" and "brute" should produce identical neighbor sets.
However, if there are identical coordinate values on the axis used for nearest neighbor ordering, then "cb"
and "brute" might produce different, but equally valid, neighbor sets, e.g., if data are on a grid.
Default value is "tree".
when we use a very smooth covarince model (lower values of phi for spherical and Gaussian
covariance and low phi and high nu for Matern covarinace) in absence of a non-negligble nugget, the correlation process may fail
due to computational instability. If stabilization = TRUE, performs stabilization by setting tau.sq = \(max{\code{tau
.sq}, \code{sigma.sq} * 1e-06}\). Default value is TRUE for cov.model = "expoenential" and FALSE otherwise.
if TRUE, model specifications along with information regarding OpenMP support and progress of the algorithm
is printed to the screen. Otherwise, nothing is printed to the screen. Default value is TRUE.
the input observation coordinates are rounded to this many places after the decimal. The default value is 12.
Arkajyoti Saha arkajyotisaha93@gmail.com,
Abhirup Datta abhidatta@jhu.edu
set.seed(1)
n <- 1000
coords <- cbind(runif(n,0,1), runif(n,0,1))
sigma.sq = 1
phi = 1
simulation_result <- BRISC_simulation(coords, sim_number = 3)
Run the code above in your browser using DataLab