Description Usage Arguments Value Examples
View source: R/maple_fit_ensemble.R
Fit an ensemble of models.
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)
|
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. |
A list with the following entries
A data frame holding statistical summary information for age-specific death rates, life expectancy and probability of dying, calculated from the posterior draws.
A list of life table draws, calculated using posterior samples of death rates.
The fitted model objects, which can be used for futher analysis.
1 2 | fits <- maple_fit_ensemble(deaths = maple.deaths, population = maple.population,
forecast.horizon = 20, models = maple_models()[c(1, 20)])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.