sweinand / pricelevels

Price Level Comparisons
0 stars 0 forks source link

Minimum spanning trees #11

Open sweinand opened 10 months ago

sweinand commented 10 months ago

See

See also this R example, which explains quite good the idea of minimum spanning trees (https://stackoverflow.com/questions/59624905/how-to-calculate-minimum-spanning-tree-in-r). Applied to spatial price comparisons, the Paasche-Laspeyres spread is calculated for the R*(R-1)/2 region pairs and then the minimum spanning tree is derived. The resulting bilateral indices are chained together.

sweinand commented 9 months ago

Deriving the minimum spanning tree following Kruskal's algorithm is quite fast, but the spatial chaining is very slow.

hill_mst.txt