Title: | Replication of 'An Advanced Guide To Trade Policy Analysis' |
---|---|
Description: | Datasets from Yotov, et al. (2016) <isbn:978-92-870-4367-2> (An Advanced Guide to Trade Policy Analysis) and functions to report regression summaries with clustered robust standard errors. |
Authors: | Mauricio Vargas Sepulveda [aut, cre] , Alexey Kravchenko [ths], Constanza Prado [ths], Yoto Yotov [ths], The United Nations [dtc, cph, fnd] |
Maintainer: | Mauricio Vargas Sepulveda <[email protected]> |
License: | CC BY 4.0 |
Version: | 0.7.0 |
Built: | 2024-10-31 05:06:38 UTC |
Source: | https://github.com/pachadotdev/tradepolicy |
Contains bilateral trade flows for different pairs of countries between 1986 and 2006 and additional variables modelling.
A data frame with 99,981 rows and 17 columns:
Exporter ISO country code
Importer ISO country code
Symmetric Pair ID
Year
Nominal trade flows in current US dollars
Population-weighted bilateral distance between country 'i' and 'j', in kilometers
Indicator. Equal to 1 if country 'i' and 'j' share a common border
Indicator. Equal to 1 if country 'i' and 'j' speak the same official language
Indicator. Equal to 1 if country 'i' and 'j' share a colonial relationship
Indicator that is equal to one when country 'i' and 'j' are members of same Regional Trade Agreement
3rd lag of RTA
4th lag of RTA
6th lag of RTA
8th lag of RTA
9th lag of RTA
12th lag of RTA
4th lead of RTA
The data was drawn from the WDI for the year 2005 (earliest year available), the countries with no entry cost data are mainly small probably not in service trade data, and there are some considerations for the countries in this dataset:
KOR designates RKO since 1949
RUS designates SUN between 1949 and 1991
CZE designates CZS between 1949 and 1992
DEU designates FRG between 1949 and 1989
Germany unified (DEU) has data since 1991
AGTPA authors, adapted from The World Development Index made by The World Bank
Computes clustered standard errors, tests on coefficients with clustered standard errors and obtains RESET test p-value.
tp_summary_app_1( formula, data, method = "ppml", pair = "pair_id", etfe = "exp_year", itfe = "imp_year" )
tp_summary_app_1( formula, data, method = "ppml", pair = "pair_id", etfe = "exp_year", itfe = "imp_year" )
formula |
Formula for the model |
data |
Tibble or data.frame |
method |
Regression method, which can be "ols" or "ppml" (default) |
pair |
Inter-national fixed effects column (defaults to "pair_id") |
etfe |
Exporter time fixed effects column (defaults to "exp_year") |
itfe |
Importer time fixed effects column (defaults to "imp_year") |
A list
# See the ebook
# See the ebook
Computes clustered standard errors, tests on coefficients with clustered standard errors and uses the delta method to obtain changes in time-based distance estimated coefficients.
tp_summary_app_2( formula, data, method = "ppml", pair = "pair_id", etfe = "exp_year", itfe = "imp_year", dist = "log_dist", intr = "log_dist_intra", csfe = "intra_pair" )
tp_summary_app_2( formula, data, method = "ppml", pair = "pair_id", etfe = "exp_year", itfe = "imp_year", dist = "log_dist", intr = "log_dist_intra", csfe = "intra_pair" )
formula |
Formula for the model |
data |
Tibble or data.frame |
method |
Regression method (lm or glm) |
pair |
Inter-national fixed effects column (defaults to "pair_id") |
etfe |
Exporter time fixed effects column (defaults to "exp_year") |
itfe |
Importer time fixed effects column (defaults to "imp_year") |
dist |
Distance column (defaults to "log_dist") |
intr |
Intra-national distance column (defaults to "log_dist_intra") |
csfe |
Country-specific fixed effects (defaults to "intra_pair") |
A list
# See the ebook
# See the ebook
Computes clustered standard errors, tests on coefficients with clustered standard errors and returns total RTAs effect with its associated standard error.
tp_summary_app_3( formula, data, method = "ppml", pair = "pair_id", pair2 = "pair_id_2", etfe = "exp_year", itfe = "imp_year", dist = "log_dist", intr = "log_dist_intra", brdr = "intl_brdr" )
tp_summary_app_3( formula, data, method = "ppml", pair = "pair_id", pair2 = "pair_id_2", etfe = "exp_year", itfe = "imp_year", dist = "log_dist", intr = "log_dist_intra", brdr = "intl_brdr" )
formula |
Formula for the model |
data |
Tibble or data.frame |
method |
Regression method, which can be "ols" or "ppml" (default) |
pair |
Inter-national fixed effects column (defaults to "pair_id") |
pair2 |
Intra-national fixed effects column (defaults to "pair_id_2") |
etfe |
Exporter time fixed effects column (defaults to "exp_year") |
itfe |
Importer time fixed effects column (defaults to "imp_year") |
dist |
Distance column (defaults to "log_dist") |
intr |
Intra-national distance column (defaults to "log_dist_intra") |
brdr |
Inter-national borders column (defaults to "intl_brdr") |
A list
# See the ebook
# See the ebook