distance: Distance

View source: R/distance.R

distanceR Documentation

Distance

Description

distance() computes the distance matrix that accounts for the weighted proportions of the products connected to each good that the countries are not exporting.

Usage

distance(balassa_index, proximity_product)

Arguments

balassa_index

(Type: matrix) the output from balassa_index()) or an equivalent arrangement.

proximity_product

(Type: matrix) the output from proximity()) or an equivalent arrangement.

Details

The current implementation follows \insertCiteatlas2014economiccomplexity to measure the oppotunities implied by a country's position.

Value

A matrix.

References

For more information on this index see:

\insertRef

atlas2014economiccomplexity

and the references therein.

Examples

d <- distance(
  economiccomplexity_output$balassa_index,
  economiccomplexity_output$proximity$proximity_product
)

# partial view of the distance matrix
n <- seq_len(5)
d[n, n]


economiccomplexity documentation built on April 3, 2025, 7:40 p.m.