[acs-r] Calculating median income for a new geography

Tiernan Martin tiernanmartin at gmail.com
Tue Jan 12 13:47:20 EST 2016


Hi Kate,

I have wrestled with this issue a bit myself. It baffles me that there
isn't a clear breakdown of how to do this floating somewhere on the
internet!

The solution that I have arrived at was suggested here
<https://www.reddit.com/r/statistics/comments/2s7icg/proper_way_to_aggregate_medians/>,
and it involves estimating the median using interpolation
<http://factfinder.census.gov/help/en/interpolation.htm>.

Here's a quick breakdown of the steps:

   1. Aggregate the B19001 table for the census tracts of interest
   2. Find the income bracket where the median is expected to be
   3. Use a method called pareto interpolation to estimate the median (or
   linear interpolation if the bracket ranges are less than $2500)


I found the most straightforward breakdown of pareto interpolation to be
this one: http://www.s4.brown.edu/us2010/SUC/MHHINote.htm

And this example should give you a decent idea of how to write a function
(albeit this is a python script, but the idea is the same:
https://gist.github.com/albertsun/1245817

I can send you the R function that I wrote if it will save you some time,
but I can't make any guarantees that it is statistically impeccable. If you
want to calculate the sampling error you can find the method explained on
p.16-17 of this document:
http://www.census.gov/content/dam/Census/programs-surveys/sipp/tech-documentation/source-accuracy-statements/2008/SIPP%202008%20Panel%20Wave%2005%20-%20Core%20Source%20and%20Accuracy%20Statements.pdf


If you find a better solution than this approach please share it!

Best,

Tiernan






On Tue, Jan 12, 2016 at 10:02 AM, Ezra Haber Glenn <eglenn at mit.edu> wrote:

>
> Kate:
>
> Unfortunately, as I understand it, you simply cannot compute an actual
> median from a group of medians -- the exact data you need is  not
> there.
>
> There are ways to approximate this -- a median of medians or a mean of
> medians (or even a weighted mean of medians) -- but they are sort of
> guesses and approximations.  That said, for lots of planning types
> applications, close enough is close enough.  But maybe check with a
> statistician friend and discuss your options.
>
> --Ezra
>
> At Tue, 12 Jan 2016 09:01:52 -0800, Kate Kelsey wrote:
> >
> > [1  <multipart/alternative (7bit)>]
> > [1.1  <text/plain; UTF-8 (7bit)>]
> > [1.2  <text/html; UTF-8 (quoted-printable)>]
> > Hi All,
> > I am working on a project where I need to calculate median household
> income for a group of
> > census tracts.
> > Because this is median income I can't just add the median income for
> each tract and divide
> > by the total number of households.
> > Does anyone have any code they can share to do this?
> > Thanks,
> > Kate
> >
> >
> > [2  <text/plain; us-ascii (7bit)>]
> > _______________________________________________
> > acs-r mailing list
> > acs-r at mit.edu
> > http://mailman.mit.edu/mailman/listinfo/acs-r
>
> --
> Ezra Haber Glenn, AICP
> Department of Urban Studies and Planning
> Massachusetts Institute of Technology
> 77 Massachusetts Ave., Room 7-337
> Cambridge, MA 02139
> eglenn at mit.edu
> http://dusp.mit.edu/faculty/ezra-glenn |
> http://eglenn.scripts.mit.edu/citystate/
> 617.253.2024 (w)
> 617.721.7131 (c)
> _______________________________________________
> acs-r mailing list
> acs-r at mit.edu
> http://mailman.mit.edu/mailman/listinfo/acs-r
>



-- 
*Tiernan Martin*
 206.979.7801
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/acs-r/attachments/20160112/77357cb7/attachment.html


More information about the acs-r mailing list