plot.BLC {BayesMortalityPlus}R Documentation

BLC: Plot the fitted values

Description

This function plots the fitted log mortality values as well as the parameters values and credible intervals of the BLC fitted models.

Usage

## S3 method for class 'BLC'
plot(x, parameter = "all", prob = 0.9, age = NULL, ...)

Arguments

x

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

parameter

A character determines the parameter that will be plotted. Default is "all" which means that all three parameters "alpha", "beta" and "kappa" will be plotted. It can also be "alpha", "beta", "kappa" or "fitted". The last one provides a plot with all the fitted tables.

prob

A numeric value that indicates the probability for the credible interval. Default is '0.9'.

age

A numeric vector that represents the ages used in the fitted BLC model. Default is 'NULL'.

...

Other arguments.

Value

A plot with the fitted log mortality or fitted values and credible intervals of the parameters.

See Also

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

Examples

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

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

## Parameters' plot
plot(fit, parameter = "all")
plot(fit, parameter = "beta", prob = 0.95)
plot(fit, parameter = "alpha", age = 18:80)
plot(fit, parameter = "kappa")

## Fitted mortality graduation
plot(fit, parameter = "fitted", age = 18:80)



[Package BayesMortalityPlus version 0.2.3 Index]