Skip to contents

A valid semivariogram satisfies sum_i sum_j a_i a_j gamma(s_i - s_j) <= 0 whenever sum a_i = 0 (Schabenberger & Gotway 2005, Problem 2.2). With P = I - J/m, the condition at the given sites is that the largest eigenvalue of P Gamma P on the sum-zero subspace is at most zero.

Usage

cndchk(gamma, tol = 1e-10)

Arguments

gamma

Symmetric m x m matrix of gamma(s_i - s_j).

tol

Relative tolerance, scaled by max |gamma|.

Value

Named list: max_eigenvalue, valid, m.

References

Schabenberger & Gotway (2005), Problem 2.2, p. 79.

Examples

d <- as.matrix(dist(cbind(1:4, c(0, 2, 1, 3))))
cndchk(d)$valid
#> [1] TRUE