utils.spautocor {dartR.spatial}R Documentation

Spatial autocorrelation coefficient calculations

Description

Carries out calculation for spatial autocorrelation coefficient starting from a genetic and geogaphic distance matrix.

Usage

utils.spautocor(
  GD,
  GGD,
  permutation = FALSE,
  bootstrap = FALSE,
  bins = 10,
  reps
)

Arguments

GD

Genetic distance matrix.

GGD

Geographic distance matrix.

permutation

Whether permutation calculations for the null hypothesis of no spatial structure should be carried out [default TRUE].

bootstrap

Whether bootstrap calculations to compute the 95% confidence intervals around r should be carried out [default TRUE].

bins

The number of bins for the distance classes (i.e. length(bins) == 1) or a vectors with the break points. See details [default 5].

reps

The number to be used for permutation and bootstrap analyses [default 100].

Details

The code of this function is based one spautocorr from the package PopGenReport, which has been modified to fix a few bugs (as of PopGenReport v 3.0.4 and allow calculations of bootstraps estimates.

See details from gl.spatial.autoCorr for a detailed explanation.

Value

Returns a data frame with the following columns:

  1. Bin The distance classes

  2. N The number of pairwise comparisons within each distance class

  3. r.uc The uncorrected autocorrelation coefficient

if both bootstap and permutation are FALSE otherwise only r estimates are returned

Author(s)

Carlo Pacioni & Bernd Gruber

References

See Also

gl.spatial.autoCorr

Examples

# See gl.spatial.autoCorr

[Package dartR.spatial version 0.78 Index]