to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i
Update!: A new, improved version of this calculator based on cohort life expectancy data published in 2002 is now available! If you would like to see how one's average remaining life expectancy has changed since 1989-1991, try this calculator first, then the new version!
Welcome Grand Rounds!
Good question, right? Given that this information is key to many of the debates surrounding public policy (Social Security, Medicare, etc.), I've decided to take some time to crunch through the remaining life expectancy numbers published in the National Center for Health Statistics' U.S. Decennial Life Tables for 1989-1991 (available online as a 429KB PDF document), which has the most recent official numbers published for the United States, in order to figure out, statistically speaking, how much time you have left!
Update: A knowledgeable reader has pointed out a basic flaw in my methodology in using the data outlined below to generate the math behind the calculator in this post. As it turns out, the data is based on period life expectancy data (wrong) versus cohort life expectancy data (correct). I had missed this important distinction in the NCHS document linked above. The difference between the two types of life expectancy data is as follows:
- Period life expectancy is based upon actual or expected death rates for a specified period of time (in this case, the period between 1989 and 1991.) As such, this data could only be used in forecasting life expectancy if and only if the death rate experienced during the period of record could be expected to remain unchanged going forward from when the data was collected.
- Cohort life expectancy is determined differently. Here, remaining life expectancy is tracked by recording the lifespan for those born in a given year until no one born in that year is still living. Consequently, cohort life expectancy data will reflect trends in changing death rates over time, which makes this data ideal for forecasting.
The difference between the two depends upon the trend in death rates. Given that a declining death rate has prevailed in the U.S. since the NCHS data was collected, forecasts based on this data will underestimate one's statistically remaining lifespan. So, if you're willing to proceed further, be assured that you will likely have more time left to you than what the calculator below would seem to indicate. Then again, if you're feeling particularly healthy, you could just skip down to the "Living to 100" calculator below....
First, here is the data from U.S. Decennial Life Tables' Table 2 (Men) and Table 3 (Women) presented in a single chart, along with the corresponding simplified math formulas that describe each set of data:
Click the chart for a larger image.
Now, as you might expect, it just wouldn't be Political Calculations(TM) if we didn't put a tool together to let you see where you might fall on the statistical scale:
While the values calculated above correspond with the average remaining life expectancy published by the NCHS, the question remains of whether these numbers are good enough to help you plan for the rest of your life. What if you're healthier than average, and may expect to live for much longer? What if you're not? Fortunately, there's a much more detailed tool on the web to help you find out!
The Living to 100 Calculator (which you may access without entering your personal contact information) is presented by the Alliance for Aging Research, and takes many of the factors that may directly affect your life expectancy into account, such as the quality of the air you breathe, whether or not you smoke, your diet, your health and your family's medical history, to name a few potential contributors. Give it a shot - you may find out that you have several more years to look forward to than you might have otherwise expected!
Labels: tool
Welcome to the blogosphere's toolchest! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:
ironman at politicalcalculations
Thanks in advance!
Closing values for previous trading day.
This site is primarily powered by:
The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.