| predict.BLC {BayesMortalityPlus} | R Documentation |
BLC: Forecasting
Description
Calculates the means and variances of the forecast distributions based on the resulting chains from an estimation method.
Usage
## S3 method for class 'BLC'
predict(object, h, ...)
Arguments
object |
A |
h |
The prediction horizon. |
... |
Other arguments. |
Value
A PredBLC object that contains a list with predicted values calculated
from BLC object chains structured in an array.
See Also
fitted.BLC(), print.BLC(), and plot.PredBLC() for PredBLC methods to native R functions fitted(),
print(), and plot().
expectancy.BLC() and Heatmap.BLC to compute and plot the life expectancy of the prediction(s).
Examples
## Importing log-mortality data from Portugal:
data(PT)
Y <- PT
## Fitting the model
fit = blc(Y = Y, M = 100, bn = 20)
## Prediction for 2 years ahead
pred = predict(fit, h = 2)
print(pred)
[Package BayesMortalityPlus version 0.2.4 Index]