Skip to content

Greatknee/Replication_TAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replication package for "Low-Rank Tensor Autoregressive Models for Mortality Modelling"

Tim J. Boonen and Yuhuai Chen (The University of Hong Kong).

The reproducibility package was assembled at December 24, 2025.

Overview & contents

The code in this replication material generates all numerical experiments, figures, and tables for the paper "Low-Rank Tensor Autoregressive Models for Mortality Modelling". Each figure and table is generated separately by its corresponding script file Figure_[xx]_*.R or Table_[xx]_*.R, respectively.

The main contents of the repository are the following:

  • data/: folder of raw data files and functions for processing them
  • out/: folder of generated plots as pdf files and generated tables as xlsx files.
  • function/: folder of all nested functions
  • Figure_[xx]_*.R: R scripts for creating the corresponding figures
  • Table_[xx]_*.R: R scripts for creating the corresponding tables

Instructions & computational requirements.

All file paths are relative to the root of the replication package. Please set your working directory accordingly, or open the .Rproj file using RStudio.

The analysis files Figure_[xx]_*.R and Table_[xx]_*.R can be run individually, in any order.

These analyses were run on R 4.3.3. A comprehensive list of dependencies can be found in the renv.lock file. For a convenient setup in a (local) R session, we recommend using the renv package. The following steps are required once:

# install.packages("renv")
renv::activate()
renv::restore() # install dependencies
renv::status() # check environment

Core function.

The main estimation routines for the TAR-CP and TAR-Tucker models are implemented in function/utils/TAR_fit.R. The TAR-CP model is estimated via the function fittenRR whereas the TAR-Tucker model is estimated using the function fit_nc.

Data availability and provenance

Human Mortality Database

These data are downloaded from https://www.mortality.org/ and located at data. See Human Mortality Database. (2023, https://www.mortality.org/File/GetDocument/Public/Docs/MethodsProtocolV6.pdf) for more details.

Reference

Human Mortality Database. (2023). Methods protocol for the Human Mortality Database (Version 6). Retrieved from https://www.mortality.org/File/GetDocument/Public/Docs/MethodsProtocolV6.pdf

About

Replication Package for "Low-rank tensor autoregressive models for mortality modeling"

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages