Heatmap.BLC {BayesMortalityPlus} | R Documentation |
BLC: Heatmap for the life expectancy
Description
Draws a Heat Map based on the life expectancy of a fitted BLC or PredBLC model.
Usage
## S3 method for class 'BLC'
Heatmap(x, x_lab = NULL, age = NULL, color = c("red", "white", "blue"), ...)
Arguments
x |
A |
x_lab |
Description of the modelled object. |
age |
Vector with the ages to plot the heatmap. |
color |
Vector of colours used in the heatmap. |
... |
Further arguments passed to or from other methods. |
Value
A ggplot2 heatmap of the life expectancy.
See Also
Heatmap.HP()
and Heatmap.DLM()
for HP
or DLM
methods.
Examples
## Importing log-mortality data from Portugal:
data(PT)
Y <- PT
## Fitting the model
fit = blc(Y = Y, M = 100, bn = 20)
## Heatmap:
Heatmap(fit, x_lab = 2000:2015, age = 18:80)
[Package BayesMortalityPlus version 0.2.4 Index]