# vs.io: VS share of total exports In ignaciomsarmiento/ioanalysis: Input-Output Analysis

## Description

Vertical Specialization (VS) share of total exports. The formula for VS as a share fo total exports for country k is

VS\; share\; of\; total\; exports= \frac{VS}{X_{k}}=\frac{A*L*X}{X_{k}}

where A is the nxn imported coefficient matrix,L is the Leontief inverse, X is an nx1 vector of exports, n is the number of sectors, and Xk is the sum of exports across the n sectors.

## Usage

 1 vs.io(imp,exp,leon=1,namesector, write.xlsx=TRUE, name="Level_Verticalization.xlsx") 

## Arguments

 imp Is the nxn imported coefficient matrix exp Numerical Vector. Exports leon Leontief Inverse as output of funciton leontief.inv() namesector Character. Name of Sector i write.xlsx Logical. if TRUE results are presented in an excel file name String. name of the excel file

## Value

Returns a data frame with the A*L*X product, the total exports and the level of verticalization for each sector. Total.exp. returns a scalar, equals to the sum of exports across sectors

## Author(s)

Ignacio Sarmiento-Barbieri

## References

Hummels, David & Ishii, Jun & Yi, Kei-Mu, 2001. The nature and growth of vertical specialization in world trade. Journal of International Economics, Elsevier, vol. 54(1), pages 75-96, June.

See Also leontief.inv
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 #Uses the 40x40 matrix included in the package exp<-mat_40x40$X[1:40] #Exports Vector class(exp) #the class is numeric imp<-mat_imp_40x40[1:40,2:41]/mat_40x40$DT.a.PB[1:40] #Imports Coef Matrix class(imp) #the class is data.frame namesector<-colnames(mat_40x40[2:41]) class(namesector) #character hum<-vs.io(imp,exp,namesector, write.xlsx=FALSE) #Using the Leontief Inverse leon<-leontief.inv(mat_40x40[1:40,2:41], mat_40x40\$DT.a.PB[1:40])[,1:40] hum2<-vs.io(imp,exp,namesector,leon=leon, write.xlsx=FALSE)