Create demogdata object suitable for plotting using plot.demogdata
and
fitting an LC or BMS model using lca
or an FDA model using fdm
.
demogdata(data, pop, ages, years, type, label, name, lambda)
Object of class “demogdata” with the following components:
Vector of years
Vector of ages
A list containing one or more rate matrices with one age group per row and one column per year.
A list of the same form as rate
but containing population numbers instead of demographic rates.
Type of object: “mortality”, “fertility” or “migration”.
label
lambda
Matrix of data: either mortality rates or fertility rates
Matrix of population values of same dimension as data. These are population numbers as at 30 June of each year (i.e., the "exposures"). So, for example, the number of deaths is data*pop if data contains mortality rates.
Vector of ages corresponding to rows of data
.
Vector of years corresponding to columns of data
.
Character string showing type of demographic series: either “mortality”, “fertility” or “migration”.
Character string of the name of area from which the data are taken.
Name of series: usually male, female or total.
Box-Cox transformation parameter.
Rob J Hyndman
read.demogdata