mean.PredBLC {BayesMortalityPlus} | R Documentation |
BLC: Arithmetic mean for predictions
Description
Calculates the means based on the resulting chains from a predicted year.
Usage
## S3 method for class 'PredBLC'
mean(x, h, ...)
Arguments
x |
A |
h |
A positive integer specifying the year in the prediction horizon to be calculated. |
... |
Further arguments passed to or from other methods. |
Value
A vector with the mean values of the log-mortality chains.
See Also
mean.BLC()
for BLC
object method.
Examples
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)
mean(pred, 1)
mean(pred, 2)
[Package BayesMortalityPlus version 0.2.4 Index]