Introduction:

This analytical report tries to answer the question “Are the veterans (identified as an individual who has ever served on active duty in Armed Forces) more likely or less likely than non-veterans to approve President Obama’s handling of War in Afghanistan ?” 9/11/2001 was a defining moment of the start of the 21st century. The impact of the actions on that day, came to define the presidency of George Bush Jr., and the U.S. foreign policies through and after his 2 term presidency. Barack Obama who was senator at the time, ran his presidential election campaign mainly focussing on the decision errors of going to war in Afghanistan and Iraq. The decision to go to war with Afghanistan has affected lives of millions of Americans at home, and has divided the nation on how to conduct the foreign policy, and how to handle the constant threat of terror. Since, these wars have been such a critical part of our lives for the last decade, and veterans are the ones who have been at the fore front of these wars, we need to understand, how do they characterize President Obama’s handling of Afghan war, and how it differs from the common public’s view, whose only window into the war is through the media.

Data:

We will try to answer our research question using the Americal National Election Studies, 2012 Time Series data. Review the codebook to view list of all variables, the values they take, and the original survey questions associated with the variables. The data was collected by interviewing random sample of voters just before and after the national election. The variables that we will be looking at, presapp_war_x and dem_veteran, to answer the question, were collected by interviewing individuals just before the national election. Please note that this is an observational study only, as the data was collected without the researchers interfering with how the data arises. Whether an individual served in the armed forces or not was left entirely upto the individual and not enforced by the researcher as would be done in an experimental study. Since the individuals come from a random sample across the country, we can generalize this observational study to all the american citizens of voting age. Since this is just an observational study, one should be cautioned not to draw any causal inference between the explanatory(dem_veteran) and the response(presapp_war_x) variable.

Exploratory data analysis:

Let’s look at our dataset

dim(anes)
## [1] 5914  205

We can see that our dataset has 5914 cases, where each case has 205 variables.

class(anes$dem_veteran)
## [1] "factor"
class(anes$presapp_war_x) 
## [1] "factor"

From the class of the variables it is clear that both, our explanatory variable dem_veteran and the response variable presapp_war_x are categorical variables.

levels(anes$dem_veteran)
## [1] "Yes" "No"
levels(anes$presapp_war_x)
## [1] "Approve Strongly"        "Approve Not Strongly"   
## [3] "Disapprove Not Strongly" "Disapprove Strongly"
summary(anes$dem_veteran)
##  Yes   No NA's 
##  775 5135    4
summary(anes$presapp_war_x)
##        Approve Strongly    Approve Not Strongly Disapprove Not Strongly 
##                    2075                    1304                     759 
##     Disapprove Strongly                    NA's 
##                    1536                     240
t<-table(anes$dem_veteran,anes$presapp_war_x)
rownames(t) <- c("Veteran","Non-Veteran")
t
##              
##               Approve Strongly Approve Not Strongly
##   Veteran                  244                  142
##   Non-Veteran             1830                 1162
##              
##               Disapprove Not Strongly Disapprove Strongly
##   Veteran                          90                 285
##   Non-Veteran                     669                1248
mosaicplot(t,main="President's approval of war in Afghanistan",cex.axis=0.9,las=1,color=TRUE)

plot of chunk unnamed-chunk-4

Contingency table suggests that the subject’s approval of President’s handling of the war is dependent on whether the subject has served in active duty in the armed forces or not.

Inference:

Since we have two categorical variables, and one of the variable has more than 2 levels, we will use chi-square independence test, to answer the question, whether having served in the armed forces has influence over the subject’s approval of the President’s handling of war in Afghanistan.

Hypotheses

\(H_0\): Subject’s approval of President’s handling of war in Afghanistan is independent of whether the subject has served in armed forces or not.
\(H_A\): Subject’s approval of President’s handling of war in Afghanistan is dependent on whether the subject has served in armed forces or not.

Conditions for the chi-square test

Our data meets the independence and sample size requirements for the chi-square test

Independence: n=5914 is definitely less than 10% of population(american citizens of voting age)
Sample Size: Each cell has at least 5 expected cases.

Let’s take the row and column totals, which will be needed to do the test.

rtotal<-rowSums(t)
ctotal<-colSums(t)
total<-sum(t)
rtotal
##     Veteran Non-Veteran 
##         761        4909
ctotal
##        Approve Strongly    Approve Not Strongly Disapprove Not Strongly 
##                    2074                    1304                     759 
##     Disapprove Strongly 
##                    1533
total
## [1] 5670

Proportion of veterans in the sample is 0.1342. If in fact having served in the armed forces and the approval of President’s handling of the war are related, then the President’s approval for veteran’s will be

e<-round(ctotal * x)
e
##        Approve Strongly    Approve Not Strongly Disapprove Not Strongly 
##                     278                     175                     102 
##     Disapprove Strongly 
##                     206
o<-t[1,]
chisq <- sum(((o-e)^2)/e)
df <- (2-1) * (4-1)
pvalue <- pchisq(chisq, df, lower.tail=FALSE)
pvalue
## [1] 3.841e-09

Conclusion:

Since the pvalue is extremely small, we reject the null hypotheses. So, we conclude that there is relationship between having served in the armed forces, and subject’s approval of President’s handling of the war in Afghanistan.

References:

American National Election Studies(ANES) 2012 Time Series Study dataset.
Stanford University and University of Michigan [producers].

Appendix:

head(anes[,c("dem_veteran","presapp_war_x")],n=25)
##    dem_veteran           presapp_war_x
## 1           No        Approve Strongly
## 2          Yes        Approve Strongly
## 3           No        Approve Strongly
## 4           No Disapprove Not Strongly
## 5           No        Approve Strongly
## 6           No        Approve Strongly
## 7           No        Approve Strongly
## 8           No        Approve Strongly
## 9           No        Approve Strongly
## 10          No    Approve Not Strongly
## 11          No        Approve Strongly
## 12          No    Approve Not Strongly
## 13          No    Approve Not Strongly
## 14          No     Disapprove Strongly
## 15          No     Disapprove Strongly
## 16          No     Disapprove Strongly
## 17          No Disapprove Not Strongly
## 18          No        Approve Strongly
## 19          No     Disapprove Strongly
## 20          No        Approve Strongly
## 21          No     Disapprove Strongly
## 22          No                    <NA>
## 23          No     Disapprove Strongly
## 24          No Disapprove Not Strongly
## 25         Yes    Approve Not Strongly