Learn R Programming

GeoModels (version 2.2.1)

GeoTestsupp_space: Parametric bootstrap test for spatial support (scale)

Description

Performs a parametric bootstrap likelihood-ratio test on the spatial scale parameter using the compactly supported GenWend correlation model. Two hypotheses are compared: H0 imposes a maximum admissible scale (or independence), while H1 estimates scale freely. The test statistic is the likelihood ratio and the p-value is obtained by parametric bootstrap under H0.

Usage

GeoTestsupp_space(data, coordx,
                  start, fixed,
                  model = "Gaussian",
                  h0 = NULL,
                  optimizer = "bobyqa",
                  lower = NULL, upper = NULL,
                  neighb = 5,
                  B = 1000,
                  likelihood = NULL,
                  type = NULL,
                  method = "Cholesky",
                  parallel = TRUE,
                  ncores = NULL,
                  progress = TRUE)

Value

An (invisible) list with components:

d_min

Minimum inter-point distance \(d_{min}\).

h0

Threshold actually used under H0.

lambda_obs

Observed likelihood-ratio statistic \(\Lambda_{obs}\).

pvalue

Bootstrap p-value.

B_rep

Vector of bootstrap statistics \(\Lambda_b\) for valid replications.

fit_H0

GeoFit object fitted under H0.

fit_H1

GeoFit object fitted under H1.

Arguments

data

Numeric vector of observations of length n.

coordx

n x d matrix with spatial coordinates (at least 2 columns).

start

Named list of parameters to be estimated. Names must match CorrParam(corrmodel) and NuisParam(model).

fixed

Named list of parameters kept fixed. Together with start it must exactly cover the required set.

model

Marginal model for the data (default "Gaussian").

h0

Positive threshold for the scale parameter under H0. If NULL (default), H0 represents spatial independence with scale = h0_val set to the (adjusted) minimum inter-point distance.

optimizer

Optimization method passed to GeoFit (e.g., "bobyqa").

lower, upper

Named lists with bounds for parameters in start only. NULL means no extra bounds beyond defaults. Bounds are internally widened if too narrow.

neighb

Number of neighbors for composite likelihood when applicable. Ignored when the full likelihood is used.

B

Number of parametric bootstrap replications (default 1000).

likelihood

Type of (composite) likelihood to pass to GeoFit (e.g., "Marginal").

type

Composite-likelihood type (e.g., "Pairwise").

method

Simulation method for bootstrap under H0: "Cholesky" or "TB" (turning bands via GeoSimapprox).

parallel

If TRUE, bootstrap estimations are parallelized using future.

ncores

Number of cores for parallelization. If NULL, it is selected automatically up to B or parallel::detectCores()-1.

progress

If TRUE, progress bars are shown via progressr.

Details

The function fixes the correlation model to corrmodel = "GenWend" (generalized Wendland, compact support). Input validation ensures consistency of parameter names between start and fixed w.r.t. CorrParam(corrmodel) and NuisParam(model).

Automatic likelihood selection. If \(n > 10{,}000\), a composite-likelihood is used (likelihood = "Marginal", type = "Pairwise") with neighb neighbors; otherwise the full likelihood is used (likelihood = "Full", type = "Standard").

Threshold h0 and minimum distance. Let \(d_{min}\) be the minimum inter-point distance, computed with nabor. If h0 = NULL, the test defaults to independence with h0\_val = max(1e-6, d_min - 1e-6). Under H0 one enforces scale <= h0 (or scale = h0\_val for independence), while under H1 the scale is estimated freely but capped above by a large, data-driven U\_big.

Likelihood-ratio statistic. Let \(\Lambda_{obs} = \max\{0, 2(\ell_1 - \ell_0)\}\) where \(\ell_0\) and \(\ell_1\) are the log-(composite) likelihoods under H0 and H1. The null distribution of \(\Lambda\) is approximated via parametric bootstrap with B datasets simulated under H0; the p-value is computed as $$(1 + \#\{\Lambda_b \ge \Lambda_{obs}\}) / (1 + B_{valid}).$$

Early exit. If the unconstrained fit under H1 already satisfies scale <= h0 (or <= h0\_val), the function returns lambda\_obs = 0 and pvalue = 1 without running the bootstrap.

Robust bounds. The helper automatically widens degenerate or ultra-narrow boxes and enforces positivity for sill and scale.

See Also

GeoFit, GeoSim, GeoSimapprox, GeoVarestbootstrap