Description Usage Arguments Details Value References See Also Examples
OLS
estimates gravity models in their traditional form
via Ordinary Least Squares (OLS). It does not consider Multilateral
Resistance terms.
1 |
y |
name (type: character) of the dependent variable in the dataset
|
dist |
name (type: character) of the distance variable in the dataset
|
x |
vector of names (type: character) of those bilateral variables in
the dataset |
inc_d |
variable name (type: character) of the income of the country of
destination in the dataset |
inc_o |
variable name (type: character) of the income of the country of
origin in the dataset |
uie |
Unitary Income Elasticities (type: logic) determines whether the
parameters are to be estimated assuming unitary income elasticities.
The default value is set to |
vce_robust |
robust (type: logic) determines whether a robust
variance-covariance matrix should be used. The default is set to |
data |
name of the dataset to be used (type: character).
To estimate gravity equations, a square gravity dataset including bilateral
flows defined by the argument |
... |
additional arguments to be passed to |
OLS
estimates gravity models in their traditional, additive,
form via Ordinary Least Squares using the lm
function.
Multilateral Resistance terms are not considered by this function.
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.
As the coefficients for the country's incomes were often found to be close to
unitary and unitary income elasticities are in line with some theoretical
foundations on international trade, it is sometimes assumed that the income
elasticities are equal to unity. In order to allow for the estimation with
and without the assumption of unitary income elasticities, the option
uie
is built into OLS
with the default set to FALSE
.
OLS
estimation can be used for both, cross-sectional and
panel data. Nonetheless, the function is designed to be consistent with the
Stata code for cross-sectional data provided at the website
Gravity Equations: Workhorse, Toolkit, and Cookbook
when choosing robust estimation.
The function OLS
was therefore tested for cross-sectional data.
For the use with panel data no tests were performed.
Therefore, it is up to the user to ensure that the functions can be applied
to panel data.
Depending on the panel dataset and the variables -
specifically the type of fixed effects -
included in the model, it may easily occur that the model is not computable.
Also, note that by including bilateral fixed effects such as country-pair
effects, the coefficients of time-invariant observables such as distance
can no longer be estimated.
Depending on the specific model, the code of the
respective function may has to be changed in order to exclude the distance
variable from the estimation.
At the very least, the user should take special
care with respect to the meaning of the estimated coefficients and variances
as well as the decision about which effects to include in the estimation.
When using panel data, the parameter and variance estimation of the models
may have to be changed accordingly.
For a comprehensive overview of gravity models for panel data
see Egger and Pfaffermayr (2003), Gomez-Herrera (2013) and Head, Mayer and
Ries (2010) as well as the references therein.
The function returns the summary of the estimated gravity model as an
lm
-object.
For more information on gravity models, theoretical foundations and estimation methods in general see
Anderson, J. E. (1979) <DOI:10.12691/wjssh-2-2-5>
Anderson, J. E. (2010) <DOI:10.3386/w16576>
Anderson, J. E. and van Wincoop, E. (2003) <DOI:10.3386/w8079>
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>
Head, K. and Mayer, T. (2014) <DOI:10.1016/B978-0-444-54314-1.00003-3>
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.
For estimating gravity equations using panel data see
Egger, P., & Pfaffermayr, M. (2003) <DOI:10.1007/s001810200146>
Gomez-Herrera, E. (2013) <DOI:10.1007/s00181-012-0576-2>
and the references therein.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data(Gravity_no_zeros)
OLS(y="flow", dist="distw", x=c("rta", "contig", "comcur"),
inc_o="gdp_o", inc_d="gdp_d", uie=FALSE,
vce_robust=TRUE, data=Gravity_no_zeros)
OLS(y="flow", dist="distw", x=c("rta", "comcur", "contig"),
inc_o="gdp_o", inc_d="gdp_d", uie=TRUE,
vce_robust=TRUE, data=Gravity_no_zeros)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.