mean.PredBLC {BayesMortalityPlus} | R Documentation |
Calculates the means based on the resulting chains from a predicted year.
## S3 method for class 'PredBLC'
mean(x, h, ...)
x |
A |
h |
A positive integer specifying the year in the prediction horizon to be calculated. |
... |
Further arguments passed to or from other methods. |
A vector with the mean values of the log-mortality chains.
mean.BLC()
for BLC
object method.
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)