complexity: Regional (Technological) Complexity Index

Description Usage Arguments Value References Examples

View source: R/complexity.R

Description

The function computes the complexity index of each region, in line with the methodology proposed by Hidalgo, Hausmann and coauthors.

Usage

1
2
complexity(occt, rta = TRUE, binary = TRUE, scale = TRUE,
  which = "rci")

Arguments

occt

Contingency table (i.e., occurrence table or incidence matrix) on which you want to compute the indices. It can be a 2D array, in which the first dimension represents the units of analysis (like firms, regions, or countries), and the second dimension represents the events or characteristics of interest (like the classes of the patents produced by the regions, or the sectors in which the workers belongs). Lastly, the values in each cell represents the occurrences of each unit-event pair. Moreover, you can use also a 3D array if you like, in which the third dimension represents the time. The object is expected to be of "table" class.

rta

If TRUE (default) it uses the Revealed Technological Advantages (RTA) of the original data

binary

If TRUE (default) it dichotomize the RTA matrix (can be used only together with rta=TRUE).

scale

If TRUE (default) the output is standardised (mean = 0; sd = 1).

which

It can be one of "rci" (default), "tci", "both". The first returns the complexity of each region; the second returns the complexity of each technological domain; and the third returns both the indices.

Value

A data.frame with the Complexity Index of each region and/or of each technological domain. If a 3D array is provided as input, it returns the full panel data.frame.

References

Hidalgo and Hausmann (2009) “The Building Blocks of Economic Complexity”, PNAS, 106, 10570–10575;

Hausmann, Hidalgo, Bustos, Coscia, Chung, Jimenez, Simoes, and Yildirim (2014) The Atlas of Economic Complexity, The MIT Press, 1st ed. 2011.

Antonelli, Crespi, Mongeau Ospina and Scellato (2017) “Knowledge Composition, Jacobs Externalities and Innovation Performance in European Regions”, Regional Studies, 51, 1708–1720;

Balland and Rigby (2017) “The Geography of Complex Knowledge”, Economic Geography, 93, 1–23.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
geo <- paste0("R", 10:50)
tech <- paste0("T", 10:90)
time <- 1:5
dat <- expand.grid(geo, tech, time)
colnames(dat) <- c("geo", "tech", "time")
set.seed(1)
dat$nPat <- sample(1:200, nrow(dat), replace = TRUE)
octab <- xtabs(nPat ~ geo + tech + time, dat)
octab[sample(1:length(octab), length(octab)/2)] <- 0
CX <- complexity(octab)

n3ssuno/RKS documentation built on Jan. 15, 2020, 5:15 p.m.