economiccomplexity (version 1.5.0)

proximity: Proximity

Description

proximity() computes two matrices that account for the similarity between pairs of countries and pairs of products.

Usage

proximity(balassa_index, compute = "both")

Value

A list of two matrices.

Arguments

balassa_index

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

compute

(Type: character) the proximity to compute. By default this is "both" (both proximity matrices) but it can also be "country" or "product".

Details

The current implementation follows atlas2014economiccomplexity to obtain the likelihood that two products "p1" and "p2" are exported by the same country and, conversely, that two countries "c1" and "c2" export the same product.

References

For more information see:

atlas2014economiccomplexity

and the references therein.

Examples

Run this code
pro <- proximity(economiccomplexity_output$balassa_index)

# partial view of proximity matrices
pro$proximity_country[1:5, 1:5]
pro$proximity_product[1:5, 1:5]

Run the code above in your browser using DataLab