View source: R/GeoTestIsotropy.R
| GeoTestIsotropy | R Documentation |
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,
parallel = TRUE,
ncores = NULL,
progress = TRUE)
data |
Numeric vector of observations (length |
coordx |
|
start |
Named list with the parameters to be estimated; names must match those expected by |
fixed |
Named list with the parameters kept fixed during estimation; together with |
optimizer |
Optimization algorithm to be used in |
model |
Marginal model for the data (e.g., |
corrmodel |
Spatial correlation model (e.g., |
lower, upper |
Named lists with lower/upper bounds for parameters in |
B |
Number of parametric bootstrap replications (default |
likelihood |
Type of (composite) likelihood to pass to |
type |
Composite-likelihood type (e.g., |
copula |
Copula object for simulation via |
neighb |
Number of neighbors for composite-likelihood estimation, where applicable. |
parallel |
If |
ncores |
Number of cores to use in parallel; if |
progress |
If |
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 function includes robust checks on parameter names, bounds, simulation method choice (Cholesky vs TB), and parallelization.
An (invisible) list with components:
statistic |
Observed LRT statistic. |
pvalue |
Bootstrap p-value. |
ratio_hat |
Estimated anisotropy ratio ( |
angle_hat |
Estimated anisotropy angle (radians/degrees according to |
corrmodel |
Correlation model used. |
model |
Marginal model used. |
fit_H0 |
|
fit_H1 |
|
B_rep |
Vector of LRT values obtained on the valid bootstrap replications. |
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
GeoFit, GeoSim, GeoSimapprox, GeoVarestbootstrap
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.