Thanks, Matt:

I’ll dig into your code. I guess I’m perplexed by the different concepts such as arrays and matrices. And “R” is still a foreign language to me.

In the olden days I had access to transportation planning network packages (UTPS, MINUTP, TP+, Cube/Voyager) which had built-in procedures for implementing fratar procedures. Since I’m retired, I no longer have ready access to these commercial (i.e., not free) products. I could implement a simple one or two iteration fratar (raking) in Excel, but it would be a chore to do more iterations. 

The intent is to use a base seed matrix (CTPP 2012-2016 total workers) and rake it to new sets (vectors, arrays) of rows (county-of-residence) and columns (county-of-work).  Essentially to simulate different years using the CTPP2012-16 “seed” matrix.

The important thing to note is that the “row totals” and “column totals” for these years: 2012, 2013, 2014, 2015 and 2016, are readily available (for large counties) in STANDARD ACS tabulations (tables B08007 and B08501)!!! The single-year ACS data is extremely useful in this regards. (Small counties will be a problem, since there aren’t single-year estimates for them. I’ll probably use their mother PUMA and POWPUMA to calculate their target values.)

So, yes, I would have different sets of row targets and column targets.

The last time I implemented this was 18 years age, when I “aged” the CTPP 2000 data to 2010, 2020, and 2030. I considered this a “sketch planning” exercise (where “sketch planning” means never having to say you’re sorry.)

I actually found my old report hidden on my former agency’s website:
http://files.mtc.ca.gov/library/pub/12933.pdf

Thanks for the sample script! 

Chuck

On Feb 17, 2022, at 7:17 PM, Schroeder, Matt <Matt.Schroeder@metc.state.mn.us> wrote:

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:
  • 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@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@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
To unsubscribe send an email to ctpp-leave@listserv.transportation.org
<ExampleIPF.R><seedData.csv>_______________________________________________
CTPP mailing list -- ctpp@listserv.transportation.org
To unsubscribe send an email to ctpp-leave@listserv.transportation.org