Learn R Programming

BayesMortalityPlus (version 0.2.3)

fitted.BLC: BLC: Fitted death probabilities (qx)

Description

Computes the fitted values associated to each age and year based on the resulting chains from a fitted BLC model. In addition, this function also evaluates the values of lower and upper limits of the credible interval.

Usage

# S3 method for BLC
fitted(object, prob = 0.95, ...)

Value

A list with the matrices of fitted values and lower and upper limits of the credible interval for each age and year.

Arguments

object

A BLC or PredBLC object, result of a call to blc() or predict() function.

prob

A real number that indicates the probability of the credible interval.

...

Other arguments.

See Also

fitted.HP() and fitted.DLM() for HP or DLM methods.

Examples

Run this code
## Importing log-mortality data from Portugal:
data(PT)
Y <- PT

## Fitting the model
fit = blc(Y = Y, M = 100, bn = 20)

## Log-mortalities estimates for each age and year in model fitted
fitted(fit, prob = 0.95)

Run the code above in your browser using DataLab