Skip to contents

For a mable with a single model column, return the model components that are indexed by birth year of the cohort.

Usage

cohort_components(object, ...)

Arguments

object

A vital mable object with a single model column.

...

Not currently used.

Value

tsibble object containing the cohort components from the model.

Examples

aus_mortality |>
  dplyr::filter(State == "Victoria", Sex == "male", Age > 50) |>
  model(apc = APC(Mortality)) |>
  cohort_components()
#> # A tsibble: 169 x 5 [1Y]
#> # Key:       Sex, State, Code [1]
#>    Sex   State    Code  Birth_Year     gc
#>    <chr> <chr>    <chr>      <int>  <dbl>
#>  1 male  Victoria VIC         1801 NA    
#>  2 male  Victoria VIC         1802  1.15 
#>  3 male  Victoria VIC         1803 -0.163
#>  4 male  Victoria VIC         1804 -0.128
#>  5 male  Victoria VIC         1805  0.150
#>  6 male  Victoria VIC         1806  0.314
#>  7 male  Victoria VIC         1807  0.327
#>  8 male  Victoria VIC         1808  0.389
#>  9 male  Victoria VIC         1809  0.331
#> 10 male  Victoria VIC         1810  0.225
#> # ℹ 159 more rows