R/dateInfluence.BchronologyRun.R
dateInfluence.Rd
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
).
dateInfluence(
bchrRun,
whichDate = "all",
measure = c("KL", "absMeanDiff", "absMedianDiff")
)
The output of a run of the Bchronology
function
The chosen date to remove. Either 'all'
which removes each date in turn, or 'internal'
which removes all but the top/bottom dates, or the date number (in the order same order as in argument 1), or the name of the date from the Bchronology run output file.
Either 'KL'
for Kullback Leibler divergence (recommended); or 'absMeanDiff'
or 'absMedianDiff'
for distances in years from the mean/median age respectively
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.
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.
# \donttest{
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)
)
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
dateInfluence(GlenOut, whichDate = 4, measure = "absMeanDiff")
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
#>
#> Influence of date: Beta-100900 is 260.47 using measure absMeanDiff
# }