powered by
Calculate highest posterior density ranges of a calibrated distribution
hpd( calib, prob = 0.95, return.raw = FALSE, BCAD = FALSE, ka = FALSE, age.round = 0, prob.round = 1, every = 0.1, bins = 20, add.zeros = FALSE )
The highest posterior density ranges, as three columns: from age, to age, and the corresponding percentage(s) of the range(s)
The calibrated distribution, as returned from caldist()
Probability range which should be calculated. Default prob=0.95.
prob=0.95
The raw data to calculate hpds can be returned, e.g. to draw polygons of the calibrated distributions. Defaults to return.raw=FALSE.
return.raw=FALSE
Which calendar scale to use. Defaults to cal BP, BCAD=FALSE.
BCAD=FALSE
Whether to report results in years (default) or as ka
Rounding for ages. Defaults to 0 decimals.
Rounding for reported probabilities. Defaults to 1 decimal.
Yearly precision (defaults to 0.1, as a compromise between speed and accuracy).
The number of bins required. Any distribution with fewer bins gets recalculated using 100 narrower bins.
Pad the distribution with zeros at both extremes. Can be useful for distributions with 'open endings'. Defaults to FALSE
hpd(caldist(130,20, bombalert=FALSE)) plot(tmp <- caldist(2450,50), type='l') myhpds <- hpd(tmp) abline(v=unlist(myhpds[,1:2]), col=4)
Run the code above in your browser using DataLab