Highest Density Regions
Usage
# S4 method for class 'CalibratedAges,missing'
interval_hdr(x, level = 0.954, calendar = getOption("ananke.calendar"), ...)
Arguments
- x
A
CalibratedAges
object.- level
A length-one
numeric
vector giving the confidence level.- calendar
An
aion::TimeScale
object specifying the target calendar (seeaion::calendar()
). IfNULL
, rata die are returned.- ...
Currently not used.
References
Hyndman, R. J. (1996). Computing and graphing highest density regions. American Statistician, 50: 120-126. doi:10.2307/2684423 .
See also
Examples
## Calibrate multiple dates
cal <- c14_calibrate(
values = c(5000, 4500),
errors = c(45, 35),
names = c("X", "Y")
)
## HDR
interval_hdr(cal, level = 0.683)
#> $X
#> start end p
#> [1,] -3911 -3876 0.15
#> [2,] -3802 -3706 0.50
#> [3,] -3669 -3659 0.04
#>
#> $Y
#> start end p
#> [1,] -3336 -3310 0.11
#> [2,] -3297 -3283 0.06
#> [3,] -3272 -3267 0.02
#> [4,] -3240 -3207 0.14
#> [5,] -3194 -3103 0.37
#>
interval_hdr(cal, level = 0.954)
#> $X
#> start end p
#> [1,] -3944 -3855 0.29
#> [2,] -3844 -3833 0.02
#> [3,] -3818 -3653 0.65
#>
#> $Y
#> start end p
#> [1,] -3355 -3091 0.94
#> [2,] -3050 -3040 0.01
#>
interval_hdr(cal, level = 0.997)
#> $X
#> start end p
#> [1,] -3953 -3647 1
#>
#> $Y
#> start end p
#> [1,] -3366 -3014 1
#>