summary.DLM {BayesMortalityPlus} | R Documentation |
Summarizes information from the parameters' markov chains of a fitted DLM
or ClosedDLM
model.
## S3 method for class 'DLM'
summary(object, digits = 5, ...)
object |
A |
digits |
An integer indicating the number of decimals places. |
... |
Further arguments passed to or from other methods. |
A data.frame object with the mean, standard deviation and 2.5%, 50% and 97.5% quantiles of a fitted DLM
or ClosedDLM
model.
summary.HP()
for HP
method.
## 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, bn = 20, thin = 1)
summary(fit)