Hi, Chuck – I’m not quite sure what the goal of this procedure is (perhaps because I’m
more “census” than “transportation”). Based solely on the materials you sent, it looks
like you’re trying to take the residence X workplace matrix and rake it to the row and
column totals from the matrix itself. So the rows already sum to the row targets you
defined, and the columns already sum to the column targets. I’m not sure why raking is
appropriate here; do you have a different set of row/column targets you plan to use (like
the “estimates of individual years” you mentioned)?
In case it’s useful for your particular situation, I’ve attached some code used to develop
population estimates for census
blocks<https://gisdata.mn.gov/dataset/us-mn-state-metc-society-small-are…es>:
* The “seed data” is estimates of the population in households and the population in
group quarters (in columns) for each census block (in rows). (These are fractional, not
rounded.)
* The total population estimates have already been set; we just need to make sure that
the household and group quarters populations add up to those totals (the row targets).
* We also have estimates of the household and GQ populations for cities and townships,
and we want the block-level household and GQ population estimates to roll up to those as
well (the column targets).
* The code uses the `mipfp` package to make these estimates roll up “vertically”
(within columns) to city/township control totals, and roll up “horizontally” (within rows)
to the block-level total populations.
I’m not a statistician – this is just something I worked out to solve a problem – so take
all this with a grain of salt. Good luck!
--Matt
---
Matt Schroeder
Pronouns: he/him/his
Principal Researcher
Metropolitan Council Community Development
P. 651-602-1513
From: Charles Purvis <clpurvis(a)att.net>
Sent: Thursday, February 17, 2022 3:42 PM
To: The Census Transportation Products Program Community of Practice/Users discussion and
news list <ctpp(a)listserv.transportation.org>
Subject: [CTPP News] frataring commuter matrices in R
Help!
I’m trying to fratar (iterative proportional fitting, raking) a 58 by 58 commuter matrix
using R packages. I could use some help.
Attached are my initial scripts and input database to create the 58 by 58 “seed” matrix
(2012-16 CTPP, Total Workers, Table A302100). I’m just a little mystified as to how to
implement the raking/frataring given the different IPF packages available: Ipfp, mlfit,
mipfp, rakeR, rake……
My goal is to rake the 58 by 58 county-to-county total commuters for California, using
the 2012/2016 CTPP to estimates of individual years: 2012, 2013, 2014, 2015, 2016.
Chuck
Caution! This email was sent from an external source. Do not click any links or open
attachments unless you trust the sender and know the content is safe.
_______________________________________________
CTPP mailing list --
ctpp@listserv.transportation.org<mailto:ctpp@listserv.transportation.org>
To unsubscribe send an email to
ctpp-leave@listserv.transportation.org<mailto:ctpp-leave@listserv.transportation.org>