log_distance
creates a new dist_log
column in log scale by taking the original distance column in the data
Value
The function returns the summary of the estimated gravity model as an
lm
-object.
Examples
log_distance(gravity_zeros, "distw")
#> # A tibble: 22,588 × 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. 214058. 0 0.061 0 0 0
#> 2 AFG AUS 11086. 8399. 768178. 0 0.406 0 0 0
#> 3 AFG AUT 4567. 8399. 322444. 0 0.165 0 0 0
#> 4 AFG AZE 1822. 8399. 20122. 0 0.00160 0 0 0
#> 5 AFG BDI 5849. 8399. 807. 0 0 0 0 0
#> 6 AFG BEL 5332. 8399. 392001. 0 4.16 0 0 0
#> 7 AFG BEN 7331. 8399. 4775. 0 0 0 0 0
#> 8 AFG BFA 7464. 8399. 6205. 0 0.00103 0 0 0
#> 9 AFG BGD 2489. 8399. 61961. 0 3.02 0 0 0
#> 10 AFG BGR 3819. 8399. 31483 0 0.0197 0 0 0
#> # ℹ 22,578 more rows
#> # ℹ 1 more variable: dist_log <dbl>