Solutions Manual for An Advanced Guide to Trade Policy Analysis
2020-11-08
Chapter 1 Introduction
1.1 Welcome

Welcome to our online solutions manual for for An Advanced Guide to Trade Policy Analysis (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.
We only assume that readers are familiar with linear regression, and that they shall read Yotov et al. (2016) and Wickham and Grolemund (2016) alongside this material.
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.
1.2 Obtaining the datasets and functions
yotover
is an R package and what you are reading here is the package documentation. In specific, it acts as a metapackage which 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:
1.3 Getting the most out of this material
Clone this repo to obtain the editable R Markdown files:
git clone https://github.com/pachamaltese/yotover.git
Please read Bryan, Hester, and STAT 545 TAs (2020) if you have questions about git or GitHub.
References
Bryan, Jennifer, Jim Hester, and STAT 545 TAs. 2020. “Happy Git with R.” https://happygitwithr.com/.
Wickham, Hadley, and Garrett Grolemund. 2016. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. " O’Reilly Media, Inc.".
Yotov, Yoto V, Roberta Piermartini, José-Antonio Monteiro, and Mario Larch. 2016. An Advanced Guide to Trade Policy Analysis: The Structural Gravity Model. World Trade Organization Geneva.