dateInfluence {Bchron} | R Documentation |
Find the influence of the dates in a Bchronology run
Description
This function takes as input a Bchronology
run and allows the user to estimate a value of 'influence' for either a particular date (by name or number), for all dates in a core (whichDate = 'all'
), or for all internal dates (whichDate = 'internal'
). It measures the influence by either the Kullback-Leibler divergence (KL
), the absolute mean difference (absMeanDiff
), or the absolute median difference (absMedianDiff
).
Usage
dateInfluence(
bchrRun,
whichDate = "all",
measure = c("KL", "absMeanDiff", "absMedianDiff")
)
Arguments
bchrRun |
The output of a run of the |
whichDate |
The chosen date to remove. Either |
measure |
Either |
Details
The KL
measure is preferred as it takes account of the full probability distributions but it lacks a simple interpretation. The best way to use it is with whichDate = 'all'
: the largest value corresponds to the most influential date in the chronology. For simpler interpretation use measure = 'absMeanDiff'
or measure = 'absMedianDiff'
as for these the influence is measured in years.
When the predictPositions from the original Bchronology
run do not include those of the date(s) being left out then the function uses the closest position and reports the change.
Value
Outputs some text providing the influence values for the date(s) in question. If given an assignment value also return a list containing all the probability distributions.
See Also
Bchronology
, summary.BchronologyRun
, coreInfluence
, choosePositions
Examples
data(Glendalough)
GlenOut <- Bchronology(
ages = Glendalough$ages,
ageSds = Glendalough$ageSds,
calCurves = Glendalough$calCurves,
positions = Glendalough$position,
positionThicknesses = Glendalough$thickness,
ids = Glendalough$id,
predictPositions = seq(0, 1500, by = 10)
)
dateInfluence(GlenOut, whichDate = 4, measure = "absMeanDiff")