Solutions Manual for An Advanced Guide to Trade Policy Analysis
Chapter 1 Introduction
Welcome to our online solutions manual for for An Advanced Guide to Trade Policy Analysis, AGTPA (Yotov et al. 2016).
This material is intended to provide a comprehensive explanation to reproduce the book’s results in R. We don’t attempt to give a thorough discussion of the theory behind gravity models, the references cited through the chapters shall fill those details.
The manual is written for two audiences:
- People who know R and are interested in learning about gravity models.
- People with no R knowledge who know gravity models theory.
What we did here was to replicate all the results from the book, made with Stata, in R as a way to contribute to Reproducible Research. R is free and available on almost every operating system. It is a wonderful tool for all statistical analysis.
This material was greatly improved thanks to the feedback (and patience!) of Jinbo Hao, Alexey Kravchenko, Hrisyana Stefanova, Chence Sun and Yoto Yotov.
1.2 Obtaining the datasets and functions
yotover is an R package created specifically to distribute the datasets required to reproduce the results from AGTPA. It acts as a metapackage that calls other packages to use several functions that augment R capabilities.
You can get all the functions and datasets if you run these lines from your R console:
# stable version install.packages("yotover") # development version if (!require("remotes")) install.packages("remotes") ::install_github("pachamaltese/yotover")remotes