Skip to content

Instantly share code, notes, and snippets.

View llthurman's full-sized avatar

Lindsey L. Thurman llthurman

  • U.S. Geological Survey
  • Bozeman, MT
View GitHub Profile
@dsparks
dsparks / coefficent_plot_walkthrough.R
Created December 18, 2012 22:31
A coefficient plot for multiple models
doInstall <- TRUE
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents,
head(ANES) # remove some non-helpful variables
# Fit several models with the same DV: