maple_fit_ensemble: Fit an ensemble of models.

Description Usage Arguments Value Examples

View source: R/maple_fit_ensemble.R

Description

Fit an ensemble of models.

Usage

1
2
3
maple_fit_ensemble(deaths, population, forecast.horizon,
  models = maple_models(), num.draws = 1000, ax = NULL,
  num.threads = inla.getOption("num.threads"), verbose = TRUE)

Arguments

deaths

Deaths matrix; see ?maple for more details.

population

Population matrix; see ?maple for more details.

forecast.horizon

The number of years to produce projections for.

models

The individual models to be run; see ?maple_models for more details.

num.draws

The number of posterior draws to sample and use for calculating statistical summaries.

ax

The number of years lived on average by those who die in their current age group. See ?maple_plt for more details.

num.threads

The number of threads passed to INLA; see ?maple for more details.

verbose

If TRUE (the default), print some information on progress fitting models, etc.

Value

A list with the following entries

sample.summaries

A data frame holding statistical summary information for age-specific death rates, life expectancy and probability of dying, calculated from the posterior draws.

samples

A list of life table draws, calculated using posterior samples of death rates.

model.fits

The fitted model objects, which can be used for futher analysis.

Examples

1
2
fits <- maple_fit_ensemble(deaths = maple.deaths, population = maple.population,
                           forecast.horizon = 20, models = maple_models()[c(1, 20)])

vkontis/maple documentation built on July 15, 2019, 5:08 p.m.