Cost distance in spatial weight matrix

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cost distance in spatial weight matrix

Roozbeh Valavi
Dear list,

I wonder if it is possible to add some kind of cost/weighting when creating
a spatial weight matrix to be used in a spatial lag model? I want to
consider the effect of elevation as a cost for calculating distance to the
neighbours.
I am using spdep for creating the W and splm for the model.

Thank you in advance,
Roozbeh
--
*Roozbeh Valavi*
PhD Candidate
The Quantitative & Applied Ecology Group <http://qaeco.com/>
School of BioSciences | Faculty of Science
The University of Melbourne, VIC 3010, Australia
Mobile: +61 423 283 238

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Cost distance in spatial weight matrix

Facundo Muñoz-2
Dear Roozbeh,

package geoRcb [1]* provides function distmatGen() [2], which computes a
cost-based distance matrix between any two sets of locations, given a
raster cost surface (such as elevation). The function uses package
gdistance to actually perform the computations, and it does not depend
on anything else in the package, so you can simply copy it to your code
base.

Is that what you were looking for?

ƒacu.-



[1] https://github.com/famuvie/geoRcb/

[2] https://github.com/famuvie/geoRcb/blob/master/R/distmatGen.R

* Disclaimer: I'm the author.


On 10/29/18 1:42 PM, Roozbeh Valavi wrote:

> Dear list,
>
> I wonder if it is possible to add some kind of cost/weighting when creating
> a spatial weight matrix to be used in a spatial lag model? I want to
> consider the effect of elevation as a cost for calculating distance to the
> neighbours.
> I am using spdep for creating the W and splm for the model.
>
> Thank you in advance,
> Roozbeh

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo