generateAoristicData: Generate aoristic data

Description Usage Arguments Value Examples

View source: R/AoristicFunctions.R

Description

This function generates aoristic circular data from a true distribution generation function and two function to generate the lower and upper distances from the true point.

Usage

1
2
3
4
5
generateAoristicData(n = 30, trueDistGen = function(n)
  as.numeric(suppressWarnings(circular::rvonmises(n, 1, 10))),
  intervalSampler = function(n) runif(n, 0, 2),
  LBSampler = intervalSampler, UBSampler = intervalSampler,
  aoristicProportion = 1)

Arguments

n

The desired sample size.

trueDistGen

A function that takes a single argument n and samples n random values from the desired true distribution.

intervalSampler

A function that takes a single argument n and samples n random values that determine how far away the interval bounds are from the true sampled datapoint on either side. By default the same function is used on both sides, but this can be overwritten by specifying LBSampler and UBSampler.

LBSampler

Optional function of the same form as intervalSampler that specifies the way in which the distance between the lower bound and the true value is sampled. Should sample positive values which represent the difference.

UBSampler

Optional function of the same form as intervalSampler that specifies the way in which the distance between the upper bound and the true value is sampled.Should sample positive values which represent the difference.

Value

A data frame containing the start, end, and true values.

Examples

1

keesmulder/aoristicinference documentation built on May 4, 2019, 3:17 p.m.