diff --git a/DESCRIPTION b/DESCRIPTION index f8731fb4bd621ac3aa106e1844700ac253610403..e23bf7e55d08f4743dc4b7871a099d1d2da4a178 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: MortalityTables Type: Package -Version: 2.0.2 -Date: 2020-12-12 +Version: 2.0.3 +Date: 2021-08-17 Title: A Framework for Various Types of Mortality / Life Tables Authors@R: c(person("Reinhold", "Kainhofer", role=c("aut", "cre"), email="reinhold@kainhofer.com")) Author: Reinhold Kainhofer [aut, cre] diff --git a/inst/extdata/MortalityTables_Austria_PopulationMCMC.R b/inst/extdata/MortalityTables_Austria_PopulationMCMC.R index 33b019776cd58b9c55cb49778a0f1cafd625f702..60cbcf8b6ccfc4b0704ef5dad7c1157f2e0ea084 100644 --- a/inst/extdata/MortalityTables_Austria_PopulationMCMC.R +++ b/inst/extdata/MortalityTables_Austria_PopulationMCMC.R @@ -1,4 +1,4 @@ -stopifnot(require(methods), require(utils), require(MortalityTables), require(tidyverse), require(reshape2)) # MortalityTable classes; new; Excel reader +stopifnot(require(methods), require(utils), require(MortalityTables), require(tidyverse), require(reshape2), require(pracma)) # MortalityTable classes; new; Excel reader ############################################################################### diff --git a/vignettes/international-mortality-tables-overview.Rmd b/vignettes/international-mortality-tables-overview.Rmd index c428cec37fcf7e89e570a2436bed59fd3455d320..8cfef45cc310c25d0c344f9b310d6edab29cf3d7 100644 --- a/vignettes/international-mortality-tables-overview.Rmd +++ b/vignettes/international-mortality-tables-overview.Rmd @@ -162,7 +162,7 @@ AVOe2005R.unisex.nodamping AVOe2005R.unisex.nodamping.group ``` * Sources: - * R. Kainhofer, M. Predota, U. Schmock: [The New Austrian Annuity Valuation Table AVÖ 2005R](https://avoe.at/rententafel-avoe-2005r/), Mitteilungen der Aktuarvereinigung Österreichs, Heft 13, pp.55--135, http://avoe.at/pdf/mitteilungen/H13_w3.pdf + * R. Kainhofer, M. Predota, U. Schmock: [The New Austrian Annuity Valuation Table AVÖ 2005R](https://avoe.at/rententafel-avoe-2005r/), Mitteilungen der Aktuarvereinigung Österreichs, Heft 13, pp.55--135, https://avoe.at/pdf/mitteilungen/H13_w3.pdf * Aktuarvereinigung Österreichs: [Konstruktion der Unisex-Rententafel AVÖ 2005 R unisex](https://avoe.at/rententafel-avoe-2005r-unisex/, 2012 * R. Kainhofer: [Zur Angemessenheit der Rententafel AVÖ 2005-R](https://avoe.at/zur-angemessenheit-der-rententafel-avoe-2005-r/, Arbeitskreis Rechnungsgrundlagen, Aktuarvereinigung Österreichs (AVÖ), 24.Oktober 2019 @@ -207,7 +207,7 @@ plotMortalityTables(RR67, EROM85.male, EROF85.female, EROM.G1950.male.av, EROF.G * 2000/02 * 2010/12 * Usage with the `MortalityTables` package: -```{r ÖVSt} +```{r OeVSt} mortalityTables.load("Austria_Census") mort.AT.census ``` @@ -299,9 +299,9 @@ plotMortalityTables( * second-order table, describing the transition probabilities of the Austrian social security system ```{r EttlPager, results="hide"} -pensionTables.load("Austria_EttlPagler") -EttlPagler.male -EttlPagler.female +# pensionTables.load("Austria_EttlPagler") +# EttlPagler.male +# EttlPagler.female ``` * Source: Ettl W. und Pagler F.: "Rechnungsgrundlagen für die Pensionsversicherung", @@ -317,8 +317,8 @@ Verlag: Verband der wissenschaftlichen Gesellschaften Österreichs, Wien, 1989 * No documentation available ```{r AVOe1999P, results="hide"} -pensionTables.load("Austria_AVOe1999P") -AVOe1999P +# pensionTables.load("Austria_AVOe1999P") +# AVOe1999P ``` @@ -332,8 +332,8 @@ AVOe1999P * No documentation available ```{r AVOe2008P, results="hide"} -pensionTables.load("Austria_AVOe2008P") -AVOe2008P +# pensionTables.load("Austria_AVOe2008P") +# AVOe2008P ``` @@ -346,32 +346,32 @@ AVOe2008P * Publisher: Aktuarvereinigung Österreichs (AVÖ), Creator: R. Kainhofer, J. Hirz, A. Schubert ```{r AVOe2018P, results="hide"} -pensionTables.load("Austria_AVOe2018P") -AVOe2018P +# pensionTables.load("Austria_AVOe2018P") +# AVOe2018P ``` * Source: R. Kainhofer, J. Hirz, A. Schubert: AVÖ 2018-P - Rechnungsgrundlagen für die Pensionsversicherung, Dokumentation der Pensionstafel, Arbeitskreis Rechnungsgrundlagen, Aktuarvereinigung Österreichs (AVÖ), 30. August 2018. https://oefdv.avoe.at/rechnungsgrundlagen/ -### Comparisons -```{r AT.pensionTables.Comparison} -plotMortalityTables( - EttlPagler.male %>% pT.getSubTable("qx"), - AVOe1999P["m",,"IP", "P"] %>% pT.getSubTable("qx"), - AVOe2008P["m",,"IP", "P"] %>% pT.getSubTable("qx"), - AVOe2018P["m",,"IPRG"] %>% pT.getSubTable("qx"), - legend.position = c(0.01, 0.99), legend.justification = c(0,1), - title = "Comparison of Austrian Pension Tables" -) + labs(color = NULL) - -plotMortalityTables( - EttlPagler.male %>% pT.getSubTable("hx"), - AVOe1999P["m",,"IP", "P"] %>% pT.getSubTable("hx"), - AVOe2008P["m",,"IP", "P"] %>% pT.getSubTable("hx"), - AVOe2018P["m",,"IPRG"] %>% pT.getSubTable("hx"), - # legend.position = c(0.01, 0.99), legend.justification = c(0,1), - title = "Comparison of Austrian Pension Tables", - log = FALSE, legend.position = "bottom" -) + labs(color = NULL) -``` +<!-- ### Comparisons --> +<!-- ```{r AT.pensionTables.Comparison} --> +<!-- plotMortalityTables( --> +<!-- EttlPagler.male %>% pT.getSubTable("qx"), --> +<!-- AVOe1999P["m",,"IP", "P"] %>% pT.getSubTable("qx"), --> +<!-- AVOe2008P["m",,"IP", "P"] %>% pT.getSubTable("qx"), --> +<!-- AVOe2018P["m",,"IPRG"] %>% pT.getSubTable("qx"), --> +<!-- legend.position = c(0.01, 0.99), legend.justification = c(0,1), --> +<!-- title = "Comparison of Austrian Pension Tables" --> +<!-- ) + labs(color = NULL) --> + +<!-- plotMortalityTables( --> +<!-- EttlPagler.male %>% pT.getSubTable("hx"), --> +<!-- AVOe1999P["m",,"IP", "P"] %>% pT.getSubTable("hx"), --> +<!-- AVOe2008P["m",,"IP", "P"] %>% pT.getSubTable("hx"), --> +<!-- AVOe2018P["m",,"IPRG"] %>% pT.getSubTable("hx"), --> +<!-- # legend.position = c(0.01, 0.99), legend.justification = c(0,1), --> +<!-- title = "Comparison of Austrian Pension Tables", --> +<!-- log = FALSE, legend.position = "bottom" --> +<!-- ) + labs(color = NULL) --> +<!-- ``` --> ## Experience Tables @@ -408,12 +408,12 @@ Source: G. Friesacher, Th. Spanninger, R. Kainhofer: Gesamtbestandstafel -- * Creator: R. Kainhofer Usage with the `MortalityTables` package: ```{r PKGesamtbestand, results = "hide"} -mortalityTables.load("Austria_PK-Bestand_2010-16") -PKBestandstafel.2010.16 +# mortalityTables.load("Austria_PK-Bestand_2010-16") +# PKBestandstafel.2010.16 ``` ```{r PKBestand.vergleich} -plotMortalityTables(PKBestandstafel.2010.16[,,"qx", "raw"], legend.position = "right", title = "Austrian pension fund mortalities 2010-16", aes = aes(color = type)) + - facet_grid(sex ~ .) + labs(color = "Collective") +# plotMortalityTables(PKBestandstafel.2010.16[,,"qx", "raw"], legend.position = "right", title = "Austrian pension fund mortalities 2010-16", aes = aes(color = type)) + + # facet_grid(sex ~ .) + labs(color = "Collective") ```