| risk | "Tod", "sonst. Ausscheiden", "Invalidisierung", "Partnerwahrscheinlichkeit im Tod", "mittl. Hinterbliebenenalter" | The type of risk described by the table |

| probability | "qx", "sx", "ix", "qgx", "qix", "qpx", "hx", "qwy", "yx" | The probability described by the table (corresponds with "risk") |

| country | "Österreich", "Deutschland", "USA", ... | The geographic region of the table (not neccessarily only countries) |

| source | "AVÖ", "Statistik Austria", "DAV", ... | Source of the data / table |

| `sex` | "m", "w", "u" | Sex |

| `collar` | "Rententafel", "Gruppenrententafel", "Einzel", "Gruppe", "Gesamtbevölkerung", "Raucher", "Nichtraucher", "Arbeiter", "Angestellte", "Mischtafel" | Collective, to which the mortality table applies |

| `type` | "Rententafel", "Volkssterbetafel", "Pensionstafel", "Bevölkerungsprognose", "Beobachtung", "Risikotafel" | The type of table |

| `data` | "official", "raw", "loaded", "loaded, group", "unloaded", "age-shifted", "geglättet" | The type of data |

| `year` | numeric year, "2014-2080", "1980-2017", "1947-2017" | The year (or range) described by the table |

| `risk` | "Tod", "sonst. Ausscheiden", "Invalidisierung", "Partnerwahrscheinlichkeit im Tod", "mittl. Hinterbliebenenalter" | The type of risk described by the table |

| `probability` | "qx", "sx", "ix", "qgx", "qix", "qpx", "hx", "qwy", "yx" | The probability described by the table (corresponds with "risk") |

| `country` | "Österreich", "Deutschland", "USA", ... | The geographic region of the table (not neccessarily only countries) |

| `source` | "AVÖ", "Statistik Austria", "DAV", ... | Source of the data / table |

Some of the provided datasets (mortality tables) have not yet fully implemented these conventions, so pleasy be vary when using them.

...

...

@@ -454,12 +454,12 @@ plot(AVOe2005R.female, AVOe2005R.female.mod, title = "Original and modified tabl

# Creating mortality tables from data and modifying them using various helper functions

The package \code{MortalityTables} not only provides the data structures and some

The package MortalityTables not only provides the data structures and some

examples of mortality tables, it also provides several functions to create mortality

tables from raw data and modify them. The package provides several editing functions,

which all begin with the prefix \code{mT.}.

which all begin with the prefix `mT.`.

Let us take as an example the provided dataset \code{PopulationData.AT2017} of

Let us take as an example the provided dataset `PopulationData.AT2017` of

Austrian population data (exposure and deaths counts for the year 2017).

For simplicity, we only look at the unisex data (i.e. male + female numbers,

plotMortalityTrend(mort.AT.forecast, title = "Forecast trend (medium scenario) by Statistik Austria")

```

As we can see, the trends appear to be derived from data until age 94 and then set to a constant value ("floor").

Let us first apply the male trend to the observed period life table of the year 2017, and then extrapolate the trend from age 94 to higher ages by an exponential function towards zero. The first can be done with the function [mT.addTrend()], while the second can be done with [mT.extrapolateTrendExp()]:

Let us first apply the male trend to the observed period life table of the year 2017, and then extrapolate the trend from age 94 to higher ages by an exponential function towards zero. The first can be done with the function `mT.addTrend()`, while the second can be done with `mT.extrapolateTrendExp()`:

Other functions that might be useful before publishing a table are:

* [mT.translate()], which simply moves the base year of the internal representation of a cohort life table to a different year (by applying the trend according to the translation), but leaves cohort death probabilities unchanged.

* [mT.round()], which rounds the probabilities of the base table and the trend to the given number of digits.

* `mT.translate()`, which simply moves the base year of the internal representation of a cohort life table to a different year (by applying the trend according to the translation), but leaves cohort death probabilities unchanged.

* `mT.round()`, which rounds the probabilities of the base table and the trend to the given number of digits.

...

...

@@ -679,7 +679,7 @@ When using a population mortality table like the one we just derived in

insurance contracts, the actuary often considers adding a certain security

loading (e.g. 25\% on all death probabilities) to ensure sufficient security

and ensure the legal requirement of a prudent person.

This can be done with the function [mT.scaleProbs()]:

This can be done with the function `mT.scaleProbs()`: