hm_summary {gravity} | R Documentation |
Head and Mayer consistent summary statistics
Description
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.
Usage
hm_summary(model, robust = FALSE, ...)
Arguments
model |
(Type: lm) Regression object obtained by using the estimation methods from this package
or a generic method such as |
robust |
(Type: logical) Determines whether a robust
variance-covariance matrix should be used. By default is set to If set |
... |
additional arguments to be passed to |
Value
Summary lm
object.
Examples
# 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)
# 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)