Skip to contents

gammahat(h_j) = (1/(2 N_h)) sum_i (Z(s_i) - Z(s_i + h))^2 over the pairs whose separation falls in distance class j.

Usage

Svariog(coords, z, breaks = NULL, nbins = 10, cutoff = NULL)

Arguments

coords

Locations, one row per observation.

z

Observed values (residuals for a varying-mean model).

breaks

Increasing distance-class boundaries, or NULL.

nbins

Number of classes when breaks is NULL.

cutoff

Largest separation; NULL uses one third of the maximum interpoint distance.

Value

List with gamma, np, dist, breaks, cutoff, n, npair.

References

Bivand, Pebesma and Gomez-Rubio (2013), Applied Spatial Data Analysis with R, 2nd edn, Equation (8.4), p. 218.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Svariog(V, V)
#> $gamma
#>  [1]  NA  NA  NA  NA 0.5  NA  NA  NA 2.0  NA
#> 
#> $np
#>  [1] 0 0 0 0 7 0 0 0 6 0
#> 
#> $dist
#>  [1] NA NA NA NA  1 NA NA NA  2 NA
#> 
#> $breaks
#>  [1] 0.0000000 0.2333333 0.4666667 0.7000000 0.9333333 1.1666667 1.4000000
#>  [8] 1.6333333 1.8666667 2.1000000 2.3333333
#> 
#> $cutoff
#> [1] 2.333333
#> 
#> $n
#> [1] 8
#> 
#> $npair
#> [1] 28
#> 
#> $method
#> [1] "Sample semivariogram (Bivand et al. 2013 eq. 8.4)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"