Learn R Programming

gravity (version 0.8.5)

et_tobit: Eaton1995;textualgravity threshold Tobit model (ET Tobit)

Description

et_tobit estimates gravity models in their additive form by conducting a left-censored regression.

It follows the Eaton1995;textualgravity Tobit model, also called threshold Tobit model, where, instead of adding number 1 to the dependent variable as done in tobit, the constant added to the data is estimated and interpreted as a threshold.

For estimating this threshold, we follow Carson2007;textualgravity.

Usage

et_tobit(dependent_variable, regressors, data, ...)

Arguments

dependent_variable

name (type: character) of the dependent variable in the dataset data, e.g. trade flows.

Following Carson and Sun (2007), the smallest positive flow value is used as an estimate of the threshold, this value is is added to the dependent_variable, the result is logged and taken as the dependent variable in the Tobit estimation with lower bound equal to the log of the smallest possible flow value.

regressors

name (type: character) of the regressors to include in the model.

Include the distance variable in the dataset data containing a measure of distance between all pairs of bilateral partners and bilateral variables that should be taken as the independent variables in the estimation.

Unilateral metric variables such as GDPs can be added but those variables have to be logged first.

Interaction terms can be added.

Write this argument as c(distance, contiguity, common curreny, ...).

data

name of the dataset to be used (type: character).

To estimate gravity equations you need a square dataset including bilateral flows defined by the argument dependent_variable, ISO codes or similar of type character (e.g. iso_o for the country of origin and iso_d for the destination country), a distance measure defined by the argument distance and other potential influences (e.g. contiguity and common currency) given as a vector in regressors are required.

All dummy variables should be of type numeric (0/1).

Make sure the ISO codes are of type "character".

If an independent variable is defined as a ratio, it should be logged.

The user should perform some data cleaning beforehand to remove observations that contain entries that can distort estimates.

The function allows zero flows but will remove zero distances.

...

additional arguments to be passed to et_tobit.

Value

The function returns the summary of the estimated gravity model as a censReg-object.

Details

et_tobit represents the Eaton1995;textualgravity Tobit model which is often used when several gravity models are compared.

When taking the log of the gravity equation flows equal to zero constitute a problem as their log is not defined. Therefore, a constant is added to the flows.

This constant, opposed to tobit, is estimated. Compared to the usual ET-Tobit approaches, in this package, the estimation of the threshold is done before the other parameters are estimated.

We follow Carson2007;textualgravity, who show that taking the minimum positive flow value as an estimate of the threshold is super-consistent and that using this threshold estimate ensures that the parameter MLE are asymptotically normal with the asymptotic variance identical to the variance achieved when the threshold is known. Hence, first the threshold is estimated as the minimum positive flow. This threshold is added to the flow variable, it is logged afterwards and taken as the dependent variable.

The Tobit estimation is then conducted using the censReg function and setting the lower bound equal to the log of the minimum positive flow value which was added to all observations.

A Tobit regression represents a combination of a binary and a linear regression. This procedure has to be taken into consideration when interpreting the estimated coefficients.

The marginal effects of an explanatory variable on the expected value of the dependent variable equals the product of both the probability of the latent variable exceeding the threshold and the marginal effect of the explanatory variable of the expected value of the latent variable.

For a more elaborate Tobit function, see ek_tobit for the Eaton and Kortum (2001) Tobit model where each zero trade volume is assigned a country specific interval with the upper bound equal to the minimum positive trade level of the respective importing country.

The function is designed for cross-sectional data, but can be extended to panel data using the censReg function.

A robust estimations is not implemented to the present as the censReg function is not compatible with the vcovHC function.

References

For more information on gravity models, theoretical foundations and estimation methods in general see

Anderson1979gravity

Anderson2001gravity

Anderson2010gravity

Baier2009gravity

Baier2010gravity

Head2010gravity

Santos2006gravity

and the citations therein.

Especially for Tobit models see

Tobin1958gravity

Eaton1995gravity

Eaton2001gravity

Carson2007gravity

See Gravity Equations: Workhorse, Toolkit, and Cookbook for gravity datasets and Stata code for estimating gravity models.

See Also

censReg

Examples

Run this code
# NOT RUN {
# Example for data with zero trade flows
data(gravity_zeros)

gravity_zeros <- gravity_zeros %>%
    mutate(
        lgdp_o = log(gdp_o),
        lgdp_d = log(gdp_d)
    )

et_tobit(dependent_variable = "flow", regressors = c("distw", "rta","lgdp_o","lgdp_d"),
data = gravity_zeros)
# }
# NOT RUN {
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab