library(ggplot2) library(sjlabelled) Democracy <- read_stata("Democracy.dta") GDP_Dem<- subset(Democracy, select = c("Dem_Gov1984", "GDPPC1984")) # we subset the dataset called "Democracy" head(GDP_Dem) model.1 <- lm(Dem_Gov1984~GDPPC1984, data=GDP_Dem) summary(model.1)
R can make complicated things easy and the package below will save you a lot of time. In your assignments you should have tables similar to the ones you see in official reports and journal publications. The
stargazer package will allow to do this without having to update your table multiple times.
library(stargazer) stargazer(model.1, type="html", out="model_one.doc")
Note: If you are using LATEX instead of Word you don’t have to specify the type and the output (out).