Performs an isotropy test based on parametric bootstrap by comparing an isotropic model (H0) with an anisotropic model (H1). A user-chosen spatial correlation model is fitted to spatial data, and the test statistic is a likelihood ratio between H1 (with anisotropy estimated) and H0 (anisotropy fixed at ratio = 1 and angle = 0). The p-value is computed via parametric bootstrap.
GeoTestIsotropy(data, coordx,
start, fixed,
optimizer = "bobyqa",
model = "Gaussian",
corrmodel = "Matern",
lower = NULL, upper = NULL,
B = 1000,
likelihood = NULL,
type = NULL,
copula = NULL,
neighb = 5,
method = c("cholesky", "TB"),
L = 1000,
parallel = TRUE,
ncores = NULL,
progress = TRUE,
seed = NULL)An (invisible) list with components:
Observed LRT statistic.
Bootstrap p-value.
Estimated anisotropy ratio (> 1 indicates stretching along the principal axis).
Estimated anisotropy angle (radians/degrees according to GeoFit convention).
Correlation model used.
Marginal model used.
GeoFit object fitted under H0.
GeoFit object fitted under H1.
Vector of LRT values obtained on the valid bootstrap replications.
Seed used for the bootstrap, or NULL if no seed was supplied.
Numeric vector of observations (length n).
n x d matrix with the spatial coordinates of the sites (at least 2 columns for anisotropy analysis).
Named list with the parameters to be estimated; names must match those expected by CorrParam(corrmodel) and NuisParam(model).
Named list with the parameters kept fixed during estimation; together with start it must exactly cover the required set of parameters.
Optimization algorithm to be used in GeoFit (e.g., "bobyqa").
Marginal model for the data (e.g., "Gaussian").
Spatial correlation model (e.g., "Matern").
Named lists with lower/upper bounds for parameters in start only. If NULL, no extra bounds beyond defaults.
Number of parametric bootstrap replications (default 1000).
Simulation method used for the parametric bootstrap when copula = NULL. Options are "cholesky" for exact Gaussian simulation via GeoSim and "TB" for approximate spectral turning-bands simulation via GeoSimapprox.
Number of spectral components used by GeoSimapprox when method = "TB". Ignored when method = "cholesky".
Type of (composite) likelihood to pass to GeoFit (e.g., "Marginal").
Composite-likelihood type (e.g., "Pairwise").
Copula object for simulation via GeoSimCopula; if NULL Gaussian simulation is used.
Number of neighbors for composite-likelihood estimation, where applicable.
If TRUE, parametric simulations with GeoSimapprox and bootstrap fits are allowed to use parallel execution through future. The two phases are run sequentially, with the previous future plan restored between them.
Number of cores to use in parallel; if NULL it is chosen automatically up to B or parallel::detectCores()-1.
If TRUE, show progress bars using progressr.
Optional integer seed used to make the parametric bootstrap reproducible. If NULL, the current random-number generator state is left unchanged. When supplied, the function temporarily sets the seed and restores the user's original .Random.seed on exit.
Moreno Bevilacqua moreno.bevilacqua89@gmail.com https://sites.google.com/view/moreno-bevilacqua/home
Víctor Morales Oñate victor.morales@uv.cl https://sites.google.com/site/moralesonatevictor/
Christian Caamaño-Carrillo chcaaman@ubiobio.cl https://www.researchgate.net/profile/Christian-Caamano
GeoTestIsotropy implements a likelihood ratio test (LRT) between:
H0: isotropic model with anisotropy parameters fixed at angle = 0, ratio = 1;
H1: anisotropic model with angle and ratio estimated.
The observed statistic is \(\mathrm{LRT}_{\text{obs}} = 2(\ell_1 - \ell_0)\), truncated at zero if negative.
The null distribution is approximated by simulating B datasets under H0 with parameters equal to the H0 fit, and recomputing the LRT.
The p-value is computed as \((1 + \#\{\mathrm{LRT}_b \ge \mathrm{LRT}_{\text{obs}}\}) / (1 + B_{\text{valid}})\).
The simulation method is selected explicitly through method. For method = "cholesky", simulations are generated with GeoSim; for method = "TB", simulations are generated with GeoSimapprox using L spectral components. If parallel = TRUE, GeoSimapprox may parallelize over the B simulated replications, and the bootstrap refits may then be parallelized in a separate phase. The function saves and restores the user's future plan and progressr handlers.
If seed is supplied, the function temporarily calls set.seed(seed) before the observed fits, H0 simulations, and bootstrap refits. The previous random-number generator state is restored on exit, so using seed does not permanently modify the user's R session RNG state.
GeoVariogram for empirical variograms,
GeoVariogramDir for directional variograms,
GeoFit for covariance-model fitting.