Learn R Programming

zerotradeflow

zerotradeflow is a system for creating the bilateral trade flow between a country pair equal to zero. You provide the data, tell zerotradeflow which variables are of interest and it expands the base by creating the bilateral zero trade flow. The bases on the flow of trade between countries only report positive trade (greater than zero), however, for some analyzes of gravitacional models, data on zero flow is also necessary.

Installation

To install the package, one of the two standard methods for installing packages in R can be adopted. Directly through the cran (choosing the closest repository):

install.packages ("zerotradeflow")

Or the development version from GitHub:

# install.packages ("devtools")
devtools::install_github ("AlexandreLoures/zerotradeflow")

In the latter case, the latest version of the package will be installed.

Usage

The operation of the zerotradeflow package consists of informing where the data are (the base) to be expanded and indicating the variables: year, exporting country, importing country, Harmonized Commodity Designation and Coding System (or other classification) and value of exports/imports. It takes into account that the order must be obeyed: data, year, exporter, importer, designation and coding and flow value.

An application for Gravitational Models of Trade

Reference

Figueiredo and Loures (2016) O efeito do Mercosul sobre a comercialização de novos produtos. https://doi.org/10.5935/0034-7140.20160015

Copy Link

Version

Install

install.packages('zerotradeflow')

Monthly Downloads

34

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Alexandre Loures

Last Published

July 18th, 2022

Functions in zerotradeflow (0.1.0)

same

Dataset composed of five different countries (BRA appears as both exporter and importer).
get_zerotradeflow

Expand the dataset from the passed database as parameters.
comtrade

A sample of the UN Comtrade Database.
distinct

Dataset composed of six different countries.