Created
March 29, 2024 09:34
-
-
Save carlislerainey/c084c5d94925412ead4e9537a5c1ba7a to your computer and use it in GitHub Desktop.
Illustrate arm::display()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load packages | |
library(tidyverse) | |
# update {crdata} if necessary | |
remotes::install_github("carlislerainey/crdata") | |
# load data | |
weis <- crdata::weisiger2014 | |
# rescale weisiger2014 explanatory variables using arm::rescale() | |
rs_weis <- weis %>% | |
mutate(across(polity_conq:coord, arm::rescale)) | |
# fit model | |
f <- resist ~ polity_conq + lndist + terrain + soldperterr + gdppc2 + coord | |
ls <- lm(f, data = rs_weis) # lpm (replicates Table 2 Model 3 of Weisiger 2014) | |
# display model fit | |
arm::display(ls, detail = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment