FIND DATA: By Journal | Sites   ANALYZE DATA: Help with R | SPSS | Stata | Excel   WHAT'S NEW? US Politics | IR | Law & Courts🎵
   FIND DATA: By Journal | Sites   WHAT'S NEW? US Politics | IR | Law & Courts🎵
WHAT'S NEW? US Politics | IR | Law & Courts🎵

Run R Code Example Online

# Chapter 4: Making Comparisons
library(poliscidata)  # Loads R companion package in session

# LINE CHARTS

# You first need to transform the DV.
nes$envir = as.numeric(nes$envjob_3=="Envir")
nes$envir = 100*nes$envir

plotmeansC(nes, ~envir, ~pid_3, envir~pid_3, w=~wt,
           xlab="Party Identification", 
           ylab="Percent Pro-Environment",
           main="Percentage Favoring Environment over Jobs,\n by Party Identification")