Carson Farmer
2010-Oct-04 12:01 UTC
[R] spatial interaction (gravity) model as Poisson regression
Dear list, I posted essentially this same question to the r-sig-geo mailing list last week with no response :( Unfortunately I am no closer to reaching a solution, so I now post it here (with some clarifications) in the hope that someone following this list might have an answer for me: Has anyone had much experience with spatial interaction (or gravity) models, specifically in the form of Poisson regression? I'm a bit unsure of how to operationalize this using glm(), and would appreciate any pointers from those with more experience. I have searched the archives extensively, and there are several mentions of this question, but I have yet to find anything concrete that I can wrap my head around... apologies if I have missed something. Basically, the conventional origin constrained model would look something like this: T_{ij} = exp(\delta_{i} + \log{A_{j}} - \beta D_{ij}) ~ \varepsilon_{ij} where \delta_{i} is a constant parameter speci?c to the ith zone, A_{j} is the attractiveness of the jth location, and D_{ij} is the distance between i and j. Note that \varepsilon_{ij} is just the multiplicative error term of the ?ow from i to j, and \beta is the distance decay parameter. Similarly, the doubly constrained model follows the form: T_{ij} = exp(\delta_{i} + \gamma_{j} - \beta D_{ij}) ~ \varepsilon_{ij} where everything is defined as above, except exp(\gamma_{j}) is an estimate of the attractiveness of location A_{j}. Hopefully the above description makes things a bit clearer, essentially my question is this: What factors or in what form do I have to have my data in order to be able to run such a model following the glm syntax? I know this should be relatively straight-forward, I just can't seem to get my head wrapped around it at all? If it helps, I can provide some sample data to those who request it. TIA, Carson -- Carson J. Q. Farmer ISSP Doctoral Fellow National Centre for Geocomputation National University of Ireland, Maynooth, http://www.carsonfarmer.com/