Create StMoMoData object from demogdata object
Create StMoMoData object suitable for fitting a Stochastic Mortality
Model using function fit.StMoMo
.
StMoMoData(data, series = names(data$rate)[1], type = c("central", "initial"))
data |
demogdata object of type "mortality". It is either the
output from functions |
series |
name of series within |
type |
the type of exposure that should be included in the
output. The alternatives are |
A list with class "StMoMoData"
with components:
Dxt |
matrix of deaths data. |
Ext |
matrix of observed exposures. |
ages |
vector of ages corresponding to rows of |
years |
vector of years corresponding to rows of |
type |
the type of exposure in the data. |
series |
name of the extracted series. |
label |
label of the data. |
## Not run: library(demography) NZdata <- hmd.mx(country = "NZL_NP", username = username, password = password, label = "New Zealand") NZStMoMo <- StMoMoData(NZdata, series = "male") summary(NZStMoMo) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.