# First, we'll create a binary vector for party affiliation
# that compares just Democrats and Republicans. With the
# new variable, "repub", we'll be building a model that
# tries to predict the characteristics associated with the
# odds of identifying as a Republican rather than a Democrat.

repub=0; repub[pid_self==1]<-0; repub[pid_self==2]<-1

# Now, we'll specify our base model.

# We'll use the index that measures attitude toward federal
# spending that we created earlier. The source code is here:
source("http://www.courseserve.info/files/SOCY7112spending.r")