Learn R Programming

LifeTables (version 0.1)

hmd.DA.mx: Model Life Table Discriminant Analysis

Description

Training and testing steps to perform a discriminant analysis for a partial or complete human mortality rate schedules with the Human Mortality database as the training set.

Usage

hmd.DA.mx(data, sex="female")

Arguments

data
a partial or complete human mortality rate schedule to be classified. Must have contiguous age groups (with standard 5-year age intervals 0, 1-4, 5-9, 10-14...110+) and be in log scale. This can be a single schedule or many organized into a matrix with th
sex
"male" or "female". The sex for the schedule to be classified.

Value

  • trainThe output from the function mclustDAtrain, the parameters and other summary information for the model best fitting each class according to BIC.
  • testThe output from the function mclustDAtest, A matrix in which the [i,j]th entry is the density for that test observation i in the model for class j.
  • classificationThe classification for the test data

Details

This function can only take contiguous age groups as arguments. Whatever age groups are used, the function uses that portion of the HMD schedules to generate the training models and then clasifies the test schedules.

References

S. Clark and D. Sharrow (2011) "Contemporary Model Life Tables for Developed Countries: An Application of Model-Based Clustering." Working Paper No. 107, Center for Statistics and the Social Sciences, University of Washington, www.csss.washington.edu/Papers/

C. Fraley and A. E. Raftery (2002) "Model-based clustering, discriminant analysis, and density estimation." Journal of the American Statistical Association 97:611-631.

C. Fraley and A. E. Raftery (2006) "MCLUST Version 3 for R: Normal Mixture Modeling and Model-Based Clustering", Technical Report no. 504, Department of Statistics, University of Washington

Human Mortality Database University of California, Berkeley (USA), and Max Planck Institute for Demographic Research (Germany). Available at www.mortality.org or www.humanmortality.de (data downloaded on [November 2009]).

See Also

mclustDAtest, mclustDAtrain, Mclust

Examples

Run this code
# some test data
data(MLTobs)
examp.data <- t(flt.mx[1:2,1:10])

# classify the test data
examp.out <- hmd.DA.mx(data=examp.data, sex="female")
examp.out$classification

Run the code above in your browser using DataLab