Learn R Programming

gravity (version 1.1)

tobit: Left-censored Tobit model with known threshold

Description

tobit estimates gravity models in their additive form by conducting a left-censored regression, which, after adding the constant 1 to the dependent variable, utilizes log(1) = 0 as the censoring value.

Usage

tobit(
  dependent_variable,
  distance,
  additional_regressors = NULL,
  added_constant = 1,
  data,
  ...
)

Value

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

Arguments

dependent_variable

(Type: character) name of the dependent variable. The number 1 is added and the transformed variable is logged and taken as the dependent variable in the tobit estimation with lower bound equal to 0 as log(1) = 0 represents the smallest flows in the transformed variable.

distance

(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.

additional_regressors

(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.

added_constant

(Type: numeric) the constant to be added to the dependent variable. The default value is 1. The minimum of log(y + added_constant) is taken as the left boundary in the Tobit model.

In the often used case of added_constant = 1, the dependent variable is left-censored at value 0 as log(1) = 0.

data

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

...

Additional arguments to be passed to the function.

Details

tobit represents the left-censored tobit Tobin1958;textualgravity approach utilizing a known censoring threshold 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, in the execution of the function the number 1 is added to all flows and the log(flows+1) is taken as the dependent variable.

The tobit estimation is conducted using the censReg function and setting the lower bound equal to 0 as log(1)=0 represents the smallest flows in the transformed variable.

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.

The function is designed for cross-sectional data, but can be easily 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 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.

References

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

Anderson1979gravity

Anderson2001gravity

Anderson2010gravity

Baier2009gravity

Baier2010gravity

Feenstra2002gravity

Head2010gravity

Head2014gravity

Santos2006gravity

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

Egger2003gravity

Gomez-Herrera2013gravity

and the references therein.

See Also

censReg

Examples

Run this code
# 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(
    lgdp_o = log(gdp_o),
    lgdp_d = log(gdp_d)
  )

fit <- tobit(
  dependent_variable = "flow",
  distance = "distw",
  additional_regressors = c("rta", "lgdp_o", "lgdp_d"),
  added_constant = 1,
  data = grav_small
)

Run the code above in your browser using DataLab