balassa_index: Balassa Index

Description Usage Arguments Details Value References Examples

View source: R/balassa_index.R

Description

balassa_index() computes the Balassa Index for a bipartite relation between two disjoint sets X, the "source" or "from" side, and Y, the "target" or "to" side.

Usage

1
2
balassa_index(data, source = "source", target = "target",
  value = "value", discrete = TRUE, cutoff = 1)

Arguments

data

(Type: data.frame, matrix or dgCMatrix) a dataset such as galactic_federation or any arrangement.

source

(Type: character) the column with the elements of set X. By default this is set to "source".

target

(Type: character) the column with the elements of set Y. By default this is set to "target".

value

(Type: character) the column with the binary expression for the Balassa Index. By default this is set to "value".

discrete

(Type: logical) whether converting the Balassa Index to discrete (0/1) values. Anything below the specified cutoff is converted to 0 and 1 otherwise. By default this is set to TRUE.

cutoff

(Type: numeric) the cutoff to use for discretization. By default this is set to 1.

Details

The current implementation follows \insertCitemeasuringcomplexity2015binet to obtain a metric for specialisation. In the context of international trade, if the Balassa Index for a country-product pair is more than 1, it means that country is specialized in that product.

Value

A data.frame with the Balassa Index.

References

For more information see:

\insertRef

measuringcomplexity2015binet

and the references therein.

Examples

1
2
3
4
5
6
balassa_index(
  data = galactic_federation,
  source = "planet",
  target = "product",
  value = "export_value"
)

pachamaltese/binet documentation built on Jan. 16, 2020, 2:02 a.m.