StMoMoData {StMoMo} | R Documentation |
Create StMoMoData object from demogdata object
Description
Create StMoMoData object suitable for fitting a Stochastic Mortality
Model using function fit.StMoMo
.
Usage
StMoMoData(data, series = names(data$rate)[1], type = c("central",
"initial"))
Arguments
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 |
Value
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. |
Examples
## 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)