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

et_tobit(dependent_variable, distance, additional_regressors = NULL,
  data, ...)



(Type: character) name of the dependent variable. 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.


(Type: character) name of the distance variable that should be taken as the key independent variable in the estimation. The distance is logged automatically when the function is executed.


(Type: character) names of the additional regressors to include in the model (e.g. a dummy variable to indicate contiguity). Unilateral metric variables such as GDP should be inserted via the arguments income_origin and income_destination.

Write this argument as c(contiguity, common currency, ...). By default this is set to NULL.


(Type: data.frame) the dataset to be used.


Additional arguments to be passed to the function.


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


et_tobit represents the Eaton and Tamura (1995) Tobit model which is often used when several gravity models are compared, 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.

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.

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 Carson and Sun (2007) , 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.


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

Anderson JE (1979). “A Theoretical Foundation for the Gravity Equation.” The American Economic Review, 69(1), 106--116. ISSN 00028282.

Anderson JE, van Wincoop E (2001). “Gravity with Gravitas: A Solution to the Border Puzzle.” Technical Report 8079, National Bureau of Economic Research. doi: 10.3386/w8079 .

Anderson JE (2010). “The Gravity Model.” Technical Report 16576, National Bureau of Economic Research. doi: 10.3386/w16576 .

Baier SL, Bergstrand JH (2009). “Bonus vetus OLS: A simple method for approximating international trade-cost effects using the gravity equation.” Journal of International Economics, 77(1), 77 - 85. ISSN 0022-1996, doi: 10.1016/j.jinteco.2008.10.004 .

Baier SL, Bergstrand JH (2010). “The Gravity Model in International Trade: Advances and Applications.” In van Bergeijk PAG, Brakman S (eds.), chapter 4. Cambridge University Press. doi: 10.1017/CBO9780511762109 .

Feenstra RC (2002). “Border effects and the gravity equation: consistent methods for estimation.” Scottish Journal of Political Economy, 49(5), 491--506.

Head K, Mayer T, Ries J (2010). “The erosion of colonial trade linkages after independence.” Journal of International Economics, 81(1), 1 - 14. ISSN 0022-1996, doi: 10.1016/j.jinteco.2010.01.002 .

Head K, Mayer T (2014). “Chapter 3 - Gravity Equations: Workhorse,Toolkit, and Cookbook.” In Gopinath G, Helpman E, Rogoff K (eds.), Handbook of International Economics, volume 4 of Handbook of International Economics, 131 - 195. Elsevier. doi: 10.1016/B978-0-444-54314-1.00003-3 .

Silva JMCS, Tenreyro S (2006). “The Log of Gravity.” The Review of Economics and Statistics, 88(4), 641-658. 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). “The proper panel econometric specification of the gravity equation: A three-way model with bilateral interaction effects.” Empirical Economics, 28(3), 571--580. ISSN 1435-8921, doi: 10.1007/s001810200146 .

Gómez-Herrera E (2013). “Comparing alternative methods to estimate gravity models of bilateral trade.” Empirical Economics, 44(3), 1087--1111. ISSN 1435-8921, doi: 10.1007/s00181-012-0576-2 .

and the references therein.

See also

censReg, et_tobit


# Example for CRAN checks: # Executable in < 5 sec library(dplyr) data("gravity_no_zeros") # Choose 5 countries for testing countries_chosen <- c("AUS", "CHN", "GBR", "BRA", "CAN") grav_small <- filter(gravity_no_zeros, iso_o %in% countries_chosen) grav_small <- grav_small %>% mutate( flow = ifelse(flow < 5, 0, flow), # cutoff for testing purposes lgdp_o = log(gdp_o), lgdp_d = log(gdp_d) ) fit <- et_tobit( dependent_variable = "flow", distance = "distw", additional_regressors = c("rta", "lgdp_o", "lgdp_d"), data = grav_small )