Submitted by Professor Shortell on Mon, 12/11/2017 - 18:52
Logistic Regression
Let's test a model to predict voting for Trump in 2016.
First, some recodes:
Vote4Trump<-ifelse(V162034a==2,1,0) #This will be our DV
Gender<-'NA'; Gender[V161342==1]<-1; Gender[V161342==2]<-0
V161310r<-'NA'; V161310r[V161310a>=0]<-0; V161310r[V161310a==1]<-1
Now, the model:
summary(glm(Vote4Trump~Gender+V161310r+V161126,family=binomial))
exp(coef(glm(Vote4Trump~Gender+V161310r+V161126, family=binomial)))
Submitted by Professor Shortell on Mon, 12/04/2017 - 19:07
Using the 2016 ANES, build a model to predict political identity (to make it comparable to the model shown in class, recode political identity to Republican/Not Republican). Post your code below your interpretation so that we can see your recoding.
Submitted by Professor Shortell on Mon, 11/27/2017 - 18:19
DATAFRAME: ANES 2012
ANES2016<-read.csv("http://www.shortell.nyc/online/files/anes_timeseries_2016.csv")
DV: Favorability to Democratic Party (ft_dem)
IVs: Political view (libcpre_self)
Attitude toward DACA (immig_citizen) * recoded
Attitude toward affirmative action (aa_uni) * recoded
Religiosity (relig_import)
Gender (gender_respondent)
RECODES
immig_citizenr<-ifelse(immig_citizen==1,1,0)
aa_unir<-ifelse(aa_uni==1,1,0)
Submitted by Professor Shortell on Mon, 11/20/2017 - 19:03
Use the ANES 2016 to:
(a) examine the relationship between political view and a favorability variable with a correlation coefficient; and,
(b) compute a linear regression for the same variables and interpret the results.
How is the interpretation of the correlation and linear regression different?
Submitted by Professor Shortell on Mon, 11/13/2017 - 19:13
Post your interpretation the results of your factorial analysis of variance, based on the model shown in class.
Submitted by Professor Shortell on Mon, 11/06/2017 - 19:07
Select a different DV from the class demonstration and compute a factorial analysis of variance and interpret the results.
Submitted by Professor Shortell on Mon, 10/30/2017 - 19:11
A. Select another categorical variable to use as an independent variable and test mean differences for our DV: V162098, FT Labor unions.
B. Next, select a new DV and run another test for mean differences.
Submitted by Professor Shortell on Mon, 10/23/2017 - 18:00
Identify a numeric dependent variable from ANES 2016. Select a binary independent variable to compare two groups. (You may need to recode a categorical variable into a binary.) Perform the hypothesis test and interpret the results, as appropriate.
Submitted by Professor Shortell on Mon, 10/23/2017 - 17:59
Submitted by Professor Shortell on Mon, 10/23/2017 - 17:58
Pages