7.8 Comparing Groups R Exercise

The General Social Survey (GSS) is one of the longest running and extensive survey projects in the US. The full dataset includes over 1000 variables spanning demographics, attitudes, and behaviors. The file GSS_w203.RData contains a small selection of a variables from the 2018 GSS.

To learn about each variable, you can enter it into the search bar at the GSS data explorer

Code
load('data/GSS_w203.RData')
summary(GSS)
##            rincome               happy                           sexnow   
##  $25000 or more: 851   very happy   : 701   women                   :758  
##  $20000 - 24999: 107   pretty happy :1307   man                     :640  
##  $10000 - 14999:  94   not too happy: 336   transgender             :  2  
##  $15000 - 19999:  61   DK           :   0   a gender not listed here:  1  
##  lt $1000      :  33   IAP          :   0   Don't know              :  0  
##  (Other)       : 169   NA           :   0   (Other)                 :  0  
##  NA's          :1033   NA's         :   4   NA's                    :947  
##      wwwhr           emailhr                     socrel   
##  Min.   :  0.00   Min.   :  0.000   sev times a week:382  
##  1st Qu.:  3.00   1st Qu.:  0.000   sev times a mnth:287  
##  Median :  8.00   Median :  2.000   once a month    :259  
##  Mean   : 13.91   Mean   :  7.152   sev times a year:240  
##  3rd Qu.: 20.00   3rd Qu.: 10.000   almost daily    :217  
##  Max.   :140.00   Max.   :100.000   (Other)         :171  
##  NA's   :986      NA's   :929       NA's            :792  
##              socommun      numpets          tvhours      
##  never           :510   Min.   : 0.000   Min.   : 0.000  
##  once a month    :243   1st Qu.: 0.000   1st Qu.: 1.000  
##  sev times a week:219   Median : 1.000   Median : 2.000  
##  sev times a year:196   Mean   : 1.718   Mean   : 2.938  
##  sev times a mnth:174   3rd Qu.: 2.000   3rd Qu.: 4.000  
##  (Other)         :215   Max.   :20.000   Max.   :24.000  
##  NA's            :791   NA's   :1201     NA's   :793     
##                      major1         owngun   
##  business administration: 138   yes    :537  
##  education              :  79   no     :993  
##  engineering            :  54   refused: 39  
##  nursing                :  51   DK     :  0  
##  health                 :  42   IAP    :  0  
##  (Other)                : 546   NA     :  0  
##  NA's                   :1438   NA's   :779

You have a set of questions that you would like to answer with a statistical test. For each question:

  1. Choose the most appropriate test.
  2. List and evaluate the assumptions for your test.
  3. Conduct your test.
  4. Discuss statistical and practical significance.