Description Usage Arguments Details Examples
Calculate the widths of credible intervals
stored in a DemographicArray
.
If (l, u)
, is a credible interval,
then the width of the interval equals
u - l
.
1 2 3 4 | intervalWidth(interval)
## S4 method for signature 'DemographicArray'
intervalWidth(interval)
|
interval |
A |
interval
must have a dimension of length
2 with dimtype
"quantile"
specifying the intervals. interval
is
typically calculated using function
credibleInterval
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #' set.seed(0)
object <- Values(array(runif(n = 20),
dim = c(2, 10),
dimnames = list(sex = c("F", "M"),
iteration = 1:10)))
interval <- credibleInterval(object)
interval
intervalWidth(interval)
object <- Values(array(rpois(n = 20, lambda = 10),
dim = c(2, 10),
dimnames = list(sex = c("F", "M"),
iteration = 1:10)))
interval <- credibleInterval(object, width = 90)
interval
intervalWidth(interval)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.