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.