Re: [R] Gravity (spatial interaction) models in R

From: Farley, Robert <FarleyR_at_metro.net>
Date: Wed, 07 May 2008 15:35:56 -0700

There may already be tools for gravity model APPLICATION, which is simply an exercise in normalization. Perhaps if I describe the gory details, someone will recognize the problem by another name.   

A singly constrained gravity model is simply an exercise in normalizing the rows of a matrix (your "F-Factors") to match a vector (your Productions).

A doubly constrained model ("Fratar" or "Furness") is simply an iterative exercise of normalizing Rows (Productions) and Columns (Attractions), stopping when the maximum error is within some predefined limit.

I'm only a newbie, but from what I've seen on the list, this should be simple to do....

As to calibrating F-Factor functions: one often "chooses" a functional F-Factor form, then "adjusts" the coefficients, until the weighted trip length distribution of the resulting trip table matches the observed data.  

Robert Farley
Metro
www.Metro.net  

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Roger Bivand
Sent: Tuesday, May 06, 2008 06:37
To: r-help_at_stat.math.ethz.ch
Subject: Re: [R] Gravity (spatial interaction) models in R

Melanie Murphy <mamurphy <at> turbonet.com> writes:

>
> I was wondering if anyone has developed (or is developing) an
> implementation for gravity models (spatial interaction) in R. I
> conducted several searches on the CRAN website with no luck.
Currently
> I am estimating parameters via linearization.

There isn't anything (yet) in the Spatial task view on CRAN, and I'm not aware
of the topic coming up on the R-sig-geo list either. The nearest sign of transport planning is perhaps the emme2 package for interfacing EMME/2 software.
As you are aware, there are many almost equivalent ways of fitting gravity
models, so many R functions are feasible. But no dedicated functions so far, I'm
afraid - if I'm wrong, please let me know, and I'll update the task view.

Roger

>
> Thank you in advance
>
> Melanie Murphy
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 07 May 2008 - 22:40:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 07 May 2008 - 23:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive