A sample of categorical variables from the General Social survey

gss_cat

Format

year

year of survey, 2000--2014

age

age. Maximum age truncated to 89.

marital

marital status

race

race

rincome

reported income

partyid

party affiliation

relig

religion

denom

denomination

tvhours

hours per day watching tv

Source

Downloaded from https://gssdataexplorer.norc.org/.

Examples

gss_cat
#> # A tibble: 21,483 × 9 #> year marital age race rincome partyid #> <int> <fctr> <int> <fctr> <fctr> <fctr> #> 1 2000 Never married 26 White $8000 to 9999 Ind,near rep #> 2 2000 Divorced 48 White $8000 to 9999 Not str republican #> 3 2000 Widowed 67 White Not applicable Independent #> 4 2000 Never married 39 White Not applicable Ind,near rep #> 5 2000 Divorced 25 White Not applicable Not str democrat #> 6 2000 Married 25 White $20000 - 24999 Strong democrat #> 7 2000 Never married 36 White $25000 or more Not str republican #> 8 2000 Divorced 44 White $7000 to 7999 Ind,near dem #> 9 2000 Married 44 White $25000 or more Not str democrat #> 10 2000 Married 47 White $25000 or more Strong republican #> # ... with 21,473 more rows, and 3 more variables: relig <fctr>, denom <fctr>, #> # tvhours <int>
fct_count(gss_cat$relig)
#> # A tibble: 16 × 2 #> f n #> <fctr> <int> #> 1 No answer 93 #> 2 Don't know 15 #> 3 Inter-nondenominational 109 #> 4 Native american 23 #> 5 Christian 689 #> 6 Orthodox-christian 95 #> 7 Moslem/islam 104 #> 8 Other eastern 32 #> 9 Hinduism 71 #> 10 Buddhism 147 #> 11 Other 224 #> 12 None 3523 #> 13 Jewish 388 #> 14 Catholic 5124 #> 15 Protestant 10846 #> 16 Not applicable 0
fct_count(fct_lump(gss_cat$relig))
#> # A tibble: 2 × 2 #> f n #> <fctr> <int> #> 1 Protestant 10846 #> 2 Other 10637