public class LifeTables extends Object implements Serializable, Cloneable
The probability of dying prior to the middle of the interval, given that death occurs somewhere in the interval, may also be specified. Often, however, this probability is taken to be 0.5. For a discussion of the probability models underlying the life table here, see the references.
Let , for i = 0, 1, ..., denote the time grid defining the n age intervals, and note that the length of the age intervals may vary. Following Gross and Clark (1975, page 24), let denote the number of individuals dying in age interval i, where age interval i ends at time . For population table, the death rate at the middle of the interval is given by , where is the number of individuals alive at the middle of the interval, and , . The number of individuals alive at the beginning of the interval may be estimated by where is the probability that an individual dying in the interval dies prior to the interval midpoint. For cohort table, is input directly while the death rate in the interval, , is not needed.
The probability that an individual dies during the age interval from to is given by . It is assumed that all individuals alive at the beginning of the last interval die during the last interval. Thus, = 1.0. The asymptotic variance of can be estimated by
For a population table, the number of individuals alive in the middle of
the time interval (input in nCohort[i]
) must be adjusted to
correspond to the number of deaths observed in the interval. The algorithm
assumes that the number of deaths observed in interval occur over a time period equal to . If
is measured over a period ,
where , then nCohort[i]
must be
adjusted to correspond to by multiplication by
, i.e., the value input
as nCohort[i]
is computed as
Let denote the number of survivors at time
from a hypothetical (for population table) or
observed (for cohort table) population. Then,
=initialPopulation
for population table, and
= nCohort[0]
for cohort table, and is
given by where is the number of individuals who die in the i
th interval. The proportion of survivors in the interval is given by
while the asymptotic variance of can be estimated as follows:
The expected lifetime at the beginning of the interval is calculated as the total lifetime remaining for all survivors alive at the beginning of the interval divided by the number of survivors at the beginning of the interval. If denotes this average expected lifetime, then the variance of can be estimated as (see Chiang 1968)
where var() = 0.0.
Finally, the total number of time units lived by all survivors in the time interval can be estimated as:
Constructor and Description 

LifeTables(int[] nCohort,
double[] age,
double[] a)
Constructs a new
LifeTables instance. 
Modifier and Type  Method and Description 

double[][] 
getLifeTable()
Compute a cohort table.

double[][] 
getPopulationTable(int[] nDeaths)
Compute a population table.

void 
setPopulationSize(int initialPopulation)
Sets the population size at the beginning of the first age interval in
requesting a population table.

public LifeTables(int[] nCohort, double[] age, double[] a)
LifeTables
instance. The number of classes,
nClasses is equal to the length of the input array nCohort
.nCohort
 an int
array of length nClasses
containing the cohort sizes during each interval. If the
Population Table option is used, then nCohort[i]
contains the size of the population at the
midpoint of interval i
. Otherwise,
nCohort[i]
contains the size of the cohort at the
beginning of interval i
. When requesting a
population table, the population sizes in nCohort
may need to be adjusted to correspond to the
number of deaths in nDeaths
. See the class
description section for more information.age
 a double
array of length nClasses + 1
containing the lowest age in each age interval, and in
age[nClasses]
, the endpoint of the last age interval.
Negative age[0]
indicates that the age intervals
are all of length age[0]
and that the initial
age interval is from 0.0 to age[0]
. In this
case, all other elements of age need not be specified.
age[nClasses]
need not be specified when getting a
cohort table.a
 a double
array of length nClasses containing
the fraction of those dying within each interval who die before
the interval midpoint. A common choice for all a[i]
is 0.5. This choice may also be specified by setting a[0]
to any negative value. In this case, the remaining
values of a
need not be specified.public double[][] getLifeTable()
double
matrix of dimensions nClasses by 12
containing the population table. Entries in the ith row
are for the age interval defined by age[i]
. Column
definitions are described in the following table.
Column  Description 
0  Lowest age in the age interval. 
1  Fraction of those dying within the interval who die before the interval midpoint. 
2  Number surviving to the beginning of the interval. 
3  Number of deaths in the interval. 
4  Death rate in the interval. For cohort table, this column is set to NaN (not a number). 
5  Proportion dying in the interval. 
6  Standard error of the proportion dying in the interval. 
7  Proportion of survivors at the beginning of the interval. 
8  Standard error of the proportion of survivors at the beginning of the interval. 
9  Expected lifetime at the beginning of the interval. 
10  Standard error of the expected life at the beginning of the interval. 
11  Total number of time units lived by all of the population in the interval. 
public double[][] getPopulationTable(int[] nDeaths)
nDeaths
 an int
array of nClasses containing
the number of deaths in each age interval.double
matrix of dimensions nClasses by 12
containing the population table. Entries in the ith row
are for the age interval defined by age[i]
. Column
definitions are the same as in
getLifeTable
.public void setPopulationSize(int initialPopulation)
nCohorts
and nDeaths
when numbers
are available as percentages.initialPopulation
 an int
scalar specifying the
initial population. Default:
initialPopulation = 10000
.Copyright © 19702015 Rogue Wave Software
Built October 13 2015.