upstream: upstreamness

Description Usage Arguments Details Value Author(s) References Examples

View source: R/upstream.R

Description

Measures upstreamness as in Antr<c3><a0>s et al. (2012), equation (9) page 5.

Usage

1
upstream(D,y,x,m, write.xlsx=TRUE, name="Upstream.xlsx")

Arguments

D

Matrix. Direct Domestic Coefficients Matrix

y

Vector. Output

x

Vector. Exports

m

Vector. Imports

write.xlsx

Logical. if TRUE results are presented in an excel file

name

String. name of the excel file

Details

Can use the IO matrix as D.

Value

Returns a Vector with the Upstremness of each Industry

Author(s)

Ignacio Sarmiento-Barbieri

References

Pol Antr<c3><a0>s & Davin Chor & Thibault Fally & Russell Hillberry, 2012. Measuring the Upstreamness of Production and Trade Flows. NBER Working Papers 17819, National Bureau of Economic Research, Inc.

Examples

1
2
3
4
5
6
7
8
9
#Uses the 40x40 matrix included in the package

mip<-mat_40x40[1:40,2:41] 
y<-mat_40x40$DT.a.PB[1:40]
x<-mat_40x40$X[1:40]
m<-mat_40x40[42,2:41]


upstream<-upstream(mip,y,x,m, write.xlsx=FALSE)

ignaciomsarmiento/ioanalysis documentation built on May 21, 2019, 9:52 a.m.