log_distance creates a new dist_log column in log scale by taking the original distance column in the data

log_distance(data, distance)

Arguments

data

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

distance

The distance column

Value

The function returns the summary of the estimated gravity model as an lm-object.

See also

Examples

log_distance(gravity_zeros, "distw")
#> # A tibble: 22,588 x 11 #> iso_o iso_d distw gdp_o gdp_d rta flow contig comlang_off comcur #> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 AFG ARG 15341. 8399. 2.14e5 0 0.061 0 0 0 #> 2 AFG AUS 11086. 8399. 7.68e5 0 0.406 0 0 0 #> 3 AFG AUT 4567. 8399. 3.22e5 0 0.165 0 0 0 #> 4 AFG AZE 1822. 8399. 2.01e4 0 0.00160 0 0 0 #> 5 AFG BDI 5849. 8399. 8.07e2 0 0 0 0 0 #> 6 AFG BEL 5332. 8399. 3.92e5 0 4.16 0 0 0 #> 7 AFG BEN 7331. 8399. 4.77e3 0 0 0 0 0 #> 8 AFG BFA 7464. 8399. 6.21e3 0 0.00103 0 0 0 #> 9 AFG BGD 2489. 8399. 6.20e4 0 3.02 0 0 0 #> 10 AFG BGR 3819. 8399. 3.15e4 0 0.0197 0 0 0 #> # … with 22,578 more rows, and 1 more variable: dist_log <dbl>