mT.cleanup {MortalityTables}R Documentation

Remove all non-essential data (raw data, etc.) from a mortalityTable object

Description

The function mt.cleanup removes all non-essential data from a given mortalityTable object.

Usage

mT.cleanup(object)

## S4 method for signature 'mortalityTable'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.period'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.trendProjection'
mT.cleanup(object)

## S4 method for signature 'array'
mT.cleanup(object)

## S4 method for signature 'list'
mT.cleanup(object)

## S4 method for signature 'pensionTable'
mT.cleanup(object)

## S4 method for signature 'mortalityTable.observed'
mT.cleanup(object)

Arguments

object

The mortalityTable object to be cleaned.

Details

Mortality tables are often generated from raw data, that is smoothed, extrapolated, etc. The mortalityTable class and its implementations can internally store the raw probabilities and the intermediate results and parameters. This method removes those information. All essential information (base table, ages, trend functions, etc.) are preserved.

Removed information includes: * all elements of the object@data list, except for dim * exposures * names of named age, deathProbs and trend vectors

For mortality tables with other mortalityTable components (like pension tables or mixed tables), all components are cleaned.

Methods (by class)

Examples

mortalityTables.load("Austria_Census")
# Whittaker-Henderson smoothing stores the raw input and the weights in the
# \code{data} slot of the table:
AT.smoothed = whittaker.mortalityTable(mort.AT.census.2011.male)
AT.smoothed@data$rawProbs
AT.smoothed@data$whittaker

# cleaning up the table removes those non-essential information again:
AT.smoothed.clean = mT.cleanup(AT.smoothed)
AT.smoothed.clean@data$rawProbs
AT.smoothed.clean@data$whittaker


[Package MortalityTables version 2.0.5 Index]