library(readr)
trade2013 <- read_csv("trade2013.csv")
## Rows: 22524 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (2): country1, country2
## dbl (4): ltrade, lgdp1, lgdp2, ldist
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
library(stargazer)
##
## Please cite as:
##
## Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
## R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
model1 <- lm(ltrade ~ ldist, data=trade2013)
stargazer(model1,type="text",title="Results")
##
## Results
## ================================================
## Dependent variable:
## ----------------------------
## ltrade
## ------------------------------------------------
## ldist -1.393***
## (0.042)
##
## Constant 12.436***
## (0.342)
##
## ------------------------------------------------
## Observations 13,554
## R2 0.077
## Adjusted R2 0.077
## Residual Std. Error 3.846 (df = 13552)
## F Statistic 1,123.997*** (df = 1; 13552)
## ================================================
## Note: *p<0.1; **p<0.05; ***p<0.01