Description Usage Arguments Details Value Author(s) References See Also Examples
It creates rhdata
class object suitable for fitting the extended SLC model using elca.rh
iterative fitting method. Basically, it transforms a twodimensional survival data into threedimensional arrays of population (exposure) and mortality rates dependent on age, calendar time and additional covariate(s).
1 2 3 
dat 

covar 
(partial) covariate name(s) or position number(s) in the 
xbreaks 
a sequence of age break points (including the starting and closing values) to be used for subgrouping the input data set 
xlabels 
a sequence of age labels to be used for the sequence defined in 
ybreaks 
a sequence of year break points (as Julian calendar dates) to be used for subgrouping the input data set 
ylabels 
a sequence of year labels to be used for the sequence defined in 
name 
name of subset data series (e.g. male, female or total) 
label 
label (name) of overall data source (e.g. CMI) 
While the rhdata
function can subgroup the input data by more than one additional covariates (possibly useful for other preliminary analysis), the fitting method implemented in elc.rh
can only handle a single additional covariate. Also, currently, there are no generic methods to plot or to extract parts of the rhdata
class object, but there are a few illustrations provided below how these might be carried out.
List object defined as class rhdata
made up by the following components:
year 
vector of year labels 
age 
vector of age labels 
covariates 
vector of levels of the additional covariate 
deaths 
3dimensional array of number of deaths (by ageyearcovariate) 
pop 
3dimensional array of population (exposure) (by ageyearcovariate) 
mu 
3dimensional array of central mortality rates (by ageyearcovariate) 
label 
label (name) of overall data source 
name 
name of subset data series 
Z. Butt and S. Haberman and H. L. Shang
Renshaw, A. E. and Haberman, S. (2003a), “LeeCarter mortality forecasting: a parallel generalised linear modelling approach for England and Wales mortality projections", Journal of the Royal Statistical Society, Series C, 52(1), 119137.
Renshaw, A. E. and Haberman, S. (2003b), “LeeCarter mortality forecasting with age specific enhancement", Insurance: Mathematics and Economics, 33, 255272.
Renshaw, A. E. and Haberman, S. (2006), “A cohortbased extension to the LeeCarter model for mortality reduction factors", Insurance: Mathematics and Economics, 38, 556570.
Renshaw, A. E. and Haberman, S. (2008), “On simulationbased approaches to risk measurement in mortality with specific reference to Poisson LeeCarter modelling", Insurance: Mathematics and Economics, 42(2), 797816.
Renshaw, A. E. and Haberman, S. (2009), “On ageperiodcohort parametric mortality rate projections", Insurance: Mathematics and Economics, 45(2), 255270.
elca.rh
, dd.rfp
, demogdata
, mdy.date
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  # See data set 'tab' provided in the ilc package
# names(tab)
# [1] "refno" "dob" "dev" "event" "cov1" "cov2"
# Get multidimensional survival data:
mdat < rhdata(tab, covar='cov2', xbreaks=60:96, xlabels=60:95,
ybreaks=mdy.date(1,1,2000:2006), ylabels=2000:2005, name='M', label='CMI')
# Warning: although rhdata() can sort by more than a single parameter, for ex.
# covar=c('cov1', 'cov2'), the SLC fitting only works at the moment with
# a single extra covariate.
# print data summary:
mdat
#Multidimensional Mortality data for: MDat [M]
#Across covariates:
# years: 2000  2005
# ages: 60  95
# cov2: 0, 1, 2, 3
# Graphical illustrations of mdat data levels (by the additional factor):
# plot of exposures:
matplot(mdat$age, mdat$pop[,,1], type='l', xlab='Age', ylab='Ec', main='Base Level')
matplot(mdat$age, mdat$pop[,,2], type='l', xlab='Age', ylab='Ec', main='Level 1')
# plot of deaths:
matplot(mdat$age, mdat$deaths[,,1], type='l', xlab='Age', ylab='D', main='Base Level')
matplot(mdat$age, mdat$deaths[,,2], type='l', xlab='Age', ylab='D', main='Level 1')
# plot of log mortality rates:
matplot(mdat$age, log(mdat$mu[,,1]), type='l', xlab='Age', ylab='log(mu)', main='Base Level')
matplot(mdat$age, log(mdat$mu[,,2]), type='l', xlab='Age', ylab='log(mu)', main='Level 1')

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.