Heatmap.BLC {BayesMortalityPlus} | R Documentation |
Draws a Heat Map based on the life expectancy of a fitted BLC or PredBLC model.
## S3 method for class 'BLC'
Heatmap(x, x_lab = NULL, age = NULL, color = c("red", "white", "blue"), ...)
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. |
A ggplot2 heatmap of the life expectancy.
Heatmap.HP()
and Heatmap.DLM()
for HP
or DLM
methods.
## 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)