autoload("as.date","date")
autoload("mdy.date","date")

# SCCS @(#)survexp.az.s	4.2 11/22/94
#
# Create the Arizona total hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.az  <- {
    temp <- c(
     2143,194,148,102,80,78,72,66,58,50,42,40,48,69,101,138,176,209,233,248,
     263,279,289,290,285,274,263,256,259,269,283,295,307,316,325,335,348,365,
     385,410,436,467,504,549,601,657,717,779,846,918,996,1084,1183,1296,1423,
     1563,1714,1873,2034,2196,2361,2534,2720,2921,3136,3357,3584,3829,4102,
     4405,4735,5086,5462,5862,6291,6778,7320,7871,8399,8913,9475,10144,10894,
     11722,12623,13777,15099,16474,17798,19037,20191,21393,22765,24402,26197,
     27962,29090,30135,31111,32017,32857,33633,34347,35004,35606,36157,36661,
     37121,37540,37922,1711,151,129,90,58,55,45,38,33,29,27,27,30,38,49,62,75,
     85,90,91,91,92,93,95,98,101,104,107,110,112,115,120,127,140,155,173,192,
     210,227,242,258,275,295,319,346,374,403,430,455,481,508,540,584,644,714,
     793,872,941,994,1034,1072,1118,1177,1255,1352,1458,1571,1698,1843,2011,
     2197,2408,2663,2973,3339,3764,4241,4752,5282,5837,6474,7214,8004,8802,
     9606,10552,11647,12832,14091,15427,16879,18446,20041,21585,23069,24584,
     25854,26980,27996,28949,29836,30659,31420,32122,32768,33361,33904,34401,
     34855,35269,1466,149,98,81,65,56,51,46,38,29,21,20,30,55,88,123,153,178,
     195,206,217,228,235,238,238,235,233,231,231,231,232,233,234,236,240,244,
     252,261,273,287,304,325,354,392,438,490,545,599,649,699,748,805,875,961,
     1058,1161,1265,1367,1469,1573,1681,1800,1940,2106,2289,2477,2668,2873,
     3101,3358,3645,3954,4279,4615,4970,5375,5845,6357,6899,7475,8145,8946,
     9816,10686,11522,12466,13520,14624,15793,17035,18314,19653,21138,22782,
     24485,26149,27438,28654,29797,30867,31865,32792,33650,34443,35174,35845,
     36461,37024,37539,38009,1063,111,79,51,37,33,27,22,18,15,14,14,18,25,34,
     43,52,58,63,66,68,71,73,75,76,78,79,81,84,87,90,93,98,103,109,116,125,134,
     144,155,167,181,198,217,239,263,289,316,342,370,399,430,462,494,528,562,
     598,645,707,782,868,957,1044,1121,1193,1261,1340,1438,1570,1734,1925,2129,
     2343,2558,2780,3028,3320,3657,4047,4492,5001,5583,6239,6968,7775,8758,
     9858,10984,12093,13214,14441,15811,17257,18750,20271,21823,23221,24560,
     25834,27040,28176,29242,30237,31163,32023,32817,33550,34224,34843,35411)

    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data
    temp <- array(0, c(110,2,4))
    temp[,,1:2] <- temp2
    fix  <- c(-.00015*(0:109) - .0979, .00050*(0:109) - .1448)
    temp[,,3]   <- exp(log(temp[,,2]) + fix)
    temp[,,4]   <- exp(log(temp[,,3]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,4),
	dimnames =list(0:109, c("male", "female"), 10*(197:200)),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 197:200*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.azr.s	4.2 11/22/94
#
# Create the Arizona hazards table, by race
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.azr  <- {
    temp1 <- c(
     1960,170,126,96,73,71,65,60,53,45,38,36,43,61,88,121,153,182,204,218,233,
     249,257,255,245,229,214,203,203,211,223,234,244,251,257,265,277,293,314,
     339,367,398,438,488,546,609,674,740,805,873,946,1029,1126,1240,1372,1518,
     1674,1838,2002,2166,2332,2508,2693,2891,3103,3319,3542,3786,4062,4371,
     4704,5055,5434,5843,6286,6797,7364,7932,8457,8950,9479,10116,10852,11703,
     12668,13924,15362,16847,18244,19512,20665,21873,23285,25039,27025,29014,
     30431,31784,33085,34324,35479,36553,37550,38471,39320,40101,40818,41475,
     42075,42624,1539,119,96,77,55,49,43,37,33,29,26,25,28,35,46,59,71,81,85,
     85,83,83,83,84,86,88,90,92,93,94,95,97,103,114,129,147,165,182,198,213,
     227,244,264,290,320,351,382,410,435,460,484,514,556,614,684,762,840,908,
     960,999,1035,1079,1137,1215,1312,1420,1534,1663,1811,1980,2167,2380,2636,
     2949,3318,3749,4232,4752,5291,5857,6505,7261,8071,8899,9747,10746,11907,
     13152,14441,15774,17202,18754,20370,22003,23631,25298,26762,28133,29413,
     30615,31742,32794,33772,34679,35517,36289,36999,37651,38248,38793,1375,
     138,90,75,62,53,48,43,36,27,20,18,27,49,80,111,138,160,175,185,194,203,
     208,209,207,204,200,197,195,196,196,197,197,198,200,204,209,217,227,241,
     256,277,306,345,391,445,501,557,608,658,708,766,837,925,1025,1131,1236,
     1341,1445,1552,1663,1784,1926,2090,2272,2458,2646,2851,3082,3344,3639,
     3955,4289,4634,4999,5419,5906,6435,6984,7557,8213,8994,9841,10700,11544,
     12506,13579,14708,15898,17159,18462,19838,21372,23083,24869,26617,28001,
     29311,30545,31703,32784,33791,34724,35588,36384,37117,37790,38407,38971,
     39486,988,105,71,44,33,30,25,21,18,15,13,13,17,24,33,43,51,57,61,61,62,63,
     64,65,66,67,69,70,73,76,79,82,86,91,97,105,113,122,130,138,148,160,175,
     195,218,244,272,300,326,352,380,409,441,475,512,548,586,634,696,770,855,
     943,1027,1103,1172,1238,1314,1412,1544,1710,1904,2110,2325,2540,2762,3010,
     3304,3646,4043,4497,5013,5600,6262,6999,7818,8816,9933,11074,12187,13306,
     14532,15917,17400,18960,20573,22228,23729,25173,26551,27859,29094,30255,
     31342,32355,33297,34168,34973,35715,36397,37022)
    temp2 <- c(
     1956,213,151,117,83,79,71,64,54,42,32,32,52,93,149,206,256,300,337,369,
     403,439,471,497,517,536,556,574,589,601,610,619,632,653,682,720,759,796,
     820,833,841,853,874,908,956,1010,1064,1120,1177,1234,1295,1361,1432,1506,
     1584,1668,1756,1839,1913,1985,2050,2128,2251,2436,2667,2920,3164,3378,
     3542,3667,3788,3923,4061,4207,4367,4520,4690,4944,5352,5956,6822,7957,
     9266,10379,11073,11737,12545,13381,14359,15486,16629,17735,18912,20146,
     21378,22554,23274,23944,24563,25135,25662,26146,26590,26996,27367,27706,
     28014,28295,28550,28782,1461,143,133,98,61,53,38,27,21,17,17,20,24,30,38,
     46,55,66,80,97,116,135,151,161,167,172,178,184,190,196,203,209,216,224,
     233,242,253,270,296,328,365,400,428,445,453,456,463,481,517,568,629,688,
     735,763,775,782,800,839,911,1014,1134,1262,1402,1538,1664,1787,1909,2026,
     2148,2285,2439,2612,2812,3027,3242,3460,3683,3900,4127,4391,4719,5129,
     5623,6146,6643,7312,8085,9015,10167,11510,12988,14398,15584,16480,17286,
     18279,19170,20022,20825,21577,22279,22930,23534,24091,24605,25077,25510,
     25907,26269,26600)

    temp3 <- -log(1- c(temp1, temp2, temp2)/100000)/365.24

    # Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(110,2, 4, 2))
    temp[,,1:2,] <- temp3
    fix  <- c(.00061*(0:109) - .1271, .00041*(0:109) - .1770,
	     -.00015*(0:109) - .0979, .00050*(0:109) - .1448)
    temp[,,3,]   <- exp(log(temp[,,2,]) + fix)
    temp[,,4,]   <- exp(log(temp[,,3,]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,4,2),
	dimnames =list(0:109, c("male", "female"), 10* 197:200,
			      c("white", "nonwhite")),
	dimid    =c("age", "sex", "year", "race"),
	factor   =c(0,1,10,1),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 197:200*10), NULL),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2),
			    sum(R[,4]==1), sum(R[,4]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n",
			   " white:",x[7], " nonwhite:", x[8], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.fl.s	4.2 11/22/94
#
# Create the Florida total hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.fl  <- {
    temp <- c(
     2448,179,125,91,75,68,63,59,54,49,46,46,55,73,100,131,162,188,207,218,229,
     242,250,252,249,243,237,233,235,240,248,256,268,284,303,326,352,381,412,
     444,478,514,557,606,664,727,793,863,937,1016,1101,1196,1305,1434,1581,
     1746,1918,2081,2222,2346,2462,2588,2729,2890,3062,3229,3391,3564,3760,
     3984,4224,4478,4775,5129,5541,6021,6554,7108,7655,8210,8874,9697,10575,
     11401,12135,13070,14209,15471,16851,18319,19779,21255,22838,24564,26320,
     27962,29090,30135,31111,32017,32857,33633,34347,35004,35606,36157,36661,
     37121,37540,37922,1888,160,98,73,57,50,44,39,36,34,33,34,36,41,48,56,65,
     72,77,79,81,84,86,88,90,92,95,99,104,111,120,129,140,152,166,180,197,216,
     237,259,282,304,329,355,385,416,448,482,519,558,601,647,694,741,787,837,
     891,941,985,1027,1066,1111,1172,1254,1353,1461,1570,1688,1816,1959,2116,
     2293,2510,2781,3109,3499,3944,4429,4931,5452,6053,6762,7523,8302,9103,
     10128,11329,12593,13843,15079,16354,17762,19324,21048,22839,24584,25854,
     26980,27996,28949,29836,30659,31420,32122,32768,33361,33904,34401,34855,
     35269,1573,122,95,79,60,54,49,45,39,33,27,27,37,59,87,115,140,161,179,195,
     210,226,237,241,240,238,235,233,231,230,229,229,231,236,246,259,274,292,
     310,330,355,385,417,449,483,519,562,618,688,768,853,937,1021,1106,1193,
     1284,1380,1480,1582,1691,1804,1927,2060,2203,2352,2494,2640,2814,3033,
     3297,3593,3901,4219,4540,4872,5243,5668,6133,6635,7185,7834,8604,9436,
     10262,11061,12060,13219,14423,15637,16875,18162,19564,21114,22800,24505,
     26149,27438,28654,29797,30867,31865,32792,33650,34443,35174,35845,36461,
     37024,37539,38009,1306,103,82,50,36,35,29,25,21,19,17,18,22,30,39,49,58,
     65,71,75,80,84,87,88,88,87,86,86,87,89,91,94,97,102,107,115,123,135,149,
     166,186,208,229,248,267,286,309,336,368,402,437,472,507,544,582,622,665,
     710,761,817,878,943,1012,1083,1155,1226,1303,1399,1523,1675,1849,2033,
     2228,2429,2643,2879,3153,3483,3890,4379,4968,5649,6388,7134,7882,8772,
     9817,10909,12015,13154,14399,15783,17250,18765,20295,21823,23221,24560,
     25834,27040,28176,29242,30237,31163,32023,32817,33550,34224,34843,35411)

    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data
    temp <- array(0, c(110,2,4))
    temp[,,1:2] <- temp2
    fix  <- c(-.00015*(0:109) - .0979, .00050*(0:109) - .1448)
    temp[,,3]   <- exp(log(temp[,,2]) + fix)
    temp[,,4]   <- exp(log(temp[,,3]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,4),
	dimnames =list(0:109, c("male", "female"), 10*(197:200)),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 197:200*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.flr.s	4.3 01/23/95
#
# Create the Florida hazards table, by race
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.flr  <- {
    temp1 <- c(
     2053,150,109,86,69,61,57,53,48,43,38,38,46,64,90,121,150,175,190,197,203,
     210,212,210,204,194,184,177,175,178,184,191,201,214,231,251,275,300,326,
     353,381,413,451,498,554,616,680,746,814,886,964,1052,1157,1284,1430,1596,
     1770,1933,2068,2181,2285,2401,2539,2704,2886,3065,3236,3416,3616,3840,
     4075,4326,4624,4989,5420,5926,6483,7060,7627,8203,8899,9771,10705,11582,
     12356,13319,14507,15829,17280,18818,20339,21871,23521,25348,27236,29014,
     30431,31784,33085,34324,35479,36553,37550,38471,39320,40101,40818,41475,
     42075,42624,1505,141,79,62,49,45,40,37,34,32,31,31,33,37,43,50,57,62,65,
     66,66,67,68,69,71,73,75,77,80,82,86,90,98,108,120,135,151,167,183,197,212,
     228,248,273,302,334,365,398,432,468,508,551,594,637,679,725,775,820,857,
     892,924,963,1019,1098,1195,1302,1412,1531,1662,1810,1970,2150,2371,2650,
     2990,3396,3860,4365,4888,5430,6057,6805,7610,8438,9293,10370,11635,12958,
     14248,15498,16766,18170,19751,21542,23440,25298,26762,28133,29413,30615,
     31742,32794,33772,34679,35517,36289,36999,37651,38248,38793,1293,116,84,
     69,54,48,45,41,35,28,22,21,31,54,83,111,136,157,174,188,203,216,224,227,
     225,221,217,213,208,204,200,196,196,200,209,221,234,250,267,285,308,335,
     364,393,423,455,494,545,609,683,761,839,919,1000,1084,1173,1266,1364,1467,
     1576,1691,1815,1948,2089,2234,2372,2515,2689,2909,3176,3474,3783,4104,
     4429,4768,5150,5588,6066,6580,7139,7795,8571,9409,10249,11071,12104,13298,
     14534,15768,17015,18318,19755,21355,23110,24897,26617,28001,29311,30545,
     31703,32784,33791,34724,35588,36384,37117,37790,38407,38971,39486,1032,97,
     74,41,30,29,24,21,18,16,14,15,20,28,38,49,57,65,69,73,76,79,81,81,80,79,
     78,78,77,77,77,78,80,83,88,95,102,112,125,140,157,177,197,214,230,248,269,
     293,321,351,382,413,446,480,516,553,592,637,688,745,808,876,944,1011,1078,
     1142,1215,1307,1428,1579,1750,1932,2125,2326,2543,2783,3063,3402,3818,
     4315,4909,5595,6341,7106,7890,8826,9919,11057,12194,13355,14626,16050,
     17558,19109,20668,22228,23729,25173,26551,27859,29094,30255,31342,32355,
     33297,34168,34973,35715,36397,37022)
    temp2 <- c(
     3636,268,178,110,94,92,85,80,76,74,73,76,87,107,136,171,208,246,283,319,
     364,415,462,495,514,527,542,554,564,574,581,589,605,634,674,721,771,831,
     900,976,1057,1140,1224,1309,1398,1494,1599,1712,1831,1953,2078,2207,2340,
     2478,2624,2771,2926,3107,3321,3562,3825,4090,4333,4529,4687,4820,4962,
     5144,5404,5752,6192,6675,7133,7457,7629,7747,7902,8044,8195,8347,8423,
     8424,8464,8622,8899,9661,10480,11341,12205,13090,14020,15072,16325,17861,
     19572,21270,21795,22278,22723,23132,23506,23848,24160,24445,24705,24941,
     25155,25350,25526,25686,3024,218,158,105,84,69,56,48,43,41,41,44,49,58,68,
     82,97,112,125,136,149,163,176,183,187,189,194,204,224,249,279,308,334,355,
     375,394,418,457,514,584,658,729,793,848,899,953,1014,1076,1135,1193,1251,
     1313,1383,1462,1552,1645,1743,1859,2001,2165,2344,2529,2708,2867,3003,
     3128,3254,3390,3558,3767,4028,4318,4608,4838,4993,5122,5274,5430,5606,
     5799,5982,6137,6277,6405,6522,6970,7529,8251,9168,10272,11539,12901,14271,
     15563,16837,18220,18719,19180,19605,19996,20355,20684,20985,21259,21510,
     21738,21945,22134,22305,22460,2330,140,129,109,80,72,64,58,53,48,46,48,59,
     78,102,128,153,176,199,222,248,276,299,314,321,326,332,341,357,378,401,
     425,447,467,485,506,531,558,586,616,649,686,731,788,858,934,1020,1127,
     1256,1402,1557,1712,1864,2012,2158,2312,2473,2628,2774,2916,3055,3206,
     3385,3597,3829,4056,4273,4499,4751,5039,5372,5727,6067,6344,6559,6751,
     6969,7219,7548,7981,8554,9249,9986,10551,10827,11115,11548,12166,13105,
     14336,15660,16950,18290,19666,21079,22554,23274,23944,24563,25135,25662,
     26146,26590,26996,27367,27706,28014,28295,28550,28782,2036,119,105,78,54,
     52,44,38,33,29,27,27,30,36,44,53,61,69,78,87,97,107,115,119,120,120,121,
     125,134,146,161,176,191,204,215,227,243,262,285,312,342,374,406,438,473,
     510,552,606,671,744,820,895,974,1059,1152,1257,1367,1465,1542,1604,1658,
     1725,1821,1954,2114,2274,2427,2592,2780,2999,3258,3537,3804,4018,4180,
     4317,4475,4678,4974,5386,5945,6605,7251,7653,7733,7777,7986,8397,9116,
     10103,11212,12378,13681,15115,16660,18279,19170,20022,20825,21577,22279,
     22930,23534,24091,24605,25077,25510,25907,26269,26600)
    temp3 <- c(
     2418,144,130,109,81,74,65,59,54,49,47,50,60,80,105,132,157,182,206,230,
     259,289,314,330,337,341,348,358,374,397,423,449,474,497,519,544,573,603,
     634,665,698,736,783,842,916,997,1087,1197,1330,1479,1637,1794,1949,2099,
     2248,2407,2572,2731,2880,3023,3163,3316,3497,3713,3948,4179,4400,4630,
     4888,5182,5525,5893,6250,6548,6784,7003,7251,7531,7885,8340,8938,9664,
     10438,11042,11354,11618,12018,12594,13488,14669,15930,17143,18413,19733,
     21105,22554,23274,23944,24563,25135,25662,26146,26590,26996,27367,27706,
     28014,28295,28550,28782,2107,124,110,80,54,53,45,38,33,29,28,28,31,37,46,
     54,63,71,80,90,101,111,119,123,124,124,125,129,138,153,170,187,204,217,
     230,242,258,279,305,335,368,402,436,469,504,540,583,637,705,783,861,939,
     1020,1107,1201,1308,1419,1519,1598,1663,1721,1792,1892,2028,2189,2349,
     2503,2671,2868,3100,3377,3676,3963,4190,4359,4500,4664,4873,5181,5610,
     6196,6893,7586,8027,8127,8147,8331,8705,9372,10297,11335,12438,13700,
     15118,16661,18279,19170,20022,20825,21577,22279,22930,23534,24091,24605,
     25077,25510,25907,26269,26600)

    temp3 <- -log(1- c(temp1,temp2, temp2[1:220], temp3)/100000)/365.24

    # Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(110,2, 4, 3))
    temp[,,1:2,] <- temp3
    fix  <- c(.00061*(0:109) - .1271, .00041*(0:109) - .1770,
	       rep(c(-.00015*(0:109) - .0979, .00050*(0:109) - .1448), 2))
    temp[,,3,]   <- exp(log(temp[,,2,]) + fix)
    temp[,,4,]   <- exp(log(temp[,,3,]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,4,3),
	dimnames =list(0:109, c("male", "female"), 10* 197:200,
			      c("white", "nonwhite", "black")),
	dimid    =c("age", "sex", "year", "race"),
	factor   =c(0,1,10,1),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 197:200*10), NULL),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2),
			    sum(R[,4]==1), sum(R[,4]==2), sum(R[,4]==3))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n",
			   " white:",x[7], " nonwhite:", x[8]," black:", x[9],
			   "\n")
		     },
	class='ratetable')
    temp
    }
#SCCS 12/02/93 @(#)survexp.minnwhite.s	4.4
"survexp.minnwhite"<-
structure(.Data = c(7.52761e-05, 4.84479e-06, 3.86508e-06, 2.6268e-06, 
	2.14857e-06, 2.06528e-06, 1.98199e-06, 1.89838e-06, 1.78619e-06, 
	1.78734e-06, 1.78848e-06, 1.84661e-06, 1.98999e-06, 2.30454e-06, 
	2.70521e-06, 3.16426e-06, 3.62486e-06, 3.91557e-06, 4.12182e-06, 
	4.214e-06, 4.27807e-06, 4.28477e-06, 4.32024e-06, 4.24047e-06, 
	4.16023e-06, 4.05073e-06, 3.96983e-06, 3.91753e-06, 3.894e-06, 
	3.98699e-06, 4.02196e-06, 4.17395e-06, 4.41422e-06, 4.74376e-06, 
	5.13367e-06, 5.64349e-06, 6.2154e-06, 6.8208e-06, 7.48982e-06, 
	8.22399e-06, 9.02417e-06, 9.89223e-06, 1.08898e-05, 1.19597e-05, 
	1.31344e-05, 1.43562e-05, 1.56891e-05, 1.71681e-05, 1.87054e-05, 
	2.02739e-05, 2.20342e-05, 2.39315e-05, 2.61989e-05, 2.87248e-05, 
	3.14269e-05, 3.44522e-05, 3.76898e-05, 4.12963e-05, 4.50254e-05, 
	4.89663e-05, 5.32529e-05, 5.7961e-05, 6.32913e-05, 6.91247e-05, 
	7.53717e-05, 8.21796e-05, 8.95945e-05, 9.78063e-05, 0.000106405, 
	0.000115326, 0.000125133, 0.000136312, 0.000149374, 0.000164515, 
	0.000181436, 0.000199922, 0.000219703, 0.000240562, 0.000261729, 
	0.000283364, 0.000306822, 0.000332874, 0.000362791, 0.000396924, 
	0.000434677, 0.00047582, 0.000520026, 0.000566925, 0.00061769, 
	0.000672824, 0.000731101, 0.000790927, 0.000850872, 0.000909918, 
	0.000971149, 0.00103074, 0.00109895, 0.00116065, 0.00122293, 0.0013028,
	0.00135612, 0.00147516, 0.00155926, 0.00164692, 0.00173841, 0.00183403,
	0.00193411, 0.00203902, 0.00214919, 0.00226511, 5.99256e-05, 
	3.83664e-06, 2.97214e-06, 1.99261e-06, 1.68511e-06, 1.57375e-06, 
	1.4059e-06, 1.32215e-06, 1.23839e-06, 1.15448e-06, 1.09864e-06, 
	1.07089e-06, 1.04297e-06, 1.09979e-06, 1.18501e-06, 1.27007e-06, 
	1.32721e-06, 1.44085e-06, 1.49815e-06, 1.58388e-06, 1.64135e-06, 
	1.72741e-06, 1.78521e-06, 1.81477e-06, 1.81591e-06, 1.87388e-06, 
	1.87519e-06, 1.96174e-06, 2.02004e-06, 2.10709e-06, 2.22272e-06, 
	2.36709e-06, 2.54056e-06, 2.80012e-06, 3.08927e-06, 3.43662e-06, 
	3.81393e-06, 4.19275e-06, 4.57343e-06, 4.92718e-06, 5.36944e-06, 
	5.81438e-06, 6.43621e-06, 7.12052e-06, 7.95622e-06, 8.82836e-06, 
	9.73828e-06, 1.06284e-05, 1.14696e-05, 1.22615e-05, 1.3094e-05, 
	1.40583e-05, 1.5279e-05, 1.66717e-05, 1.83039e-05, 2.00608e-05, 
	2.20423e-05, 2.42587e-05, 2.65963e-05, 2.90965e-05, 3.18688e-05, 
	3.50305e-05, 3.87423e-05, 4.29114e-05, 4.74424e-05, 5.24811e-05, 
	5.81922e-05, 6.47291e-05, 7.18599e-05, 7.95628e-05, 8.80581e-05, 
	9.76098e-05, 0.000108585, 0.000120767, 0.000133952, 0.00014853, 
	0.000164632, 0.000182761, 0.000202796, 0.000224461, 0.000248076, 
	0.000273937, 0.000302273, 0.000332945, 0.000365893, 0.00040147, 
	0.000440253, 0.000482888, 0.0005294, 0.000580422, 0.000635177, 
	0.000693086, 0.000753702, 0.000816889, 0.000885097, 0.000956416, 
	0.00103019, 0.00110663, 0.00118396, 0.00126125, 0.00135373, 0.00144142,
	0.00153733, 0.00163835, 0.00174492, 0.00185758, 0.00197691, 0.0021036,
	0.00223846, 0.00238244, 6.84742e-05, 4.0455e-06, 2.67221e-06, 
	2.1115e-06, 1.83126e-06, 1.71973e-06, 1.63613e-06, 1.58061e-06, 
	1.4686e-06, 1.35627e-06, 1.24394e-06, 1.18778e-06, 1.32982e-06, 
	1.67026e-06, 2.12472e-06, 2.63693e-06, 3.12227e-06, 3.58074e-06, 
	4.01248e-06, 4.38921e-06, 4.79623e-06, 5.14822e-06, 5.30125e-06, 
	5.11045e-06, 4.68818e-06, 4.20599e-06, 3.77945e-06, 3.52453e-06, 
	3.52894e-06, 3.67846e-06, 3.94466e-06, 4.21204e-06, 4.42223e-06, 
	4.57522e-06, 4.69978e-06, 4.82484e-06, 5.09737e-06, 5.5475e-06, 
	6.20657e-06, 7.04722e-06, 8.01269e-06, 9.07591e-06, 1.01197e-05, 
	1.11749e-05, 1.22731e-05, 1.34162e-05, 1.46975e-05, 1.62741e-05, 
	1.82172e-05, 2.03844e-05, 2.27871e-05, 2.53436e-05, 2.77149e-05, 
	2.99311e-05, 3.20869e-05, 3.42494e-05, 3.67904e-05, 3.97347e-05, 
	4.33877e-05, 4.75937e-05, 5.21532e-05, 5.70346e-05, 6.21683e-05, 
	6.75926e-05, 7.33915e-05, 7.94596e-05, 8.61776e-05, 9.36448e-05, 
	0.000102298, 0.000111968, 0.000122606, 0.000133998, 0.0001462, 
	0.000159039, 0.000172822, 0.000187482, 0.000203738, 0.000222269, 
	0.000244095, 0.000269483, 0.000300065, 0.000334951, 0.000370499, 
	0.000403161, 0.000431606, 0.000467429, 0.000506642, 0.000550898, 
	0.000604473, 0.000666784, 0.000735587, 0.000804979, 0.000873862, 
	0.000937995, 0.000993902, 0.00103144, 0.00109405, 0.00115856, 
	0.00122238, 0.00129445, 0.00134461, 0.00140485, 0.00145846, 0.00151039,
	0.00156053, 0.00160877, 0.00165497, 0.00169904, 0.00174084, 0.00178026,
	4.99534e-05, 3.62715e-06, 2.34635e-06, 1.81706e-06, 1.56641e-06, 
	1.31529e-06, 1.06403e-06, 9.24293e-07, 7.8456e-07, 7.56647e-07, 
	7.56973e-07, 7.57137e-07, 8.13453e-07, 8.6977e-07, 1.01049e-06, 
	1.09505e-06, 1.26402e-06, 1.32084e-06, 1.4059e-06, 1.40656e-06, 
	1.43546e-06, 1.46436e-06, 1.49342e-06, 1.52232e-06, 1.55138e-06, 
	1.58061e-06, 1.63792e-06, 1.6954e-06, 1.75304e-06, 1.81085e-06, 
	1.89691e-06, 2.01171e-06, 2.12652e-06, 2.2985e-06, 2.47097e-06, 
	2.70063e-06, 2.93113e-06, 3.21932e-06, 3.47992e-06, 3.7417e-06, 
	4.09028e-06, 4.44037e-06, 4.93584e-06, 5.57775e-06, 6.368e-06, 
	7.22147e-06, 8.11073e-06, 8.97866e-06, 9.79675e-06, 1.05943e-05, 
	1.14892e-05, 1.24544e-05, 1.34922e-05, 1.44553e-05, 1.55537e-05, 
	1.66704e-05, 1.79593e-05, 1.96408e-05, 2.17904e-05, 2.43025e-05, 
	2.71952e-05, 3.02683e-05, 3.33123e-05, 3.62035e-05, 3.90725e-05, 
	4.20927e-05, 4.56899e-05, 5.03297e-05, 5.64598e-05, 6.38667e-05, 
	7.21864e-05, 8.10241e-05, 9.04502e-05, 0.000100384, 0.000111032, 
	0.000122146, 0.000134547, 0.000149518, 0.00016816, 0.000190286, 
	0.000216414, 0.000245274, 0.000275299, 0.000304528, 0.000333376, 
	0.000383235, 0.000438764, 0.000497699, 0.000559598, 0.000624493, 
	0.000693491, 0.000765579, 0.000838144, 0.000908873, 0.000974796, 
	0.00103244, 0.00109363, 0.00115624, 0.00121963, 0.001298, 0.00135405,
	0.00143862, 0.0015032, 0.00156692, 0.00162968, 0.00169138, 0.00175192,
	0.00181118, 0.00186905, 0.00192542, 5.42786e-05, 3.38123e-06, 
	2.29392e-06, 1.95978e-06, 1.54077e-06, 1.4575e-06, 1.40215e-06, 
	1.31872e-06, 1.20705e-06, 1.06714e-06, 9.27068e-07, 8.43162e-07, 
	1.0402e-06, 1.4624e-06, 2.13877e-06, 2.9014e-06, 3.60983e-06, 
	4.23623e-06, 4.72414e-06, 5.07268e-06, 5.45152e-06, 5.88961e-06, 
	6.04497e-06, 5.80097e-06, 5.18255e-06, 4.4747e-06, 3.79203e-06, 
	3.39431e-06, 3.25445e-06, 3.37372e-06, 3.58009e-06, 3.84514e-06, 
	3.99532e-06, 4.17526e-06, 4.23982e-06, 4.39199e-06, 4.69063e-06, 
	5.10751e-06, 5.67325e-06, 6.3891e-06, 7.11005e-06, 7.95442e-06, 
	8.89516e-06, 9.99345e-06, 1.12528e-05, 1.26774e-05, 1.4212e-05, 
	1.57402e-05, 1.73248e-05, 1.90006e-05, 2.07416e-05, 2.27399e-05, 
	2.51646e-05, 2.81322e-05, 3.15436e-05, 3.5364e-05, 3.92304e-05, 
	4.3057e-05, 4.66133e-05, 5.00987e-05, 5.36572e-05, 5.77e-05, 
	6.23883e-05, 6.80969e-05, 7.47124e-05, 8.23179e-05, 9.03977e-05, 
	9.86125e-05, 0.000106465, 0.000113996, 0.000121246, 0.000129271, 
	0.000139342, 0.000152566, 0.000168533, 0.000186395, 0.000204629, 
	0.000223063, 0.000241619, 0.000260647, 0.000282737, 0.000308314, 
	0.000335451, 0.000362596, 0.000389814, 0.000423668, 0.000465129, 
	0.00050943, 0.000554052, 0.000598433, 0.000645319, 0.000698276, 
	0.000757102, 0.00081847, 0.000880576, 0.000937687, 0.000994485, 
	0.00104673, 0.00109743, 0.00115214, 0.00119814, 0.00126451, 0.00132013,
	0.00137556, 0.00143079, 0.00148577, 0.00154046, 0.00159483, 0.00164883,
	0.00170242, 3.86842e-05, 2.30585e-06, 1.89054e-06, 1.44656e-06, 
	1.08542e-06, 1.05799e-06, 9.46984e-07, 8.91645e-07, 8.08393e-07, 
	6.97067e-07, 6.41407e-07, 6.13658e-07, 6.69645e-07, 7.81459e-07, 
	1.03285e-06, 1.25668e-06, 1.53685e-06, 1.70536e-06, 1.76251e-06, 
	1.70765e-06, 1.62454e-06, 1.59759e-06, 1.5424e-06, 1.5713e-06, 
	1.57228e-06, 1.62927e-06, 1.65834e-06, 1.68756e-06, 1.80122e-06, 
	1.91504e-06, 2.05728e-06, 2.2281e-06, 2.39943e-06, 2.51459e-06, 
	2.60181e-06, 2.71746e-06, 2.89029e-06, 3.09205e-06, 3.40819e-06, 
	3.75379e-06, 4.15794e-06, 4.53534e-06, 5.02903e-06, 5.52543e-06, 
	6.13967e-06, 6.81573e-06, 7.4967e-06, 8.18323e-06, 8.93412e-06, 
	9.6921e-06, 1.05166e-05, 1.13801e-05, 1.23426e-05, 1.34367e-05, 
	1.4696e-05, 1.60051e-05, 1.75181e-05, 1.909e-05, 2.07249e-05, 
	2.24889e-05, 2.44512e-05, 2.66535e-05, 2.90459e-05, 3.15446e-05, 
	3.4355e-05, 3.73668e-05, 4.08663e-05, 4.51643e-05, 5.04316e-05, 
	5.65481e-05, 6.30672e-05, 6.9907e-05, 7.76274e-05, 8.6522e-05, 
	9.65392e-05, 0.000107592, 0.000119453, 0.000132733, 0.000147712, 
	0.000164547, 0.000183729, 0.000205019, 0.000227775, 0.000251761, 
	0.000277835, 0.000311117, 0.000350855, 0.000391633, 0.000430778, 
	0.000468442, 0.000510582, 0.000561337, 0.000617662, 0.000676829, 
	0.00073752, 0.000798575, 0.000852964, 0.000904674, 0.000953719, 
	0.00099972, 0.00104544, 0.00111288, 0.00116761, 0.00122234, 0.00127703,
	0.00133167, 0.00138623, 0.00144067, 0.00149498, 0.00154911, 3.09754e-05,
	2.13296e-06, 1.71866e-06, 1.41454e-06, 1.19322e-06, 1.02714e-06, 
	9.71977e-07, 8.88967e-07, 7.78083e-07, 6.39305e-07, 5.0043e-07, 
	5.00521e-07, 7.23137e-07, 1.19638e-06, 1.80947e-06, 2.39591e-06, 
	2.92808e-06, 3.35021e-06, 3.71795e-06, 3.97512e-06, 4.31758e-06, 
	4.60544e-06, 4.72582e-06, 4.64938e-06, 4.4313e-06, 4.12727e-06, 
	3.87852e-06, 3.6287e-06, 3.49149e-06, 3.41063e-06, 3.35793e-06, 
	3.24802e-06, 3.25188e-06, 3.28432e-06, 3.43132e-06, 3.63617e-06, 
	3.87052e-06, 4.1346e-06, 4.42864e-06, 4.69528e-06, 5.10769e-06, 
	5.63817e-06, 6.22993e-06, 6.88388e-06, 7.65939e-06, 8.47063e-06, 
	9.46548e-06, 1.07358e-05, 1.23467e-05, 1.41577e-05, 1.61165e-05, 
	1.80794e-05, 1.99898e-05, 2.18803e-05, 2.37843e-05, 2.57991e-05, 
	2.79953e-05, 3.05753e-05, 3.36259e-05, 3.72105e-05, 4.107e-05, 
	4.53338e-05, 5.01798e-05, 5.5668e-05, 6.17288e-05, 6.83287e-05, 
	7.52093e-05, 8.21942e-05, 8.91173e-05, 9.6194e-05, 0.00010363, 
	0.000111939, 0.000121088, 0.000131283, 0.000142785, 0.000155157, 
	0.000168754, 0.000183913, 0.000200868, 0.000219409, 0.000239971, 
	0.000262253, 0.000285869, 0.000310382, 0.000336393, 0.000368587, 
	0.000404523, 0.000441941, 0.000478975, 0.000518202, 0.000562169, 
	0.000613909, 0.000671463, 0.0007315, 0.000789525, 0.000847006, 
	0.00089961, 0.000950774, 0.000995802, 0.00104517, 0.0010888, 0.00113559,
	0.00118127, 0.00122562, 0.00126857, 0.00131005, 0.00134997, 0.00138826,
	0.00142483, 0.00145962, 2.4034e-05, 1.38134e-06, 1.13322e-06, 
	9.67756e-07, 8.57441e-07, 8.02365e-07, 7.47241e-07, 6.92072e-07, 
	6.36861e-07, 5.26214e-07, 4.43206e-07, 4.15571e-07, 4.43345e-07, 
	5.82e-07, 7.76192e-07, 9.7055e-07, 1.10962e-06, 1.2211e-06, 1.30496e-06,
	1.33337e-06, 1.38962e-06, 1.41814e-06, 1.4467e-06, 1.39178e-06, 
	1.36463e-06, 1.2817e-06, 1.22654e-06, 1.1713e-06, 1.1997e-06, 
	1.25607e-06, 1.28458e-06, 1.39696e-06, 1.4536e-06, 1.59425e-06, 
	1.73516e-06, 1.93235e-06, 2.12997e-06, 2.38417e-06, 2.63903e-06, 
	2.86651e-06, 3.2073e-06, 3.5211e-06, 3.92079e-06, 4.32219e-06, 
	4.78212e-06, 5.24446e-06, 5.79476e-06, 6.37703e-06, 6.96335e-06, 
	7.64008e-06, 8.23621e-06, 8.95302e-06, 9.76361e-06, 1.0699e-05, 
	1.18203e-05, 1.30146e-05, 1.42848e-05, 1.56338e-05, 1.69759e-05, 
	1.84325e-05, 2.00088e-05, 2.17714e-05, 2.37904e-05, 2.62024e-05, 
	2.88078e-05, 3.18109e-05, 3.49484e-05, 3.82678e-05, 4.16556e-05, 
	4.52928e-05, 4.92053e-05, 5.36678e-05, 5.89507e-05, 6.51431e-05, 
	7.22064e-05, 7.97997e-05, 8.80169e-05, 9.76333e-05, 0.000109239, 
	0.000122679, 0.000137651, 0.000153738, 0.000171404, 0.000190903, 
	0.000212622, 0.000240162, 0.000271303, 0.000304002, 0.000337972, 
	0.000374507, 0.000417458, 0.000467595, 0.00052079, 0.000575182, 
	0.000630365, 0.000688221, 0.000741903, 0.000793936, 0.000844399, 
	0.00089453, 0.00094034, 0.000983812, 0.00103179, 0.00107902, 0.00112545,
	0.00117102, 0.00121568, 0.00125937, 0.00130202, 0.00134358), .Dim = c(
	110, 2, 4), .Dimnames = list(c("0", "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", "28", "29", "30", "31",
	"32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43",
	"44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55",
	"56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67",
	"68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79",
	"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91",
	"92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102",
	"103", "104", "105", "106", "107", "108", "109"), c("Male", "Female"),
	c("1950", "1960", "1970", "1980")))

attributes(survexp.minnwhite) <- list(dim=c(110, 2, 4),
	     dimnames=list(0:109, c("Male", "Female"), 10*195:198),
	     dimid=c("age", "sex", "year"),
	     factor=c(0,1,10),
	     cutpoints=list(round(365.249999 * 0:109), NULL,
				mdy.date(1,1, 10*195:198)),
	     class='ratetable'
	     )
# SCCS @(#)survexp.mn.s	4.2 11/22/94
#
# Create the Minnesota total hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.mn  <- {
    temp <- c(
     1975,123,85,73,58,53,50,48,44,38,33,32,38,55,79,107,134,158,176,189,203,
     220,226,217,195,168,144,127,123,127,135,143,150,155,159,165,176,192,214,
     240,269,300,335,375,421,471,525,581,638,699,761,833,920,1028,1152,1289,
     1430,1566,1693,1817,1943,2085,2252,2454,2691,2960,3248,3538,3812,4073,
     4324,4602,4950,5407,5960,6574,7196,7822,8439,9068,9785,10609,11476,12340,
     13203,14266,15539,16875,18181,19442,20736,22169,23684,25237,26697,27962,
     29090,30135,31111,32017,32857,33633,34347,35004,35606,36157,36661,37121,
     37540,37922,1436,84,71,52,39,38,34,31,28,26,23,22,24,30,38,48,58,64,66,65,
     62,61,59,59,60,62,62,64,67,72,77,84,90,94,99,103,110,118,130,143,157,172,
     189,208,229,252,277,303,329,357,386,419,454,494,539,588,642,699,758,821,
     892,972,1058,1148,1248,1356,1481,1636,1825,2043,2276,2522,2797,3111,3467,
     3855,4271,4734,5253,5832,6486,7206,7972,8773,9633,10722,11992,13284,14490,
     15639,16899,18378,19958,21560,23109,24584,25854,26980,27996,28949,29836,
     30659,31420,32122,32768,33361,33904,34401,34855,35269,1171,82,66,57,45,38,
     35,32,28,23,19,19,28,44,66,88,106,122,135,146,158,169,174,172,164,153,144,
     136,131,128,126,124,123,126,131,139,148,158,169,180,194,213,234,259,287,
     317,353,400,457,523,593,663,733,801,870,943,1023,1116,1228,1358,1500,1653,
     1828,2025,2240,2473,2716,2962,3204,3450,3711,3997,4316,4674,5074,5510,
     5982,6503,7075,7696,8374,9104,9872,10673,11521,12563,13713,14881,16025,
     17187,18480,19966,21563,23177,24710,26149,27438,28654,29797,30867,31865,
     32792,33650,34443,35174,35845,36461,37024,37539,38009,903,56,45,36,31,30,
     28,25,23,20,17,16,18,22,28,35,40,44,47,49,51,53,53,53,50,48,46,45,45,47,
     49,52,55,60,65,72,80,89,99,110,122,135,150,165,181,198,217,238,260,282,
     305,330,359,395,436,482,529,578,627,678,733,795,868,954,1051,1159,1274,
     1393,1514,1643,1783,1942,2129,2351,2604,2874,3167,3508,3914,4384,4903,
     5459,6067,6733,7467,8396,9429,10503,11595,12752,14085,15604,17184,18743,
     20278,21823,23221,24560,25834,27040,28176,29242,30237,31163,32023,32817,
     33550,34224,34843,35411)

    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(110,2,4))
    temp[,,1:2] <- temp2
    fix  <- c(.00092*(0:109) - .1615, .00020*(0:109) - .1746)
    temp[,,3]   <- exp(log(temp[,,2]) + fix)
    temp[,,4]   <- exp(log(temp[,,3]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,4),
	dimnames =list(0:109, c("male", "female"), 10 * 197:200),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 197:200*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.mnwhite.s	4.3 11/22/94
#
# Create the Minnesota white total hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
# For the first year, 1950, we had to recreate q from a derived table of
#   hazards.  This should have regenerated integer values, but didn't
#   quite.
#
survexp.mnwhite  <- {
    temp <- c(
     2712,176.8,141.1,95.9,78.4,75.4,72.4,69.3,65.2,65.3,65.3,67.4,72.7,84.1,
     98.8,115.5,132.3,142.9,150.4,153.8,156.1,156.4,157.7,154.8,151.8,147.8,
     144.9,143,142.1,145.5,146.8,152.3,161.1,173.1,187.3,205.9,226.8,248.8,
     273.2,299.9,329.1,360.7,397,435.9,478.6,523,571.4,625.1,680.9,737.8,801.6,
     870.3,952.4,1043.7,1141.3,1250.5,1367.2,1497,1631.1,1772.6,1926.3,2094.8,
     2285.2,2493.2,2715.4,2957,3219.5,3509.3,3811.9,4124.8,4467.6,4856.9,
     5309.7,5831.9,6412.1,7041.9,7711.1,8411.6,9116.9,9832.3,10601.5,11448.2,
     12410.5,13495.7,14680.4,15952.9,17299.1,18703.7,20197.2,21788.1,23435.3,
     25090.2,26712.6,28276.2,29862.5,31372.6,33061.2,34552.9,36024.8,37864.2,
     39062.6,41655.3,43420.3,45203.2,47004,48823,50659.9,52514.8,54387.6,
     56278.6,2165,140,108.5,72.8,61.5,57.5,51.3,48.3,45.2,42.2,40.1,39.1,38.1,
     40.2,43.3,46.4,48.5,52.6,54.7,57.8,59.9,63.1,65.2,66.3,66.3,68.4,68.5,
     71.6,73.8,76.9,81.2,86.4,92.8,102.2,112.8,125.4,139.2,153,166.9,179.8,
     195.9,212.1,234.8,259.7,290.2,321.9,355.1,387.4,418.1,446.8,477.1,512.2,
     556.5,607.1,666.3,730,801.9,882.1,966.7,1057.1,1157.3,1271.3,1405.1,
     1555.1,1717.9,1898.6,2103,2336.5,2590.5,2864.2,3165.1,3502.4,3888.4,
     4315.1,4774.8,5280.5,5836,6457.4,7139.4,7871.4,8662.6,9521.3,10452.9,
     11450.5,12509.7,13639.3,14854,16169.6,17581.8,19103.5,20705.3,22364.8,
     24064.8,25797.2,27623,29484,31358.8,33248.7,35107.7,36914,39009.4,40931.9,
     42965.3,45031.4,47129.9,49261.3,51425.3,53621.8,55850.9,58112.6,
     2470,147,97,78,66,63,60,58,54,49,45,44,49,60,78,96,114,131,146,160,175,
     188,193,186,172,154,138,129,128,135,144,154,161,167,171,177,186,202,226,
     257,293,330,369,407,447,489,536,593,662,742,830,920,1008,1088,1165,1244,
     1334,1441,1572,1723,1888,2061,2245,2439,2644,2861,3098,3363,3667,4007,
     4379,4777,5199,5644,6117,6619,7170,7798,8530,9373,10380,11515,12660,13690,
     14584,15696,16895,18228,19809,21622,23552,25471,27336,29018,30408,31416,
     32915,34450,36018,37616,39242,40891,42562,44250,45951,47662,49378,51095,
     52810,54519,1808,133,86,66,58,47,39,33,30,28,27,28,30,33,36,41,45,49,51,
     52,52,53,54,55,57,58,60,62,64,66,69,73,78,84,90,98,107,117,127,137,148,
     162,180,204,232,264,296,327,357,386,419,454,491,527,566,607,654,715,792,
     884,989,1100,1210,1313,1417,1526,1654,1822,2041,2306,2602,2916,3250,3600,
     3974,4364,4796,5315,5956,6715,7600,8569,9565,10526,11466,13063,14807,
     16620,18485,20398,22376,24393,26376,28252,29952,31416,32915,34450,36018,
     37616,39242,40891,42562,44250,45951,47662,49378,51095,52810,54519,1963,
     123,84,71,56,53,51,48,44,39,33,32,38,54,78,106,132,155,172,185,199,215,
     221,211,190,163,139,123,119,123,132,139,147,151,155,161,171,187,207,232,
     260,290,324,364,411,462,517,573,631,692,755,827,914,1022,1146,1283,1423,
     1560,1688,1813,1941,2085,2253,2456,2693,2961,3248,3539,3814,4078,4332,
     4612,4962,5419,5971,6581,7201,7826,8445,9082,9811,10650,11531,12404,13271,
     14340,15624,16981,18320,19632,20995,22519,24150,25847,27493,29014,30431,
     31784,33085,34324,35479,36553,37550,38471,39320,40101,40818,41475,42075,
     42624,1403,85,69,52,40,39,35,32,29,26,23,22,24,29,37,47,56,62,64,62,60,58,
     57,57,58,59,60,62,65,70,75,82,87,92,95,99,105,113,124,137,151,166,183,202,
     224,248,273,299,326,353,383,415,450,490,534,584,637,694,754,818,889,969,
     1055,1146,1247,1356,1481,1636,1826,2044,2276,2522,2796,3110,3466,3853,
     4269,4732,5252,5834,6491,7214,7983,8787,9649,10744,12025,13332,14556,
     15727,17016,18539,20189,21905,23615,25298,26762,28133,29413,30615,31742,
     32794,33772,34679,35517,36289,36999,37651,38248,38793,1125,78,63,51,44,38,
     35,32,28,23,18,18,26,44,66,88,107,123,135,146,157,168,173,170,162,151,141,
     133,127,125,122,119,118,120,125,132,141,151,161,172,186,205,227,251,279,
     309,345,391,449,516,587,658,728,796,865,938,1018,1110,1221,1349,1490,1642,
     1816,2013,2229,2464,2710,2958,3203,3451,3715,4006,4326,4683,5080,5510,
     5978,6497,7072,7702,8392,9135,9913,10718,11563,12594,13737,14904,16056,
     17238,18563,20094,21748,23433,25058,26617,28001,29311,30545,31703,32784,
     33791,34724,35588,36384,37117,37790,38407,38971,39486,874,50,41,35,31,29,
     27,25,23,19,16,15,17,21,28,35,41,45,48,49,50,52,52,51,49,47,45,43,44,45,
     48,50,54,58,63,70,78,87,96,105,116,129,143,158,174,192,211,233,255,278,
     301,326,355,390,430,475,521,569,618,671,728,792,866,951,1048,1155,1269,
     1388,1510,1640,1781,1942,2130,2351,2603,2872,3164,3504,3911,4382,4903,
     5460,6069,6736,7471,8399,9432,10511,11613,12785,14143,15697,17324,18947,
     20568,22228,23729,25173,26551,27859,29094,30255,31342,32355,33297,34168,
     34973,35715,36397,37022)

    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(110,2,6))
    temp[,,1:4] <- temp2
    fix  <- c(.00092*(0:109) - .1615, .00020*(0:109) - .1746)
    temp[,,5]   <- exp(log(temp[,,4]) + fix)
    temp[,,6]   <- exp(log(temp[,,5]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,6),
	dimnames =list(0:109, c("male", "female"), 10* 195:200 ),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 195:200*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.us.s	4.2 11/22/94
#
# Create the US total hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.us  <- {
    temp <- c(
    2913,181,115,88,74,66,60,55,51,47,44,44,50,62,78,97,114,131,145,156,169,
    180,187,187,181,175,169,167,169,174,181,189,199,210,224,240,259,281,308,
    338,373,412,455,501,551,605,665,735,818,911,1014,1120,1228,1333,1440,1549,
    1670,1809,1971,2154,2350,2554,2769,2992,3226,3474,3739,4017,4307,4612,
    4936,5285,5665,6083,6541,7035,7571,8176,8870,9661,10598,11654,12732,13728,
    14623,15768,17002,18343,19868,21564,23320,25056,26792,28481,30050,31416,
    32915,34450,36018,37616,39242,40891,42562,44250,45951,47662,49378,51095,
    52810,54519,2256,158,93,71,60,52,45,39,35,32,30,29,30,34,38,44,50,55,59,
    61,64,67,70,73,76,79,82,87,92,98,106,114,122,131,140,151,163,177,192,210,
    230,251,274,298,324,351,381,415,453,495,541,590,639,686,733,783,841,911,
    997,1097,1209,1327,1451,1578,1711,1854,2014,2199,2415,2661,2929,3219,3546,
    3914,4327,4767,5246,5804,6469,7240,8144,9143,10154,11096,11975,13423,
    15009,16689,18478,20364,22329,24327,26302,28181,29903,31416,32915,34450,
    36018,37616,39242,40891,42562,44250,45951,47662,49378,51095,52810,54519,
    2245,133,94,78,64,58,54,51,46,41,36,35,42,59,84,114,142,167,185,198,212,
    226,235,235,228,217,206,199,198,203,210,218,228,239,252,268,288,312,339,
    369,401,435,473,518,568,623,681,744,812,887,969,1059,1161,1275,1400,1534,
    1676,1827,1987,2158,2339,2532,2738,2960,3200,3463,3746,4044,4350,4665,
    4991,5344,5740,6193,6703,7264,7856,8462,9070,9688,10367,11125,11929,12770,
    13663,14730,15979,17281,18521,19681,20839,22122,23512,25023,26546,27962,
    29090,30135,31111,32017,32857,33633,34347,35004,35606,36157,36661,37121,
    37540,37922,1746,116,77,60,51,43,38,34,31,28,26,25,27,33,40,49,58,66,69,
    71,72,73,75,77,79,81,83,86,90,96,102,110,119,129,140,152,165,180,197,215,
    233,251,273,297,325,354,384,416,449,484,523,565,611,660,712,768,829,894,
    962,1035,1113,1200,1298,1411,1538,1678,1832,2004,2195,2407,2632,2879,3165,
    3503,3893,4325,4790,5295,5840,6432,7097,7834,8612,9419,10275,11282,12462,
    13685,14859,16006,17264,18718,20243,21750,23186,24584,25854,26980,27996,
    28949,29836,30659,31420,32122,32768,33361,33904,34401,34855,35269,1393,
    101,73,58,47,42,39,36,32,26,21,21,30,48,72,96,118,137,153,167,181,194,203,
    205,203,199,196,193,191,191,191,191,193,198,205,216,229,244,261,280,303,
    332,363,398,435,476,522,576,638,705,775,846,924,1010,1105,1206,1310,1423,
    1549,1690,1846,2016,2201,2398,2604,2817,3044,3289,3563,3868,4207,4571,
    4951,5338,5736,6167,6647,7170,7740,8365,9069,9859,10708,11579,12463,13419,
    14479,15554,16618,17700,18848,20125,21542,23080,24641,26149,27438,28654,
    29797,30867,31865,32792,33650,34443,35174,35845,36461,37024,37539,38009,
    1120,86,56,42,33,31,27,24,22,19,18,18,20,26,33,40,47,52,55,57,58,60,62,63,
    64,65,66,67,70,72,75,79,83,89,96,104,114,125,137,149,163,180,199,218,239,
    262,286,315,347,381,416,452,490,532,578,627,678,733,796,867,947,1035,1129,
    1226,1325,1427,1538,1664,1811,1980,2169,2375,2600,2842,3106,3388,3704,
    4073,4515,5033,5622,6269,6973,7722,8519,9409,10405,11420,12427,13471,
    14661,16024,17460,18904,20348,21823,23221,24560,25834,27040,28176,29242,
    30237,31163,32023,32817,33550,34224,34843,35411)

    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data
    temp <- array(0, c(110,2,5))
    temp[,,1:3] <- temp2
    fix  <- c(-.00015*(0:109) - .0979, .00050*(0:109) - .1448)
    temp[,,4]   <- exp(log(temp[,,3]) + fix)
    temp[,,5]   <- exp(log(temp[,,4]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,5),
	dimnames =list(0:109, c("male", "female"), 10*(196:200)),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, (196:200)*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.usr.s	4.4 01/23/95
#
# Create the US total hazards table, by race
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.usr  <- {
    temp1 <- c(
     2592,153,101,81,69,62,57,53,49,45,42,42,47,59,75,93,111,126,139,149,159,
     169,174,172,165,156,149,145,145,149,156,163,171,181,193,207,225,246,270,
     299,332,368,409,454,504,558,617,686,766,856,955,1058,1162,1264,1368,1475,
     1593,1730,1891,2074,2271,2476,2690,2912,3143,3389,3652,3930,4225,4538,
     4871,5230,5623,6060,6542,7066,7636,8271,8986,9788,10732,11799,12895,13920,
     14861,16039,17303,18665,20194,21877,23601,25289,26973,28612,30128,31416,
     32915,34450,36018,37616,39242,40891,42562,44250,45951,47662,49378,51095,
     52810,54519,1964,135,81,63,55,47,41,37,33,30,28,28,29,32,36,41,47,51,54,
     55,56,58,60,62,63,65,68,71,74,79,85,91,97,105,113,122,133,145,158,174,190,
     209,229,252,276,303,331,362,396,432,473,517,560,601,642,687,740,805,886,
     981,1088,1203,1325,1454,1592,1742,1909,2100,2319,2567,2836,3129,3462,3845,
     4278,4742,5245,5827,6509,7294,8213,9231,10264,11235,12151,13625,15237,
     16936,18731,20611,22560,24536,26481,28322,29988,31416,32915,34450,36018,
     37616,39242,40891,42562,44250,45951,47662,49378,51095,52810,54519,2006,
     116,83,72,59,54,51,48,44,39,34,32,39,55,80,107,134,156,172,181,190,201,
     205,203,195,184,173,165,162,165,170,176,183,192,203,217,235,256,281,310,
     340,372,409,452,501,555,612,673,739,812,892,980,1081,1194,1318,1452,1594,
     1745,1906,2077,2258,2451,2657,2879,3120,3386,3674,3977,4284,4597,4916,
     5262,5655,6118,6647,7231,7843,8472,9103,9749,10466,11273,12127,13012,
     13942,15033,16321,17666,18947,20145,21344,22684,24152,25767,27426,29014,
     30431,31784,33085,34324,35479,36553,37550,38471,39320,40101,40818,41475,
     42075,42624,1532,101,67,54,47,40,36,32,29,27,25,24,26,31,38,46,55,61,64,
     64,64,65,65,66,67,68,70,72,75,79,84,90,97,104,113,122,133,146,161,177,193,
     211,230,254,280,308,336,366,397,430,466,507,550,596,646,699,758,819,884,
     953,1027,1110,1203,1309,1429,1563,1713,1883,2075,2288,2513,2759,3048,3396,
     3803,4255,4740,5264,5829,6440,7128,7893,8702,9539,10427,11465,12685,13944,
     15144,16303,17570,19046,20617,22206,23758,25298,26762,28133,29413,30615,
     31742,32794,33772,34679,35517,36289,36999,37651,38248,38793,1231,92,66,53,
     43,39,37,34,30,24,19,19,28,46,71,96,118,137,151,163,175,186,193,193,189,
     183,177,172,168,167,166,165,166,169,175,184,196,209,224,240,261,287,316,
     348,382,420,463,514,573,639,706,775,850,934,1027,1125,1227,1338,1464,1605,
     1762,1933,2119,2316,2523,2738,2968,3218,3495,3805,4148,4516,4901,5295,
     5703,6146,6642,7180,7762,8394,9099,9886,10733,11613,12523,13507,14592,
     15691,16774,17875,19058,20389,21864,23453,25061,26617,28001,29311,30545,
     31703,32784,33791,34724,35588,36384,37117,37790,38407,38971,39486,965,77,
     51,37,30,28,26,23,21,18,17,16,19,25,32,40,47,52,54,55,56,57,57,58,58,58,
     58,59,60,63,65,68,72,77,83,90,99,109,119,130,143,158,174,192,211,231,254,
     280,310,343,376,410,447,488,532,579,628,681,742,811,889,975,1067,1162,
     1259,1359,1470,1595,1740,1907,2092,2294,2517,2760,3027,3315,3637,4015,
     4467,4995,5589,6239,6949,7713,8539,9463,10491,11534,12559,13617,14831,
     16231,17709,19198,20690,22228,23729,25173,26551,27859,29094,30255,31342,
     32355,33297,34168,34973,35715,36397,37022)
    temp2 <- c(
     4699,337,197,134,102,87,76,68,63,60,60,64,72,85,102,120,140,162,186,210,
     236,262,283,298,307,316,327,339,353,370,389,409,431,455,483,513,546,585,
     633,688,749,814,875,931,984,1038,1101,1183,1292,1422,1565,1710,1854,1994,
     2131,2273,2427,2589,2762,2947,3137,3335,3554,3801,4072,4365,4665,4953,
     5213,5448,5690,5944,6177,6375,6548,6673,6803,7037,7460,8065,8836,9668,
     10452,11038,11410,12280,13313,14588,16219,18166,20304,22519,24791,27050,
     29270,31416,32915,34450,36018,37616,39242,40891,42562,44250,45951,47662,
     49378,51095,52810,54519,3828,289,160,115,92,77,66,56,49,43,40,39,41,46,53,
     63,73,84,94,104,116,128,140,150,160,171,182,197,214,234,256,279,303,326,
     350,374,402,434,471,514,561,611,656,696,733,769,814,875,957,1058,1167,
     1279,1392,1504,1617,1731,1852,1983,2130,2287,2459,2632,2784,2901,2995,
     3072,3162,3296,3500,3762,4066,4372,4646,4853,5007,5127,5274,5510,5897,
     6420,7060,7731,8349,8813,9127,10205,11467,12972,14790,16879,19137,21496,
     23959,26478,28995,31416,32915,34450,36018,37616,39242,40891,42562,44250,
     45951,47662,49378,51095,52810,54519,3408,217,155,109,94,82,74,67,60,53,48,
     48,58,80,113,151,190,230,270,309,357,410,452,473,475,468,464,464,474,494,
     515,535,558,587,621,657,697,742,791,843,898,955,1016,1080,1149,1222,1298,
     1381,1472,1573,1683,1802,1927,2054,2182,2314,2453,2602,2763,2939,3127,
     3324,3532,3744,3959,4171,4389,4636,4935,5292,5714,6169,6617,7001,7318,
     7636,8001,8350,8666,8942,9160,9353,9587,9937,10418,11257,12156,13089,
     13980,14832,15687,16620,17656,18827,20064,21270,21795,22278,22723,23132,
     23506,23848,24160,24445,24705,24941,25155,25350,25526,25686,2765,189,130,
     90,68,62,52,45,39,35,33,33,36,44,54,67,80,93,103,111,121,132,141,150,157,
     164,173,183,195,210,225,242,262,286,313,343,373,405,438,472,507,542,581,
     624,672,725,779,836,892,950,1013,1081,1153,1229,1308,1392,1483,1581,1689,
     1809,1937,2073,2226,2392,2566,2738,2909,3093,3308,3561,3863,4194,4519,
     4790,5004,5208,5446,5704,5997,6321,6656,6991,7342,7716,8122,8747,9465,
     10282,11201,12222,13355,14548,15672,16605,17401,18220,18719,19180,19605,
     19996,20355,20684,20985,21259,21510,21738,21945,22134,22305,22460,2061,
     139,101,82,66,58,51,45,39,34,30,31,39,55,76,98,119,140,162,186,212,239,
     262,279,291,302,314,325,335,346,356,367,379,395,413,436,461,491,523,557,
     595,638,687,743,807,877,952,1036,1128,1225,1323,1424,1531,1648,1774,1905,
     2039,2174,2312,2459,2619,2794,2981,3172,3361,3545,3733,3936,4171,4445,
     4754,5084,5421,5742,6046,6356,6699,7083,7538,8088,8772,9578,10433,11190,
     11781,12406,13154,13945,14805,15729,16621,17527,18599,19866,21229,22554,
     23274,23944,24563,25135,25662,26146,26590,26996,27367,27706,28014,28295,
     28550,28782,1739,120,80,63,46,41,34,29,26,24,23,24,26,31,36,43,49,55,60,
     66,72,78,84,90,96,102,109,115,121,127,133,140,148,159,172,187,205,224,245,
     266,290,316,345,378,413,451,492,537,585,636,688,740,796,858,927,1001,1079,
     1161,1247,1340,1441,1552,1668,1785,1898,2007,2120,2253,2422,2631,2875,
     3138,3408,3659,3888,4114,4363,4648,5001,5442,5992,6626,7279,7834,8251,
     8685,9238,9881,10652,11547,12514,13529,14624,15791,17016,18279,19170,
     20022,20825,21577,22279,22930,23534,24091,24605,25077,25510,25907,26269,
     26600)
    temp3 <- c(
     2297,148,110,86,70,63,55,49,43,37,33,34,41,57,78,99,120,142,165,191,221,
     251,279,300,315,330,346,362,377,392,408,424,441,460,483,509,539,572,609,
     648,691,739,794,857,929,1007,1090,1181,1280,1384,1488,1594,1709,1835,1972,
     2116,2262,2408,2556,2711,2877,3058,3252,3452,3651,3846,4044,4260,4511,
     4804,5141,5501,5866,6202,6508,6814,7154,7537,7999,8566,9268,10087,10953,
     11714,12302,12872,13559,14282,15071,15928,16761,17617,18648,19888,21236,
     22554,23274,23944,24563,25135,25662,26146,26590,26996,27367,27706,28014,
     28295,28550,28782,1927,127,87,66,48,44,37,31,27,25,24,24,27,31,37,43,49,
     56,62,68,74,81,88,95,102,109,118,126,133,140,148,157,168,180,194,211,231,
     252,275,298,324,352,385,421,462,505,552,602,655,710,765,821,882,950,1026,
     1107,1192,1280,1372,1470,1577,1695,1817,1936,2050,2158,2272,2408,2587,
     2810,3072,3354,3639,3899,4132,4360,4615,4909,5282,5754,6350,7041,7751,
     8335,8744,9106,9591,10168,10886,11738,12656,13619,14672,15816,17027,18279,
     19170,20022,20825,21577,22279,22930,23534,24091,24605,25077,25510,25907,
     26269,26600)
    temp3 <- -log(1- c(temp1,temp2, temp2[1:440], temp3)/100000)/365.24

    # Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(110,2, 5, 3))
    temp[,,1:3,] <- temp3
    fix  <- c(.00061*(0:109) - .1271, .00041*(0:109) - .1770,
	       rep(c(-.00015*(0:109) - .0979, .00050*(0:109) - .1448), 2))
    temp[,,4,]   <- exp(log(temp[,,3,]) + fix)
    temp[,,5,]   <- exp(log(temp[,,4,]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,5,3),
	dimnames =list(0:109, c("male", "female"), 10* 196:200,
			      c("white", "nonwhite", "black")),
	dimid    =c("age", "sex", "year", "race"),
	factor   =c(0,1,10,1),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, 196:200*10), NULL),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2),
			    sum(R[,4]==1), sum(R[,4]==2), sum(R[,4]==3))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n",
			   " white:",x[7], " nonwhite:", x[8]," black:", x[9],
			   "\n")
		     },
	class='ratetable')
    temp
    }
rm(temp, temp1, temp2, temp3)
# SCCS @(#)survexp.uswhite.s	4.7 02/06/95
#
# Create the US total hazards table, whites only
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.uswhite  <- {
    temp1 <- c(
     3069,211,139,106,90,81,75,68,63,60,60,62,67,76,90,104,120,132,144,153,162,
     170,174,175,174,171,168,169,173,176,182,190,201,215,229,249,269,294,322,
     355,392,432,477,526,579,638,700,771,847,925,1012,1107,1211,1328,1453,1588,
     1731,1882,2041,2207,2381,2569,2772,2985,3207,3445,3706,4000,4320,4662,
     5028,5434,5886,6385,6920,7501,8120,8788,9489,10211,10994,11851,12801,
     13877,15052,16305,17591,18897,20205,21518,22903,24284,25763,27303,28959,
     30553,32227,33911,35617,37357,39112,40866,42600,44312,46014,47709,49403,
     51100,52810,54520,2355,189,112,87,69,61,54,47,44,40,40,39,40,43,48,54,59,
     63,67,69,74,76,80,82,85,88,92,97,101,109,114,123,131,141,150,161,173,188,
     204,222,241,264,287,313,343,372,407,441,480,519,561,608,663,721,784,854,
     930,1019,1117,1224,1340,1468,1608,1751,1900,2063,2254,2490,2764,3068,3410,
     3786,4203,4650,5129,5651,6221,6850,7537,8269,9062,9910,10830,11815,12855,
     13969,15142,16407,17746,19168,20653,22232,23835,25571,27393,29261,31159,
     33050,34954,36895,38839,40752,42600,44367,46076,47750,49417,51100,52810,
     54529)
    temp2 <- c(
     2592,153,101,81,69,62,57,53,49,45,42,42,47,59,75,93,111,126,139,149,159,
     169,174,172,165,156,149,145,145,149,156,163,171,181,193,207,225,246,270,
     299,332,368,409,454,504,558,617,686,766,856,955,1058,1162,1264,1368,1475,
     1593,1730,1891,2074,2271,2476,2690,2912,3143,3389,3652,3930,4225,4538,
     4871,5230,5623,6060,6542,7066,7636,8271,8986,9788,10732,11799,12895,13920,
     14861,16039,17303,18665,20194,21877,23601,25289,26973,28612,30128,31416,
     32915,34450,36018,37616,39242,40891,42562,44250,45951,47662,49378,51095,
     52810,54519,1964,135,81,63,55,47,41,37,33,30,28,28,29,32,36,41,47,51,54,
     55,56,58,60,62,63,65,68,71,74,79,85,91,97,105,113,122,133,145,158,174,190,
     209,229,252,276,303,331,362,396,432,473,517,560,601,642,687,740,805,886,
     981,1088,1203,1325,1454,1592,1742,1909,2100,2319,2567,2836,3129,3462,3845,
     4278,4742,5245,5827,6509,7294,8213,9231,10264,11235,12151,13625,15237,
     16936,18731,20611,22560,24536,26481,28322,29988,31416,32915,34450,36018,
     37616,39242,40891,42562,44250,45951,47662,49378,51095,52810,54519,2006,
     116,83,72,59,54,51,48,44,39,34,32,39,55,80,107,134,156,172,181,190,201,
     205,203,195,184,173,165,162,165,170,176,183,192,203,217,235,256,281,310,
     340,372,409,452,501,555,612,673,739,812,892,980,1081,1194,1318,1452,1594,
     1745,1906,2077,2258,2451,2657,2879,3120,3386,3674,3977,4284,4597,4916,
     5262,5655,6118,6647,7231,7843,8472,9103,9749,10466,11273,12127,13012,
     13942,15033,16321,17666,18947,20145,21344,22684,24152,25767,27426,29014,
     30431,31784,33085,34324,35479,36553,37550,38471,39320,40101,40818,41475,
     42075,42624,1532,101,67,54,47,40,36,32,29,27,25,24,26,31,38,46,55,61,64,
     64,64,65,65,66,67,68,70,72,75,79,84,90,97,104,113,122,133,146,161,177,193,
     211,230,254,280,308,336,366,397,430,466,507,550,596,646,699,758,819,884,
     953,1027,1110,1203,1309,1429,1563,1713,1883,2075,2288,2513,2759,3048,3396,
     3803,4255,4740,5264,5829,6440,7128,7893,8702,9539,10427,11465,12685,13944,
     15144,16303,17570,19046,20617,22206,23758,25298,26762,28133,29413,30615,
     31742,32794,33772,34679,35517,36289,36999,37651,38248,38793,1231,92,66,53,
     43,39,37,34,30,24,19,19,28,46,71,96,118,137,151,163,175,186,193,193,189,
     183,177,172,168,167,166,165,166,169,175,184,196,209,224,240,261,287,316,
     348,382,420,463,514,573,639,706,775,850,934,1027,1125,1227,1338,1464,1605,
     1762,1933,2119,2316,2523,2738,2968,3218,3495,3805,4148,4516,4901,5295,
     5703,6146,6642,7180,7762,8394,9099,9886,10733,11613,12523,13507,14592,
     15691,16774,17875,19058,20389,21864,23453,25061,26617,28001,29311,30545,
     31703,32784,33791,34724,35588,36384,37117,37790,38407,38971,39486,965,77,
     51,37,30,28,26,23,21,18,17,16,19,25,32,40,47,52,54,55,56,57,57,58,58,58,
     58,59,60,63,65,68,72,77,83,90,99,109,119,130,143,158,174,192,211,231,254,
     280,310,343,376,410,447,488,532,579,628,681,742,811,889,975,1067,1162,
     1259,1359,1470,1595,1740,1907,2092,2294,2517,2760,3027,3315,3637,4015,
     4467,4995,5589,6239,6949,7713,8539,9463,10491,11534,12559,13617,14831,
     16231,17709,19198,20690,22228,23729,25173,26551,27859,29094,30255,31342,
     32355,33297,34168,34973,35715,36397,37022)

    temp2 <- -log(1- c(temp1,temp2)/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data
    temp <- array(0, c(110,2,6))
    temp[,,1:4] <- temp2
    fix  <- c( .00061*(0:109) - .1271, .00041*(0:109) - .1770)
    temp[,,5]   <- exp(log(temp[,,4]) + fix)
    temp[,,6]   <- exp(log(temp[,,5]) + fix)

    attributes(temp) <- list (
	dim      =c(110,2,6),
	dimnames =list(0:109, c("male", "female"), 10 * 195:200),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(0:109 * 365.24, NULL, mdy.date(1,1, (195:200)*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2),
			    min(R[,3]), max(R[,3]))

		     paste("age ranges from", x[1], "to", x[2], "years,\n",
			   "male:", x[3], "female:", x[4], "\n",
			   "year of entry from", x[5], "to", x[6], "\n")
		     },
	class='ratetable')
    temp
    }
# SCCS @(#)survexp.wnc.s	4.3 06/07/96
#
# Create the WNC hazards table
#   The raw numbers below are q* 10^5.  Note that there are 24 leap years/100
#
survexp.wnc  <- {
    temp <- c(
      7702,1617,2011,899,559,401,508,430,368,316,279,257,246,247,260,281,284,
      315,353,399,442,489,525,539,542,548,476,484,500,520,542,565,593,626,658,
      690,645,673,696,718,739,765,792,821,856,891,947,988,1028,1066,1104,1140,
      1189,1254,1339,1431,1643,1769,1894,2013,2139,2275,2417,2574,2742,2911,
      3639,3867,4106,4365,4636,4918,5221,5558,5914,6283,8302,8908,9474,10011,
      10606,11279,11914,12411,12686,12875,15759,17203,18714,20308,21961,23607,
      25190,26793,28417,30025,31418,32853,34502,36011,37674,39551,40740,41666,
      46428,46666,49999,49999,49999,49999,49999,6299,1278,1847,811,526,381,448,
      371,310,261,226,206,199,201,218,235,235,260,288,313,342,370,395,414,428,
      443,446,460,473,485,499,513,529,546,567,584,582,598,611,623,636,652,669,
      696,725,759,816,856,898,936,980,1026,1079,1148,1232,1328,1303,1409,1512,
      1609,1714,1821,1940,2133,2181,2386,2787,2975,3181,3409,3646,3904,4158,
      4396,4612,4830,7263,7741,8262,8846,9495,10253,10968,11452,11680,11824,
      13150,14909,16734,18584,20476,22407,24382,26328,28205,29927,31410,32891,
      34506,36041,37499,39344,41080,42201,44444,45713,47368,49999,49999,49999,
      49999,5840,1103,1102,632,444,373,312,263,257,226,202,192,188,216,235,258,
      291,333,363,386,403,417,434,450,466,481,492,505,553,564,579,598,618,625,
      648,668,685,703,647,657,669,689,712,699,735,770,797,828,874,913,963,1021,
      1093,1193,1272,1362,1464,1576,1726,1879,2036,2176,2324,2528,2700,2891,
      3109,3368,3756,4097,4467,4863,5266,5781,6217,6668,7130,7597,8759,9362,
      10000,10699,11456,15226,16821,18609,15759,17203,18714,20308,21961,23607,
      25190,26793,28417,30025,31418,32853,34502,36011,37674,39551,40740,41666,
      46428,46666,49999,49999,49999,49999,49999,4481,873,975,555,400,327,269,
      222,230,197,180,168,165,180,194,217,245,281,320,358,393,427,459,524,548,
      563,584,600,636,645,654,663,673,660,670,679,684,690,659,664,670,682,698,
      674,704,738,771,809,819,864,913,970,1032,1126,1196,1271,1365,1467,1511,
      1647,1779,1907,2041,2146,2299,2478,2681,2916,3265,3572,3895,4230,4577,
      5291,5703,6132,6584,7048,8032,8612,9224,9885,10586,12208,13088,13941,
      13150,14909,16734,18584,20476,22407,24382,26328,28205,29927,31410,32891,
      34506,36041,37499,39344,41080,42201,44444,45713,47368,49999,49999,49999,
      49999,4776,774,823,430,297,256,250,215,185,162,147,138,141,148,161,179,
      213,241,267,285,301,318,338,353,361,366,333,336,343,351,361,369,383,395,
      414,436,428,449,472,499,532,568,607,646,687,727,784,833,887,942,1005,1071,
      1140,1216,1303,1399,1526,1643,1772,1907,2042,2177,2326,2488,2674,2874,
      3434,3709,4012,4330,4660,5000,5352,5710,6094,6507,7753,8361,9017,9716,
      10415,11098,11737,12306,12777,13111,15759,17203,18714,20308,21961,23607,
      25190,26793,28417,30025,31418,32853,34502,36011,37674,39551,40740,41666,
      46428,46666,49999,49999,49999,49999,49999,3596,636,708,367,262,215,219,
      183,153,131,121,113,112,119,131,144,144,163,182,203,223,242,264,281,290,
      292,328,332,336,343,354,362,372,382,394,406,415,430,444,463,485,510,538,
      568,600,635,621,658,698,743,791,843,899,961,1031,1112,1204,1313,1422,1531,
      1653,1787,1929,2084,2258,2451,2730,2970,3234,3518,3820,4137,4470,4819,
      5190,5592,7046,7680,8376,9130,9925,10726,11534,12313,13042,13696,13150,
      14909,16734,18584,20476,22407,24382,26328,28205,29927,31410,32891,34506,
      36041,37499,39344,41080,42201,44444,45713,47368,49999,49999,49999,49999,
      3800,472,414,244,177,124,117,111,105,101,97,96,98,102,110,121,134,148,160,
      170,182,193,202,210,214,217,217,219,223,228,233,239,248,258,271,286,302,
      320,341,364,389,417,446,478,511,549,591,639,692,751,821,895,977,1069,1167,
      1273,1385,1505,1632,1765,1907,2060,2227,2406,2604,2821,3063,3337,3643,
      3987,4370,4793,5255,5759,6303,6892,7532,8222,8976,9792,10677,11637,12677,
      13801,15020,16315,15759,17203,18714,20308,21961,23607,25190,26793,28417,
      30025,31418,32853,34502,36011,37674,39551,40740,41666,46428,46666,49999,
      49999,49999,49999,49999,2963,418,351,195,128,110,98,88,79,74,71,69,69,70,
      75,80,89,97,105,112,121,130,138,144,151,156,161,165,173,180,188,196,203,
      213,221,231,242,255,267,283,298,318,336,362,386,414,442,475,510,548,587,
      633,682,736,795,864,936,1017,1104,1200,1307,1424,1555,1701,1864,2048,2253,
      2481,2736,3022,3341,3697,4094,4536,5026,5567,6163,6811,7515,8276,9104,
      9995,10963,12006,13130,14330,13150,14909,16734,18584,20476,22407,24382,
      26328,28205,29927,31410,32891,34506,36041,37499,39344,41080,42201,44444,
      45713,47368,49999,49999,49999,49999,2644,227,205,131,98,90,81,75,67,64,63,
      62,68,73,84,100,117,134,146,154,160,164,166,168,169,167,163,163,164,165,
      167,173,180,187,200,211,225,243,263,284,307,333,363,399,441,488,539,594,
      652,711,772,835,909,993,1084,1186,1295,1416,1545,1684,1832,1991,2164,2351,
      2547,2754,2976,3224,3505,3812,4141,4502,4903,5356,5860,6400,6992,7635,
      8342,9107,9919,10794,11735,12762,13881,15091,15759,17203,18714,20308,
      21961,23607,25190,26793,28417,30025,31418,32853,34502,36011,37674,39551,
      40740,41666,46428,46666,49999,49999,49999,49999,49999,1977,197,167,108,85,
      65,57,49,46,43,42,41,41,43,45,48,54,57,61,64,67,70,72,76,77,78,79,81,84,
      86,92,96,102,109,118,128,140,152,166,180,194,209,226,246,267,293,319,347,
      378,410,442,477,517,562,612,666,724,791,866,948,1035,1134,1242,1367,1500,
      1643,1801,1984,2208,2460,2738,3049,3400,3799,4240,4721,5246,5824,6465,
      7153,7892,8689,9560,10518,11586,12748,13150,14909,16734,18584,20476,22407,
      24382,26328,28205,29927,31410,32891,34506,36041,37499,39344,41080,42201,
      44444,45713,47368,49999,49999,49999,49999,2317,146,151,102,77,66,62,59,56,
      52,47,43,42,48,62,81,103,123,141,154,163,172,180,184,180,172,161,152,146,
      146,149,155,160,167,173,181,190,203,220,240,265,294,326,362,401,445,491,
      543,604,674,753,840,932,1022,1110,1197,1287,1388,1508,1652,1818,1998,2186,
      2381,2581,2790,3011,3250,3506,3782,4081,4398,4741,5125,5562,6053,6592,
      7177,7823,8538,9330,10252,11293,12373,13416,14417,15756,17202,18716,20309,
      21967,23603,25191,26795,28430,30017,31416,32915,34450,36018,37616,39242,
      40891,42562,44250,45951,47662,49378,51095,52810,54519,1722,128,132,77,61,
      47,42,38,35,32,30,29,29,31,34,39,45,51,55,57,57,57,57,58,59,61,63,65,68,
      72,77,82,89,95,100,106,112,120,129,140,153,166,182,199,220,242,267,293,
      321,349,379,413,449,484,517,549,583,625,681,754,843,944,1052,1163,1275,
      1392,1519,1663,1834,2036,2269,2523,2799,3116,3480,3893,4336,4816,5373,
      6028,6782,7653,8612,9604,10572,11531,13150,14912,16732,18587,20474,22409,
      24382,26331,28200,29919,31416,32915,34450,36018,37616,39242,40891,42562,
      44250,45951,47662,49378,51095,52810,54519,1852,113,123,84,71,56,53,51,48,
      44,39,33,32,38,54,78,106,132,155,172,185,199,215,221,211,190,163,139,123,
      119,123,132,139,147,151,155,161,171,187,207,232,260,290,324,364,411,462,
      517,573,631,692,755,827,914,1022,1146,1283,1423,1560,1688,1813,1941,2085,
      2253,2456,2693,2961,3248,3539,3814,4078,4332,4612,4962,5419,5971,6581,
      7201,7826,8445,9082,9811,10650,11531,12404,13271,14340,15624,16981,18320,
      19632,20995,22519,24150,25847,27493,29014,30431,31784,33085,34324,35479,
      36553,37550,38471,39320,40101,40818,41475,42075,42624,1312,92,85,69,52,40,
      39,35,32,29,26,23,22,24,29,37,47,56,62,64,62,60,58,57,57,58,59,60,62,65,
      70,75,82,87,92,95,99,105,113,124,137,151,166,183,202,224,248,273,299,326,
      353,383,415,450,490,534,584,637,694,754,818,889,969,1055,1146,1247,1356,
      1481,1636,1826,2044,2276,2522,2796,3110,3466,3853,4269,4732,5252,5834,
      6491,7214,7983,8787,9649,10744,12025,13332,14556,15727,17016,18539,20189,
      21905,23615,25298,26762,28133,29413,30615,31742,32794,33772,34679,35517,
      36289,36999,37651,38248,38793,1053,72,78,63,51,44,38,35,32,28,23,18,18,26,
      44,66,88,107,123,135,146,157,168,173,170,162,151,141,133,127,125,122,119,
      118,120,125,132,141,151,161,172,186,205,227,251,279,309,345,391,449,516,
      587,658,728,796,865,938,1018,1110,1221,1349,1490,1642,1816,2013,2229,2464,
      2710,2958,3203,3451,3715,4006,4326,4683,5080,5510,5978,6497,7072,7702,
      8392,9135,9913,10718,11563,12594,13737,14904,16056,17238,18563,20094,
      21748,23433,25058,26617,28001,29311,30545,31703,32784,33791,34724,35588,
      36384,37117,37790,38407,38971,39486,812,62,50,41,35,31,29,27,25,23,19,16,
      15,17,21,28,35,41,45,48,49,50,52,52,51,49,47,45,43,44,45,48,50,54,58,63,
      70,78,87,96,105,116,129,143,158,174,192,211,233,255,278,301,326,355,390,
      430,475,521,569,618,671,728,792,866,951,1048,1155,1269,1388,1510,1640,
      1781,1942,2130,2351,2603,2872,3164,3504,3911,4382,4903,5460,6069,6736,
      7471,8399,9432,10511,11613,12785,14143,15697,17324,18947,20568,22228,
      23729,25173,26551,27859,29094,30255,31342,32355,33297,34168,34973,35715,
      36397,37022 )
    temp2 <- -log(1- temp/100000)/365.24    #daily hazard rate

    #Add in the extrapolated data for 1990 and 2000
    temp <- array(0, c(111,2,10))
    temp[,,1:8] <- temp2
    fix <- c(0, .5, 1:109)
    fix  <- c(.00092*fix - .1615, .00020*fix - .1746)
    temp[,,9]   <- exp(log(temp[,,8]) + fix)
    temp[,,10]  <- exp(log(temp[,,9]) + fix)

    attributes(temp) <- list (
	dim      =c(111,2,10),
	dimnames =list(c(0, .5, 1:109), c("male", "female"), 1900+ 10*1:10),
	dimid    =c("age", "sex", "year"),
	factor   =c(0,1,10),
	cutpoints=list(c(0,.5,1:109)* 365.24, NULL, mdy.date(1,1, 191:200*10)),
	summary = function(R) {
		     x <- c(format(round(min(R[,1]) /365.24, 1)),
			    format(round(max(R[,1]) /355.24, 1)),
			    sum(R[,2]==1), sum(R[,2]==2))
		     x2<- as.character(as.date(c(min(R[,3]), max(R[,3]))))

		     paste("  age ranges from", x[1], "to", x[2], "years\n",
			   " male:", x[3], " female:", x[4], "\n",
			   " date of entry from", x2[1], "to", x2[2], "\n")
		     },
	class='ratetable')
    temp
    }
rm(fix, temp, temp2)

