| predict.BLC | R Documentation |
Calculates the means and variances of the forecast distributions based on the resulting chains from an estimation method.
## S3 method for class 'BLC'
predict(object, h, ...)
object |
A |
h |
The prediction horizon. |
... |
Other arguments. |
A PredBLC object that contains a list with predicted values calculated
from BLC object chains structured in an array.
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).
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.