iterateSites: Perform regression of dates versus distances from multiple...

Description Usage Arguments Value Examples

View source: R/spDates.R

Description

Perform regression of dates versus distances from multiple potential origins in order to find the best model. It is also possible to specify multiple distances for the spatial binning of the dates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
iterateSites(
  ftrSites,
  c14bp,
  origins,
  siteNames,
  binWidths = 0,
  nsim = 999,
  cost = NULL,
  method = "rma",
  ncores = 1
)

Arguments

ftrSites

A SpatialPointsDataFrame object with associated earliest C14 dates per site and respective calibrated distributions (CalDates objects) in a field named "cal".

c14bp

A string. Name of the field with the radiocarbon ages in C14 BP format.

origins

A SpatialPointsDataFrame object. The sites to be tested for the most likely origin of expansion.

siteNames

A string. Name of the field with the site names or ids for the potential origins.

binWidths

A number or vector of numbers. Width(s) of the spatial bins in km.

nsim

A number. Number of simulations to be run during the bootstrapping procedure. Default is 999.

cost

Optional. A RasterLayer with friction values to calculate least cost path distances instead of great circle distances.

method

A string. Method to be used in the regression. One of "rma" or "ols". Default is "rma".

ncores

A number. Number of cores used for parallel processing. Default is 1.

Value

a list with two elements, the result of the iteration over all potential origins and the best model selected among those.

Examples

1
2
3
data(neof)
data(centers)
iter <- iterateSites(neof, "C14Age", centers, "Site", binWidths=500)

jgregoriods/spDates documentation built on Oct. 10, 2020, 1:18 p.m.