View source: R/time_exposed_outs.R

time_exposed_outs | R Documentation |

Computes for each integer age and each combination of age and seasonal quarter
the total time exposed at risk (in years) of a population of deceased/emigrants/exits
(portfolio withdrawals, lapses) during the year of the event.
The computation is performed using the associated data frame of quarterly variables
corresponding to the population obtained using the `quarterly_variables`

function.

time_exposed_outs(x)

`x` |
A data.frame output of the |

A data frame with the time exposed at risk for each (potential) combination of integer age and age and season quarter of the input dataset. The data frame has the following components:

`age` |
Integer age to which the time exposed at risk corresponds. |

`quarter.age` |
Age quarter to which the time exposed at risk corresponds. |

`quarter.calendar` |
Calendar (time, season) quarter to which the time exposed at risk corresponds. |

`time.exposed` |
Total time (in years) exposed at risk of the population during the quarter determined for the combination of 'age', 'quarter.age' and 'quarter.calendar'. |

The time exposed at risk is computed for each person from the beginning of the year in which the event occurred
until the moment of occurrence of the event. Please see the note in the `time_exposed_stock`

function.

Josep Lledo josep.lledo@uv.es

Jose M. Pavia pavia@uv.es

Pavia, JM and Lledo, J (2022). Estimation of the Combined Effects of Ageing and Seasonality on Mortality Risk. An application to Spain. *Journal of the Royal Statistical Society, Series A (Statistics in Society)*, 185(2), 471-497. doi: 10.1111/rssa.12769

`time_exposed_stock`

, `time_exposed_newborns`

, `time_exposed_ins`

dates.b <- c("1920-05-13", "1999-04-12", "2019-01-01") dates.e <- c("2002-03-23", "2009-04-12", "2019-01-01") x <- quarterly_variables(dates.b, dates.e) out <- time_exposed_outs(x)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.