Summary of estimates function that, if is used with default options, provides estimation results are consistent with the Stata methods used in Head and Mayer (2014) . This function is adapted from the work of Isidore Beautrelet.
Arguments
- model
(Type: lm) Regression object obtained by using the estimation methods from this package or a generic method such as
lm
orglm
. Some particular classes (gpml
,nbpml
,negbin
andnls
) don't return R squared and F statistic.- robust
(Type: logical) Determines whether a robust variance-covariance matrix should be used. By default is set to
FALSE
.If set
TRUE
the estimation results are consistent with the Stata code provided at the website Gravity Equations: Workhorse, Toolkit, and Cookbook when choosing robust estimation.- ...
additional arguments to be passed to
tobit
.
Examples
# Example for CRAN checks:
# Executable in < 5 sec
data("gravity_no_zeros")
# Choose 5 countries for testing
countries_chosen <- c("AUS", "CHN", "GBR", "BRA", "CAN")
grav_small <- subset(gravity_no_zeros, iso_o %in% countries_chosen)
# Using OLS for testing
fit <- ols(
dependent_variable = "flow",
distance = "distw",
additional_regressors = c("rta", "contig", "comcur"),
income_origin = "gdp_o",
income_destination = "gdp_d",
code_origin = "iso_o",
code_destination = "iso_d",
uie = FALSE,
robust = FALSE,
data = grav_small
)
fit2 <- hm_summary(fit, robust = FALSE)