0.0.1 Breif Description of Data Source and its Limitations

1 Data Source: General Social Survey (GSS)

GSS is an annual survey that is conducted in United States of America (USA) to gather sociological scientific data since 1972. It is a cross-sectional survey. However, since it retains questions asked in previous surveys it can give longitudinal information. # Data Collection Methodology The sampling methodology of GSS is complex and has changed over the years. At the outset, sampling is a probability sampling that is, it essentially involves ‘random sampling’ at some level. An important change in methodology happened from 1975 onward when a ‘full probability sampling’ was started. Since, 1975 GSS sampling can be best characterized as multistage random sampling. There is a weighing approach to ensure proportionate sampling of racial minorities.Important limitations of the design are: it may not be representative in terms of institutional populations, illegal migrants and people who are not registered in the census or metropolitan records. # Scope of Generalizability Keeping the above limitations in mind, the results of GSS data analysis should be generalisable to English speaking, adult, non-institutionalized population of USA. # Inference regarding Causality GSS essentially is a recurrent cross-sectional observational study. Hence, in strict terms it cannot be used to infer causality. However, it can yield important correlations.


1.1 Brief summary of Analysis

2 Background

The terrorist attacks of 9 September 2001 on USA is a major sociological event. It is likely to affect societal attitudes and beliefs. GSS data presents a unique opportunity to study this change in US population.It could have affected confidence of society in Federal government, security forces, legislature. It would also affect an individuals perceived sense of security. # Aim To explore changes in selected societal attitudes as reflected by GSS data after the attacks of 9/11/2001 and to generate a hypothesis based on this exploration for further analysis. # Research Question Is there a statistically significant change in following societal attitudes: 1. Social Problem Spending: Specifically, spending on army and aid to other nations. 2. Confidence in Institutions: Specifically, federal government, congress and army. 3. Threat of violence: Specifically, fear of violence in neighborhood. # Methodology Variables of interest will be compared keeping in mind the year of interview. Data from year 2000 and 2002 will be analysed. This will reflect societal attitudes prior to WTC attacks (2000) and following WTC attacks (2002).


2.1 Exploratory data analysis

# loading packages
library(devtools)
library(ggplot2)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(statsr)
# loading dataframe
load("~/Documents/R_documents/_5db435f06000e694f6050a2d43fc7be3_gss.Rdata")
# creating a new dataframe for current analysis with no missing values
dfnew1 <- gss[,c(1,2,41,42,52,59,60)]
dfnew1 <- na.omit(dfnew1)
dfnew1 <- dfnew1[dfnew1$year == 2000 | dfnew1$year == 2002,]
# creating a new variable 'period'
dfnew1 <- mutate(dfnew1, period = ifelse(year == 2002 , "POST_WTC_ATTACK", "PRE_WTC_ATTACK"))
## Tabulating Social problem spending (arms and aid to other nations) vs Period
prepost_arms <- table(dfnew1$natarms,dfnew1$period)
prepost_arms_prop <- prop.table(prepost_arms,2)
barplot(prepost_arms_prop,beside = T, main='Views about expenditure on arms & defence', xlab = 'Period',ylab = 'Proportion of responses',legend.text = rownames(prepost_arms_prop),col = c("darkblue","red","yellow"), ylim = c(0, 1))

prepost_nataid <- table(dfnew1$nataid,dfnew1$period)
prepost_nataid_prop <- prop.table(prepost_nataid,2)
barplot(prepost_nataid_prop,beside = T, main= 'Views about expenditure on aid to other nations', xlab = 'Period',ylab = 'Proportion of responses',legend.text = rownames(prepost_arms_prop),col = c("darkblue","red","yellow"), ylim = c(0, 1))

Interpretation

Visual inspection of the bar-chart shows that proportion of respondents who feel that the current expenditure on army and defense is ‘Too less’ (dark blue) has increased after the attacks. However, the bar-chart about national expenditure on aids to other nations does not show any major trends.

## Tabulating confidence in institutions versus period
prepost_conffed <- table(dfnew1$confed,dfnew1$period)
prepost_conffed_prop <- prop.table(prepost_conffed,2)
barplot(prepost_conffed_prop,beside = T, main='Confidence in Government', xlab = 'Period',ylab = 'Proportion of responses',legend.text = rownames(prepost_conffed_prop),col = c("darkblue","red","yellow"), ylim = c(0, 1))

prepost_conflegis <- table(dfnew1$conlegis,dfnew1$period)
prepost_conflegis_prop <- prop.table(prepost_conflegis,2)
barplot(prepost_conflegis_prop,beside = T, main='Confidence in Congress', xlab = 'Period',ylab = 'Proportion of responses',legend.text = rownames(prepost_conflegis_prop),col = c("darkblue","red","yellow"), ylim = c(0, 1))

prepost_confarmy <- table(dfnew1$conarmy,dfnew1$period)
prepost_confarmy_prop <- prop.table(prepost_confarmy,2)
barplot(prepost_confarmy_prop,beside = T, main='Confidence in Army', xlab = 'Period',ylab = 'Proportion of responses',legend.text = rownames(prepost_confarmy_prop),col = c("darkblue","red","yellow"), ylim = c(0, 1))

Interpretation: Visual inspection shows that proportion of respondents having ‘a great deal’ of confidence in army is higher in post WTC group. There are no major trends in other two bar plots.


2.2 Hypotheis and Inference

3 Change in societal attitude about social problem spending

Null Hypothesis : There is no relationship between year of interview (2000 or 2002) and views about social spending on arms (with 3 levels),these two categorical variables are independent of each other. Conditions: Independence can be assumed as sample is randomly drawn in GSS and is less than 10 percent of US population. Each case contributes to only one cell. And expected count will be checked in the analysis.

# Using the CrossTab function in gmodels package
install.packages("gmodels", repos = getOption("http://cran.us.r-project.org"))
## Installing package into '/home/lekhansh/R/x86_64-pc-linux-gnu-library/3.3'
## (as 'lib' is unspecified)
## Warning in install.packages("gmodels", repos = getOption("http://cran.us.r-
## project.org")): installation of package 'gmodels' had non-zero exit status
library(gmodels)
CrossTable(dfnew1$year,dfnew1$natarms,digits = 2,expected = T,prop.r = T,prop.c = F,prop.t = F,chisq = T,prop.chisq = F)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |              Expected N |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1219 
## 
##  
##              | dfnew1$natarms 
##  dfnew1$year |  Too Little | About Right |    Too Much |   Row Total | 
## -------------|-------------|-------------|-------------|-------------|
##         2000 |         211 |         376 |         216 |         803 | 
##              |      227.92 |      370.21 |      204.87 |             | 
##              |        0.26 |        0.47 |        0.27 |        0.66 | 
## -------------|-------------|-------------|-------------|-------------|
##         2002 |         135 |         186 |          95 |         416 | 
##              |      118.08 |      191.79 |      106.13 |             | 
##              |        0.32 |        0.45 |        0.23 |        0.34 | 
## -------------|-------------|-------------|-------------|-------------|
## Column Total |         346 |         562 |         311 |        1219 | 
## -------------|-------------|-------------|-------------|-------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  5.720023     d.f. =  2     p =  0.05726811 
## 
## 
## 

Inference: Expected count in all the cells is higher than 5 so the test is valid. p value is 0.07, hence, we fail to reject null hypothesis.

CrossTable(dfnew1$year,dfnew1$nataid,digits = 2,expected = T,prop.r = T,prop.c = F,prop.t = F,chisq = T,prop.chisq = F)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |              Expected N |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1219 
## 
##  
##              | dfnew1$nataid 
##  dfnew1$year |  Too Little | About Right |    Too Much |   Row Total | 
## -------------|-------------|-------------|-------------|-------------|
##         2000 |          68 |         246 |         489 |         803 | 
##              |       59.95 |      239.78 |      503.27 |             | 
##              |        0.08 |        0.31 |        0.61 |        0.66 | 
## -------------|-------------|-------------|-------------|-------------|
##         2002 |          23 |         118 |         275 |         416 | 
##              |       31.05 |      124.22 |      260.73 |             | 
##              |        0.06 |        0.28 |        0.66 |        0.34 | 
## -------------|-------------|-------------|-------------|-------------|
## Column Total |          91 |         364 |         764 |        1219 | 
## -------------|-------------|-------------|-------------|-------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  4.830862     d.f. =  2     p =  0.08932884 
## 
## 
## 

Inference: Same as earlier.

4 Change in Confidence in various institutions

Conditions and hypothesis is similar to the earlier analysis. The following code chunk will cross tabulate a number of variables. Inference will be summarized at the end.

CrossTable(dfnew1$year,dfnew1$conarmy,digits = 2,expected = T,prop.r = T,prop.c = F,prop.t = F,chisq = T,prop.chisq = F)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |              Expected N |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1219 
## 
##  
##              | dfnew1$conarmy 
##  dfnew1$year | A Great Deal |    Only Some |   Hardly Any |    Row Total | 
## -------------|--------------|--------------|--------------|--------------|
##         2000 |          310 |          406 |           87 |          803 | 
##              |       359.67 |       366.26 |        77.07 |              | 
##              |         0.39 |         0.51 |         0.11 |         0.66 | 
## -------------|--------------|--------------|--------------|--------------|
##         2002 |          236 |          150 |           30 |          416 | 
##              |       186.33 |       189.74 |        39.93 |              | 
##              |         0.57 |         0.36 |         0.07 |         0.34 | 
## -------------|--------------|--------------|--------------|--------------|
## Column Total |          546 |          556 |          117 |         1219 | 
## -------------|--------------|--------------|--------------|--------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  36.48406     d.f. =  2     p =  1.195603e-08 
## 
## 
## 
CrossTable(dfnew1$year,dfnew1$confed,digits = 2,expected = T,prop.r = T,prop.c = F,prop.t = F,chisq = T,prop.chisq = F)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |              Expected N |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1219 
## 
##  
##              | dfnew1$confed 
##  dfnew1$year | A Great Deal |    Only Some |   Hardly Any |    Row Total | 
## -------------|--------------|--------------|--------------|--------------|
##         2000 |           99 |          415 |          289 |          803 | 
##              |       143.60 |       413.03 |       246.37 |              | 
##              |         0.12 |         0.52 |         0.36 |         0.66 | 
## -------------|--------------|--------------|--------------|--------------|
##         2002 |          119 |          212 |           85 |          416 | 
##              |        74.40 |       213.97 |       127.63 |              | 
##              |         0.29 |         0.51 |         0.20 |         0.34 | 
## -------------|--------------|--------------|--------------|--------------|
## Column Total |          218 |          627 |          374 |         1219 | 
## -------------|--------------|--------------|--------------|--------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  62.24291     d.f. =  2     p =  3.048762e-14 
## 
## 
## 
CrossTable(dfnew1$year,dfnew1$conlegis,digits = 2,expected = T,prop.r = T,prop.c = F,prop.t = F,chisq = T,prop.chisq = F)
## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## |              Expected N |
## |           N / Row Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  1219 
## 
##  
##              | dfnew1$conlegis 
##  dfnew1$year | A Great Deal |    Only Some |   Hardly Any |    Row Total | 
## -------------|--------------|--------------|--------------|--------------|
##         2000 |           92 |          474 |          237 |          803 | 
##              |        98.15 |       486.15 |       218.70 |              | 
##              |         0.11 |         0.59 |         0.30 |         0.66 | 
## -------------|--------------|--------------|--------------|--------------|
##         2002 |           57 |          264 |           95 |          416 | 
##              |        50.85 |       251.85 |       113.30 |              | 
##              |         0.14 |         0.63 |         0.23 |         0.34 | 
## -------------|--------------|--------------|--------------|--------------|
## Column Total |          149 |          738 |          332 |         1219 | 
## -------------|--------------|--------------|--------------|--------------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  6.506075     d.f. =  2     p =  0.03865662 
## 
## 
## 

Inference: 1. The first analysis shows that period of interview (2000 or 2002) and proportion of responses regarding confidence in army are dependent at a significance level of 0.04. 2. The second analysis shows that the period of interview (2000 or 2002) and proportion of responses regarding confidence in federal government are dependent at a significance level of p < 0.001. 3. The third analysis shows that period of interview (2000 or 2002) and proportion of responses regarding confidence in congress are independent of each other. ## Summary and Limitations To summaries this analysis, there is evidence that there is a difference in the opinion of adult US population about their confidence in army and federal government. However, there is no evidence of a similar trend in US populations views about their confidence in legislature, or their views about social expenditure on army or aid to other nations. This analysis could not illustrate the direction of change. Also, there are likely to be multiple confounding variables which are not considered.