Learn R Programming

BayesMortalityPlus (version 0.2.3)

print.DLM: DLM: Print

Description

Print details from a fitted DLM or ClosedDLM models and returns it invisibly.

Usage

# S3 method for DLM
print(x, ...)

Value

A character vector with the details of a fitted DLM or ClosedDLM model.

Arguments

x

A DLM or ClosedDLM object, result of a call to dlm() or dlm_close() function.

...

Further arguments passed to or from other methods.

See Also

print.HP() and print.BLC() for HP or BLC methods.

Examples

Run this code
## Importing mortality data from the USA available on the Human Mortality Database (HMD):
data(USA)

## Selecting the log mortality rate of the 2010 male population ranging from 0 to 100 years old
USA2010 = USA[USA$Year == 2010,]
x = 0:100
Ex = USA2010$Ex.Male[x+1]
Dx = USA2010$Dx.Male[x+1]
y = log(Dx/Ex)

## Fitting DLM
fit = dlm(y, M = 100)
print(fit)

Run the code above in your browser using DataLab