Demog Blog


Schoen's 'del', a very fine index if there ever was one

posted Aug 28, 2015, 5:11 AM by Tim Riffe   [ updated Aug 28, 2015, 5:12 AM ]

published on 45th anniversary of the article (August, 1970), with month -precision....

I've heard Andrew Noymer bring up Schoen's Δ (del) a couple times now in the context of 'good lifetable summary indicators that have been passed over, but without any obvious reason'. Usually it takes three to tip me over, but this time it was two mentions. Maybe because we're talking about demography tools. Well, it should have been one mention!

 Δ is just the geometric mean of a mortality rate schedule, and it has lots of neat properties that you can read about in the short linked article. One of them is that ratios of Δ for two populations (or sexes, or years, etc) can be interpreted in a straightforward way: if the ratio of male Δ to female Δ is 2, then male mortality rates are twice as high. This is not the case for life expectancy or the age standardized death rates. If you halve mortality rates, you don't double life expectancy, and so forth. Age standardized death rates are arbitrary due to the use of a standard (even if some standards are common practice...).

So here are all Δ in the HMD (or their inverse, actually...), for both sexes (males blue, females red):


Talk about divergence!!!

If we want to study trends in divergence / convergence, and if we want to make group comparisons in mortality, there is a good argument that this is the measure we should be using. You can decompose differences in much the same way as we decompose differences in life expectancy, and so forth, partitioning the difference out to ages and causes. Just say'n.

Here's the code:

Schoens_del.R



Tic tocs up, toc ticks down, relativized, averaged

posted Aug 21, 2015, 5:27 AM by Tim Riffe

If you haven't seen the Time Flies page yet, you ought to, it's super cool:

That viz (can you call it a dataviz? there's no data... concept viz?) got me thinking. The basic notion is that the meaning of a year get's relativized to the amount of time you've lived. As we grow older, the proportion of our life that a given year takes up is less and less. This is all because our reference period (lived life) is growing. Anyway, it's a theoretical optimum, rather than actual perception, but it coincides with the anecdotes people have about time flying faster all the time. I googled a bit and found that plenty of people actually study the perception of time as a function of age. That's awesome.

I then thought, if you knew how long you'd live, then you'd know how long you have left, and this could be the reference rather than years lived. Let's call this, forward-looking relativized, as opposed to backward-looking relativized. Forward-looking relativization is symmetrical to backward-looking relativization. If you knew when you were going to die, you'd have both durations to relativize to. Then what would you think? How would this change the way you make decisions? Does running out of time make you savor? Does it make you slow down and notice details? At mid life, would we switch perspectives, always referring to the shorter segment of life (the one behind or the one in front). Maybe we'd take an average? But which kind of mean? When you don't know, use the arthmetic mean! And here's how the directionally-averaged perception of a unit of time looks by years lived, years left, and lifespan (in an ATL diagram).


You'd of course need to weight the lifelines in there, possibly using d(x) from the lifetable, or some other population weights. Plenty of imagining to do in this direction. 

* In this case, the notions of fast and slow can easily flip, depending on what kind of mean you take ... In fact, even in the given arithmetic representation, you could swap slow and fast, and it'd still be legit. mental yoga.


HT #Lotka (1934)

posted Jul 29, 2015, 8:29 AM by Tim Riffe

Today's quote:

"... the question arises: would not a treatment of demographic problems that based itself on hypotheses in order to extract necessary conclusions be of doubtful practical value? We would be powerfully misled in viewing matters that way. The conditions that present themselves in an actual population are always excessively complicated. Whoever has failed to grasp clearly the necessary relations among the characteristics of a theoretical population subject to simple hypotheses, will certainly be unable to manage in the much more complicated relations that exist in a real population. If one has wavered in the attack on a simple problem, he will assuredly stumble in the face of very serious complications. It is for this reason that authors who profess little respect for the application of mathematical analysis to demographic problems are those who in their writings present us with horrible examples of the confusion that results from striving to resolve by an avalanche of words problems whose complexity imposes on us the use of the condensed language of mathematics." - A. Lotka (1934, 1939, both in French) This translation was from D. P. Smith and H. Rossert (1998)

True then, true today. HT to VCR for sending me to this manuscript.

*It turns out to be useful to have a large number of such retorts on hand for the kind of work I do.

mid-lab-talk summary

posted Jul 21, 2015, 5:58 AM by Tim Riffe

I plowed through a bunch of dizzying diagrams, then repeated the exercise with these words:


APC surface

two dimensional hacks

three views it gives

three views it lacks


A dimension of time

of life and of death

with cohorts defined

by their very last breath


topsy turvy

realigned in a mirror

in TPD time

death grows nearer


but to see variation

within spans of life

we need to cut time

with a different knife


you can squeeze out time

or slice right through it

the ATL plane

is a good way to view it


tic tocs up

toc ticks down

add’m together

and lifespans abound


a series of planes

all stacked in a row

gives six temporal views

of stocks or of flows


and as models go

there are more and less clever

we just need to see

these perspectives together


really it’s easier

than origami

just triangle slices

cut like salami


get six dimensions

for the price of three

it’s an aesthetic result

between you and me


this is not a tale

of statistical inference

ask and I’ll give you

complete indifference


but can it do tricks?

can we make any money?

-it tells party jokes

but you won’t find them funny


turns out there’s a hoax

a crime to expose

a detective adventure

that I can’t solve with prose


And then moved on to CSI Rostock: "The case of the mis-specified morbidity pattern"

Next stop, Prague!


6 dimensions of demographic time #demography

posted Jul 16, 2015, 5:06 AM by Tim Riffe   [ updated Jul 19, 2015, 11:12 AM ]

This post will be woefully short. Basically, you know how with APC you buy two and get the third for free? That is, you really only have two pieces of info with APC: well, if you had three pieces of info you get SIX indices! The six indices are chronological age (A), period (P), birth cohort (C), thanatological age (T), death cohort (D), and lifespan (L). In short, you only need 3 pieces of information to build out a 3-d temporal space. For example, with 1) birth cohort, 2) lifespan, and 3) a position in time (period), then we get chrono age, death cohort and thano age for free! Who doesn't like free things?! This is an ongoing project of mine to build out a 3-d Lexis-like space. The projection you see in this WebGL object follows the right-angles that are all around in demography, whereas an isotropic (time proportions are same in all directions) version of the same space ends up being a tetrahedral-octahedral honeycomb (say what?!). This beast of a diagram was done using the rgl package in R, which lets you save to WebGL, which lets me save the thing so you can see it in a browser. But if you come hang out then we can make one out of Zometool

This is a still-shot. Just click the image to go to the interactive (twirly) one, or visit: http://demog.berkeley.edu/~triffe/RGL1/



I'm excited to present this (and a proper buildup to it) at a lab talk next week for the Population and Health Lab at the MPIDR. I'm also excited to present it at the upcoming EAPS "Changing patterns of mortality and morbidity : age-, time-, cause- and cohort-perspectives" workshop in Prague. By then, Jonas Schöley will have been working on an interactive Shiny App to view data that permit the use of such coordinates, and Pancho Villavicencio will be helping my dot the i's and cross the t's when it comes to describing the geometry of all this. Can you say "let's calculate some new kinds of rates!"? Demography rules.

silliness with rates

posted Jul 3, 2015, 9:04 PM by Tim Riffe   [ updated Jul 4, 2015, 4:30 AM ]

I'm in Rostock now, been lucky with the sun so far here. I've moved a lot. It takes a while to get my work environment set up on a new machine. But git makes it easier, since the vast majority of my stuff is there, so all I have to do is clone and reproduce, and I can get started working on it. Except sometimes it's not so slick because I failed to commit the data, usually because it'd either break a user agreement, or as a courtesy to whoever gave me the data. Then it takes some shuffling to find the data, and reproduce the project. And this new machine is Windows, which is forcing me to make my R code more robust, but using the file.path() function instead of just specifying file paths with strings (path separators are different in Windows and Linux). Ugh. Anyway, the other thing about Rostock in the summer is that the night lasts like 4 hours. When you're jet lagged it's easy to stay that way. And so now instead of forcing myself to go back to sleep I started jotting down odd ideas.

Rewind back to PAA. Virginia and VCR gave a presentation in the same session as I, entitled 'Am I Halfway There? Life-lived = Expected Life', where they looked at a couple different ways of deciding whether you're half way through life using ye olde lifetable. It sounded to me like different approaches to the old school idea of the half-life (please donate to Wikipedia!), which I mentioned in the discussion, and VCR was like 'so you mean the median?' - yup, but then I didn't know where to go from there.

I'm going to play with that idea now and produce silliness.

Take a lifetable's haldlife as its median, then assume that the rate that produced this half-life was actually constant (ergo exponential decay). One can calculate this rate for a lifetable that starts at age 0, or one that has been truncated at any age, or in this case all ages. Here's a pattern of m(x) [USA males, 1980, HMD]


If we take the implied constant hazard from the remaining half-life of the survivors in each age, then plot it atop the observed rates, it looks like this:

or it is also just its own silly rate schedule:

[note to self: the blue line here looks eerily like the 'GHOST RATE', but I haven't checked if they're the same] Just go with it. Let it sound mysterious.

Back to that second figure, I think the profile of the constant hazards looks like a sail. Here it is again, all saily:


and here are the US males, sailing through time (1933-2010, really fast):
(looks like you need to click on it, at least in my browser)


That is, the US men's lifetable sailing team. Not very fast is my conclusion. Doldrums in the 1960s. Faster sailing in recent years.

(created with the animation package, then sped up using the gif speed changer at ezgif.com, because it doesn't look like you can change the frame interval for gifs in R at the moment.)

maybe I'll sleep now, thinking of sailing?

---------------------------------------
R code here


Links to my two posters #PAA2015

posted May 1, 2015, 8:52 AM by Tim Riffe

This one was a session winner. That's a project I code-name ThanoEmpirical -- Because folks seemed skeptical that the formal demography would prove useful. Well, it is. We have a sort of Ascombe's Quartet situation (HT Nikola Sander for that) that applies to how we measure various late-life morbidity characteristics. Everything can have a clear chronological age pattern in the margin, but if you break things down by thanatological age (time to death) as well, we see FOUR major patterns emerge. Take-home message #1: characteristics should be more carefully measured and considered. #2) For many conditions do not fret about the forthcoming boomer-bubble. There is a paper for that poster on the PAA website under the name Pil H. Chung, currently under review. A bit depressed that it will likely take a year to review, as we want to get the material out there.

This one proposed four new columns for the lifetable-- Code name DistributionTTD. I think they might be useful columns for individuals planning their future (err, the data wonks out there that do fancy things to plan their own futures). Some of these columns are conditional central moments. They appear to have behaved in regular and predicatable ways over the past 40 years, and I wondered aloud if that might be worth banking on for prediction. Adam Lenart (coauthor) had a poster right next to ours where he showed how to combine moments to get back the deaths distribution. Very useful prop! People bought my speculations about applications, but I didn't get much suggestive feedback.

These two posters share aesthetics, and were almost self-guiding, which helped a lot. Sometimes like 8 people are there and you can only talk to 1 or 2 at once. Judicious use of white space seems to keep people oriented. A very rewarding experience all around.

Thanks all who came and chatted us up!

Talleres de verano #Colmex #CEDUA link: http://goo.gl/Jp2NKs

posted Apr 14, 2015, 10:32 AM by Tim Riffe

Every summer since 2009 the Center for demographic, urban, and environmental studies (CEDUA) at the Colegio de Mexico (Colmex) puts on an awesome series of thematic one-week demography workshops: the Talleres de Verano. Great stuff. From June 15-19 I'll give a workshop doing a mix of formal demography and R visualization (of the formal demography)-- basically every odd lifetable/renewal idea that I'm currently playing with, whether published or not. Here's my proposed syllabus in Spanish (because the workshop is in Spanish, ya'lls):

Temário:
Lunes: 1. Nuevas columnas para la tabla de vida. 2. Relaciones entre la tabla de vida y poblaciones estacionarias.
Martes: 1. ¿Cuánta vida pierde la población tras la mortalidad? Edades, causas, y relaciones entre la mortalidad y la estructura de población. 2. ¿Una tabla de vida de mejores prácticas?
Miercoles: 1. Dos perspectivas sobre la renovación de población. 2. Demostrando la ergodicidad y el momento.
Jueves: 1. Más allá que Lexis: Relaciones entre años vividos, años restantes, duración de vida, periodo, y cohorte(s). Diagramas, modelos, intuición. 2. Datos y simulaciones.
Viernes: Dudas, peticiones, ejemplos, trucos y ¡diversión!

and in English:

Monday: 1) some new columns for the lifetable. 2) Relationships between the lifetable and stationary populations.
Tuesday: 1) How much life does a population lose via death? Ages, causes, and relationships between mortality and population structure. 2) A best practices lifetable?
Wednesday: 1) Two perspectives on population renewal. 2) Demonstrate ergodicity and momentum.
Thursday: Beyond Lexis: Relationships between years lived, years left, lifespan, period, and cohort(s). Diagrams, models, intuition. 2) Data and simulations (of the former)
Friday: Questions, comments, requests, examples, tricks and fun!

This is going to be super fun! Plus I'll meet lots of new people! Plus I've never been to Mexico City! Thanks to Victor Garcia for the initiative and invitation! I'll report back when materials are posted, on github probably. Oh boy oh boy oh boy, a chance to corrupt share new ideas with demographers!

*Shout out to my old adviser, Albert Esteve, who I also see on the program later in the summer. Looks like he's going to rock the iPUMS International. Remember kids, use it for good, never for evil!

Age structure of Greenland ice sheet

posted Jan 20, 2015, 2:00 PM by Tim Riffe   [ updated Jan 20, 2015, 7:16 PM ]

Today this came up on my Google Scholar alert for 'age-structure' (*)

Here is a YouTube video showing age-structure cross-sections of what I suppose to be the same data (not paywalled!)

Greenland Ice Sheet age structure

 
This is an example of a non-biological aggregate for which we care much more about the thanatological age structure (years left) than the chronological age structure. And it could also be (and probably is, I'm no earth scientist) modeled as a renewal process (winter accumulate, summer thaw), where the longevity of ice sheet 'birth cohorts' will depends on the cumulative net rate of accumulation (or something like that). In like manner, the top-melting over the course of a year is like a thanatological death cohort. Obviously the models needed here are much more complex than this, but it seems like a relevant segue for the Lotka-Euler renewal model both in its chronological and thanatological forms (the later one is a paper I'm soon to submit somewhere).

And here's another video of age-structured ice, this time in the arctic. This one might do better as an age-structured renewal model because depth is less a factor than in Greenland:

Arctic ice age, 1987-2014



*yes, it's a wide net, but I cast it to catch things like this

Why are there sometimes decimals in HMD death counts?

posted Jan 8, 2015, 3:45 PM by Tim Riffe

Since joining the HMD I often get questions, but usually these are special-case questions, not of general interest. This is one is starting to seem frequent. In fact, I've asked that this response make it to the FAQ. That may or may not happen, and in either case, here's my response:

(This is HMD-specific, just to be clear)

Why are many death counts not represented as integers?

There are several reasons why this may happen. (i) Often, deaths of unknown age are distributed (proportionately) over deaths of known age, and this produces decimals. (ii) If input death counts have an open age group, we also distribute this quantity over higher ages using a method outlined in the Methods Protocol. (iii) In some cases, historical infant death counts have been adjusted due to changes in the definition of live births, and these methods may also produce decimals. (iv) In most cases where death counts are represented in Lexis shapes other than that in which they were collected, decimal fractions will result. For instance, 5-year age groups that are split into single ages usually produce decimal estimates in single ages (see Methods Protocol). The same is true of period-cohort counts that are split and combined into age-period counts. (v) Other unique circumstances, such as special data collection procedures (USA) or wartime estimation (ITA, FRA, etc), or the estimation of small but bounded counts (AUS) may also produce decimal death count data. In all cases, even though fractional deaths are impossible, we use them as the best estimate available.

1-10 of 130