elca.rh: Extended (Stratified) Lee-Carter model (with a single extra...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A purpose-built regression routine to fit the extended Lee-Carter model with an extra additive effect of an observable factor (other than age and period) on the log mortality mortality rates.

Usage

1
2
3
4
elca.rh(dat, year = dat$year, age = dat$age, dec.conv = 6, 
		error = c("poisson", "gaussian"), 
		restype = c("logrates", "rates", "deaths", "deviance"), 
		scale = F, interpolate = F, verbose = T, spar = NULL, ax.fix = NULL)

Arguments

dat

rhdata class multidimensional mortality data object

year

vector of years to be included in the regression (all available years by default)

age

vector of ages to be included in the regression (all available ages by default)

dec.conv

number of decimal places used to achieve convergence. The lower the value the faster the convergence of the fitting algorithm. Note: very high values could over fit the parameters.

error

type of error structure of the model choice (Poisson distribution of the errors by default)

restype

types of residuals, which also controls the type of the fitted value. Thus, in the cases of logrates and rates the function returns as fitted values the log and untransformed mortality rates, respectively. Likewise, the choices of deaths and deviance correspond to the fitted number of deaths

scale

logical, if TRUE, re-scale the interaction parameters so that the k_t has drift parameter equal to 1 (see also lca)

interpolate

logical, if TRUE, replace before regression all zero or missing values in the mortality rates of dat argument by interpolation across calendar years (see also smooth.demogdata)

verbose

logical, it controls the amount of process information

spar

numerical smoothing spline parameter in the interval (0,1] (with a recommended value of 0.6). If it is not NULL, the interaction effects (i.e. β_x^{(0,1)}) are smoothed out after the initial regression. Consequently, the period and/or cohort effects are adjusted (smoothed out) accordingly.

ax.fix

vector of constant age effect to be used in the model (e.g. the fitted values of a standard LC regression to the experience of a large population). If NULL the base ax values are estimated from dat

Details

This function models the number of deaths for a group within a generalised Lee-Carter framework with a Poisson or Gaussian error structure. The methodology quantifies the differences in the mortality experience of population subgroups differentiated by an additional measurable covariate (other than age and period). Additional covariate, for instance, could be related to geographical, socio-economic or race differences.

Value

An object of class elca with the following components:

lca

list of fitted lca model objects by the level of the extra factor

age

vector of fitted ages

year

vector of fitted years

ag

parameter estimates of the effects of the extra factor

ax

parameter estimates (or ax.fix) of (mean) age-specific mortality rates across the entire fitting period

bx

parameter estimates of age-specific interaction effect between age and period

kt

parameter estimates of year-specific period trend of mortality rates

adjust

type of error structure used in fitting (e.g. "poisson" or "gaussian")

label

data label

call

copy of the R call to the model

conv.iter

number of iterations used to reach convergence

mdev

mean deviance of total and base lack of fit (see also lca)

model

string expression of the fitted model

df

degree of freedom of the fitted GLM model

Author(s)

Z. Butt and S. Haberman and H. L. Shang

References

Li, N. and Lee, R. D. (2005), ‘Cohort mortality forecasts for a group of populations: an extension of the Lee-Carter method’, Demography, 42(3), 575-594. Renshaw and Haberman (2006), ‘A cohort-based extension to the Lee-Carter model for mortality reduction factors.’, Insurance: Mathematics and Economics, 38, 556-570.

See Also

dd.rfp, link{rhdata}

Examples

1
2
3
4
5
rfp <- c(0.5, 1.2, -0.7, 2.5)
rfp.cmi <- dd.rfp(dd.cmi.pens, rfp)
mod6e <- elca.rh(rfp.cmi, age=50:100, interp=TRUE, dec=3, verb=TRUE)
# display model summary and diagnostics:
mod6e; coef(mod6e)

Example output

Loading required package: demography
Loading required package: forecast
Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 
Registered S3 methods overwritten by 'demography':
  method      from 
  print.lca   e1071
  summary.lca e1071
This is demography 1.22 

Loading required package: rainbow
Loading required package: MASS
Loading required package: pcaPP
Loading required package: date
Original sample: Multidimensional Mortality data for: CMI [male] 
Across covariates:
	 years: 1983 - 2003
	 ages:  50 - 108
	 X: base, a, b, c, d
Applied sample: Multidimensional Mortality data for: CMI [male] 
Across covariates:
	 years: 1983 - 2003
	 ages:  50 - 100
	 X: base, a, b, c, d

  Fitting model: [ LC(g) = a(x)+a(g)+b(x)*k(t) ] 
	- with poisson error structure and with deaths as weights -
Note: 1161 cells have 0/NA deaths and  127 have 0/NA exposure 
  out of a total of 5355 data cells.

 Starting values are:
   age  age.c int.c     per per.c      X4 X4.c
1    1 -1.286  0.02    1983     0    base    0
2    2 -2.508  0.02    1984     0       a    0
3    3 -3.028  0.02    1985     0       b    0
4    4 -3.343  0.02    1986     0       c    0
5    5 -3.153  0.02    1987     0       d    0
6    6 -3.149  0.02    1988     0             
7    7 -3.402  0.02    1989     0             
8    8 -2.956  0.02    1990     0             
9    9 -3.553  0.02    1991     0             
10  10 -3.091  0.02    1992     0             
11  11 -3.202  0.02    1993     0             
12  12 -3.233  0.02    1994     0             
13  13 -3.141  0.02    1995     0             
14  14 -3.051  0.02    1996     0             
15  15 -2.832  0.02    1997     0             
16  16 -2.681  0.02    1998     0             
17  17 -2.739  0.02    1999     0             
18  18 -2.530  0.02    2000     0             
19  19 -2.407  0.02    2001     0             
20  20 -2.436  0.02    2002     0             
21  21 -2.171  0.02    2003     0             
22  22 -2.142  0.02                           
23  23 -1.940  0.02                           
24  24 -1.754  0.02                           
25  25 -1.737  0.02                           
26  26 -1.583  0.02                           
27  27 -1.549  0.02                           
28  28 -1.300  0.02                           
29  29 -1.328  0.02                           
30  30 -1.230  0.02                           
31  31 -1.193  0.02                           
32  32 -0.936  0.02                           
33  33 -0.852  0.02                           
34  34 -0.879  0.02                           
35  35 -0.768  0.02                           
36  36 -0.612  0.02                           
37  37 -0.513  0.02                           
38  38 -0.465  0.02                           
39  39 -0.394  0.02                           
40  40 -0.266  0.02                           
41  41 -0.284  0.02                           
42  42 -0.202  0.02                           
43  43 -0.177  0.02                           
44  44 -0.043  0.02                           
45  45  0.119  0.02                           
46  46  0.102  0.02                           
47  47 -0.037  0.02                           
48  48  0.149  0.02                           
49  49  0.099  0.02                           
50  50  0.061  0.02                           
51  51  0.148  0.02                           

 Iterative fit:
 #iter   Dev    non-conv
    1  6538592  0  
     2  29095571  1  
     3  4587766  0  
     4  1030918  0  
     5  962609.5  0  
     6  949241.1  0  
     7  949140.8  0  
     8  949282.3  1  
     9  949340.6  2  
     10  949360.1  3  
     11  949366.6  0  
     12  949368.8  0  
     13  949369.6  0  
     14  949369.8  0  
     15  949369.9  0  
     16  949370  0  
     17  949370  0  
     18  949370  0  
     19  949370  0  
     20  949370  0  
     21  949370  0  
 
 Iterations finished in: 21 steps
  Updated values are:
   age    age.c   int.c     per     per.c      X4     X4.c
1    1 -3.57182 0.10173    1983  10.40003    base        0
2    2 -4.00941 0.04732    1984  14.39776       a  0.49457
3    3 -4.66980 0.02346    1985  11.09019       b  1.25965
4    4 -4.88614 0.02980    1986  12.61244       c -0.55938
5    5 -4.79139 0.00564    1987   6.20855       d  2.50562
6    6 -4.54121 0.04728    1988   8.27912                 
7    7 -4.92833 0.00628    1989   8.75253                 
8    8 -4.48164 0.01974    1990   8.76337                 
9    9 -4.74229 0.02496    1991   5.54912                 
10  10 -4.47916 0.00110    1992   3.45402                 
11  11 -4.49779 0.00941    1993  -0.45605                 
12  12 -4.55218 0.00782    1994  -4.30681                 
13  13 -4.46182 0.01542    1995   1.60598                 
14  14 -4.42328 0.00930    1996  -4.17017                 
15  15 -4.11704 0.00677    1997 -12.22838                 
16  16 -4.09382 0.02913    1998  -7.68399                 
17  17 -4.10641 0.02993    1999 -15.04592                 
18  18 -3.87744 0.01948    2000 -15.69551                 
19  19 -3.81737 0.01915    2001 -10.01521                 
20  20 -3.85569 0.01645    2002 -11.49669                 
21  21 -3.57086 0.01870    2003 -10.01438                 
22  22 -3.56004 0.01942                                   
23  23 -3.29706 0.02017                                   
24  24 -3.19681 0.02288                                   
25  25 -3.15090 0.02172                                   
26  26 -2.94881 0.00943                                   
27  27 -2.90764 0.01705                                   
28  28 -2.75753 0.02283                                   
29  29 -2.69655 0.01681                                   
30  30 -2.60415 0.01743                                   
31  31 -2.61773 0.02969                                   
32  32 -2.33704 0.01849                                   
33  33 -2.37038 0.02361                                   
34  34 -2.23598 0.01498                                   
35  35 -2.15189 0.01120                                   
36  36 -1.97745 0.00322                                   
37  37 -2.00360 0.01541                                   
38  38 -1.84680 0.00943                                   
39  39 -1.79219 0.01515                                   
40  40 -1.63259 0.01501                                   
41  41 -1.67780 0.00650                                   
42  42 -1.60457 0.01811                                   
43  43 -1.59460 0.00472                                   
44  44 -1.45978 0.01706                                   
45  45 -1.30167 0.02744                                   
46  46 -1.24017 0.01719                                   
47  47 -1.40882 0.01141                                   
48  48 -1.22433 0.01783                                   
49  49 -1.27113 0.01216                                   
50  50 -1.31165 0.02586                                   
51  51 -1.14732 0.02891                                   
	 total sums are: 
bx kt 
 1  0 
Warning messages:
1:  A total of 1160 0/NA central mortality rates are re-estimated by the "interpolate" method. 
2: In elca.rh(rfp.cmi, age = 50:100, interp = TRUE, dec = 3, verb = TRUE) :
  There are 127 cells with 0/NA exposures, which are ignored in the current analysis.
  Try reducing the fitted age range.
  Alternatively, fit ELC model with error= "gaussian" .
3: In FUN(array(newX[, i], d.call, dn.call), ...) :
  Please assign column name for the data matrix.
4: In FUN(array(newX[, i], d.call, dn.call), ...) :
  Please assign column name for the data matrix.
5: In FUN(array(newX[, i], d.call, dn.call), ...) :
  Please assign column name for the data matrix.
6: In FUN(array(newX[, i], d.call, dn.call), ...) :
  Please assign column name for the data matrix.
7: In FUN(array(newX[, i], d.call, dn.call), ...) :
  Please assign column name for the data matrix.

 ------------------------------------------------------------
	 Extended Lee-Carter Regression:
	 Fitted Model:  LC(g) = a(x)+a(g)+b(x)*k(t) 
 ------------------------------------------------------------
 Call: elca.rh(dat = rfp.cmi, age = 50:100, dec.conv = 3, interpolate = TRUE,  
    verbose = TRUE)
 Error Structure: poisson
 Data Source: CMI : male over
   calendar years: (1983 - 2003) , ages: (50 - 100)
   and groups: base a b c d
 Deviance convergence in: 21 iterations
                  dev   dev.c         df df.c
1  Mean deviance base 258.473    df base 3673
2 Mean deviance total 204.598     df tot 4845
$ax
 [1] -3.571824 -4.009415 -4.669796 -4.886136 -4.791390 -4.541212 -4.928325
 [8] -4.481641 -4.742290 -4.479161 -4.497794 -4.552177 -4.461817 -4.423281
[15] -4.117038 -4.093815 -4.106408 -3.877443 -3.817370 -3.855689 -3.570859
[22] -3.560043 -3.297057 -3.196805 -3.150899 -2.948812 -2.907638 -2.757527
[29] -2.696552 -2.604152 -2.617727 -2.337037 -2.370380 -2.235981 -2.151886
[36] -1.977447 -2.003599 -1.846796 -1.792191 -1.632592 -1.677804 -1.604574
[43] -1.594599 -1.459783 -1.301673 -1.240173 -1.408820 -1.224327 -1.271128
[50] -1.311654 -1.147319

$bx
         50          51          52          53          54          55 
0.101729278 0.047322733 0.023460727 0.029796446 0.005639591 0.047283580 
         56          57          58          59          60          61 
0.006279627 0.019740155 0.024955307 0.001098350 0.009409952 0.007819733 
         62          63          64          65          66          67 
0.015422050 0.009303486 0.006766201 0.029129242 0.029926564 0.019480814 
         68          69          70          71          72          73 
0.019154898 0.016454427 0.018695005 0.019419435 0.020170930 0.022884747 
         74          75          76          77          78          79 
0.021723467 0.009429028 0.017051438 0.022830755 0.016806310 0.017434296 
         80          81          82          83          84          85 
0.029693569 0.018488004 0.023607445 0.014978951 0.011199544 0.003222573 
         86          87          88          89          90          91 
0.015408666 0.009430216 0.015152550 0.015013695 0.006496414 0.018111967 
         92          93          94          95          96          97 
0.004718990 0.017056066 0.027439920 0.017185271 0.011410005 0.017831747 
         98          99         100 
0.012158291 0.025864231 0.028913312 

$kt
Time Series:
Start = 1983 
End = 2003 
Frequency = 1 
       1983        1984        1985        1986        1987        1988 
 10.4000310  14.3977617  11.0901931  12.6124446   6.2085516   8.2791188 
       1989        1990        1991        1992        1993        1994 
  8.7525259   8.7633664   5.5491212   3.4540233  -0.4560549  -4.3068125 
       1995        1996        1997        1998        1999        2000 
  1.6059850  -4.1701653 -12.2283837  -7.6839893 -15.0459194 -15.6955142 
       2001        2002        2003 
-10.0152114 -11.4966937 -10.0143783 

$ag
      base          a          b          c          d 
 0.0000000  0.4945722  1.2596543 -0.5593774  2.5056202 

attr(,"class")
[1] "coef"

ilc documentation built on May 2, 2019, 5:07 a.m.