Description Usage Arguments Value Examples
View source: R/fittedfitStMoMo.R
Returns fitted values for the data used in fitting a Stochastic Mortality Model.
1 2 |
object |
an object of class |
type |
the type of the fitted values that should be returned. The
alternatives are |
... |
other arguments. |
A matrix with the fitted values.
1 2 3 4 5 6 7 8 9 10 | LCfit <- fit(lc(), data = EWMaleData, ages.fit = 55:89)
matplot(LCfit$ages, fitted(LCfit), type = "l", lty = 1,
col = rainbow(length(LCfit$years)), xlab = "year",
ylab = "log death rate", main = "Fitted rates")
uxthat <- fitted(LCfit, type = "rates")
uxt <- LCfit$Dxt / LCfit$Ext
plot(LCfit$years, uxt["65", ], xlab = "year", ylab = "death rate",
main = "fitted vs. observed rates at age 65")
lines(LCfit$years, uxthat["65", ])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.