Description Usage Arguments Details Value See Also Examples
object
typically has a dimension with dimtype
time
and dimscale
"Points"
, and a dimension
with dimtype "age"
and dimscale "Intervals"
.
The complete set of choices for age-time-cohort dimensions and
dimscales is
time | age | cohort |
Points | Intervals | <none> |
Points | <none> | <none> |
<none> | Points | <none> |
Points | <none> | Intervals |
<none> | Points | Intervals
|
1 2 3 4 |
object |
An object of class |
triangles |
Logical. If |
openTriangles |
|
If triangles
is TRUE
, then exposure is calculated
separately for lower and upper Lexis triangles. triangles
can only by TRUE
if object
has dimensions with
dimtype
"time"
and "age"
.
Argument openTriangles
governs the way that the exposures
for the final age group are calculated when the final age group is
open (ie has no upper age limit) and triangles
is TRUE
.
The sum of the exposures for the upper and lower triangles is unaffected.
When openTriangles
is "weighted"
, exposure for the upper triangle
is twice as large as exposure for the lower triangle (reflecting the
fact that the upper triangle includes multiple cohorts).
When openTriangles
is "standard"
exposure is calculated the same way as it is for other age groups.
An object of class Counts
.
To calculate exposure for births, see exposureBirths
To calculate exposure for origin-destination or parent-child
arrays, see addPair
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## prepare data
library(demdata)
popn <- demdata::nz.popn.reg
popn <- Counts(popn, dimscales = c(year = "Points"))
popn <- subarray(popn, year %in% c(1996, 2001, 2006, 2011, 2016))
popn <- collapseDimension(popn, dimension = "region")
## no triangles
exposure(popn)
## with triangles
exposure(popn, triangles = TRUE)
## with triangles, openTriangles is "standard"
exposure(popn, triangles = TRUE, openTriangles = "standard")
## cohort
popn <- Counts(array(4:1,
dim = c(1, 4),
dimnames = list(cohort = "2001-2005",
age = c(0, 5, 10, 15))))
exposure(popn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.