SILS
estimates gravity models via
Structural Iterated Least Squares and an explicit inclusion
of the Multilateral Resistance terms.
SILS(y, dist, x, inc_o, inc_d, maxloop = 50, maxloop2 = 50,
dec_places = 4, vce_robust = TRUE, verbose = FALSE, data, ...)
name (type: character) of the dependent variable in the dataset
data
, e.g. trade flows. This dependent variable is divided by the
product of unilateral incomes (inc_o
and inc_d
, e.g.
GDPs or GNPs of the countries of interest) and logged afterwards.
The transformed variable is then used as the dependent variable in the
estimation.
name (type: character) of the distance variable in the dataset
data
containing a measure of distance between all pairs of bilateral
partners. It is logged automatically when the function is executed.
vector of names (type: character) of those bilateral variables in
the dataset data
that should be taken as the independent variables
in the estimation. If an independent variable is a dummy variable,
it should be of type numeric (0/1) in the dataset. If an independent variable
is defined as a ratio, it should be logged. Unilateral metric variables
such as GDPs should be inserted via the arguments inc_o
for the country of origin and inc_d
for the country of destination.
variable name (type: character) of the income of the country of
origin in the dataset data
. The dependent variable y
is
divided by the product of the incomes inc_d
and inc_o
.
variable name (type: character) of the income of the country of
destination in the dataset data
. The dependent variable y
is
divided by the product of the incomes inc_d
and inc_o
.
maximum number of outer loop iterations. The default is set to 50. There will be a warning if the iterations did not converge.
maximum number of inner loop iterations. The default is set to 50. There will be a warning if the iterations did not converge.
number of decimal places that should not change after a new iteration for the estimation to stop. The default is set to 4.
robust (type: logic) determines whether a robust
variance-covariance matrix should be used. The default is set to TRUE
.
If set TRUE
the estimation results equal the Stata results for
robust estimation.
(type: logic) determines whether the estimated coefficients
of each iteration should be printed in the console. The default is set
to FALSE
.
name of the dataset to be used (type: character).
To estimate gravity equations, a square gravity dataset including bilateral
flows defined by the argument y
, ISO-codes of type character
(called iso_o
for the country of origin and iso_d
for the
destination country), a distance measure defined by the argument dist
and other potential influences given as a vector in x
are required.
All dummy variables should be of type numeric (0/1). Missing trade flows as
well as incomplete rows should be excluded from the dataset.
Furthermore, flows equal to zero should be excluded as the gravity equation
is estimated in its additive form.
As, to our knowledge at the moment, there is no explicit literature covering
the estimation of a gravity equation by SILS
using panel data, cross-sectional data should be used.
additional arguments to be passed to functions used by
SILS
.
The function returns the summary of the estimated gravity model as an
lm
-object. It furthermore returns the resulting coefficients for each
iteration.
SILS
is an estimation method for gravity models
developed by Head and Mayer (2014) (see the references for
more information).
To execute the function a square gravity dataset with all pairs of
countries, ISO-codes for the country of origin and destination, a measure of
distance between the bilateral partners as well as all
information that should be considered as dependent an independent
variables is needed.
Make sure the ISO-codes are of type "character".
Missing bilateral flows as well as incomplete rows should be
excluded from the dataset.
Furthermore, flows equal to zero should be excluded as the gravity equation
is estimated in its additive form.
The function SILS
utilizes the relationship between the Multilateral
Resistance terms and the transaction costs. The parameters are estimated by
an iterative procedure. The function executes loops until the parameters
stop changing significantly.
SILS
is designed to be consistent with the Stata code provided at
the website
Gravity Equations: Workhorse, Toolkit, and Cookbook
when choosing robust estimation.
As, to our knowledge at the moment, there is no explicit literature covering
the estimation of a gravity equation by SILS
using panel data,
we do not recommend to apply this method in this case.
For information on SILS
as well as more information on gravity
models, theoretical foundations and suitable estimation methods in general see
Head, K. and Mayer, T. (2014) <DOI:10.1016/B978-0-444-54314-1.00003-3>
and
Anderson, J. E. and van Wincoop, E. (2003) <DOI:10.3386/w8079>
as well as
Anderson, J. E. (1979) <DOI:10.12691/wjssh-2-2-5>
Anderson, J. E. (2010) <DOI:10.3386/w16576>
Baier, S. L. and Bergstrand, J. H. (2009) <DOI:10.1016/j.jinteco.2008.10.004>
Baier, S. L. and Bergstrand, J. H. (2010) in Van Bergeijk, P. A., & Brakman, S. (Eds.) (2010) chapter 4 <DOI:10.1111/j.1467-9396.2011.01000.x>
Head, K., Mayer, T., & Ries, J. (2010) <DOI:10.1016/j.jinteco.2010.01.002>
Santos-Silva, J. M. C. and Tenreyro, S. (2006) <DOI:10.1162/rest.88.4.641>
and the citations therein.
See Gravity Equations: Workhorse, Toolkit, and Cookbook for gravity datasets and Stata code for estimating gravity models.
# NOT RUN {
data(Gravity)
SILS(y="flow", dist="distw", x=c("rta"), inc_o="gdp_o", inc_d="gdp_d",
maxloop=50, maxloop2=50, dec_places=4, vce_robust=TRUE, verbose=FALSE,
data=Gravity)
SILS(y="flow", dist="distw", x=c("rta", "comcur", "contig"),
inc_o="gdp_o", inc_d="gdp_d", maxloop=50, maxloop2=50, dec_places=4,
vce_robust=FALSE, verbose=TRUE, data=Gravity)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab