# List of packages
packages <- c("tidyverse", "infer", "fst", "modelsummary", "effects", "survey", "interactions") # add any you need here
# Install packages if they aren't installed already
new_packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new_packages)) install.packages(new_packages)
# Load the packages
lapply(packages, library, character.only = TRUE)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Loading required package: carData
##
## lattice theme set by effectsTheme()
## See ?effectsTheme for details.
##
## Loading required package: grid
##
## Loading required package: Matrix
##
##
## Attaching package: 'Matrix'
##
##
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
##
##
## Loading required package: survival
##
##
## Attaching package: 'survey'
##
##
## The following object is masked from 'package:graphics':
##
## dotchart
## [[1]]
## [1] "lubridate" "forcats" "stringr" "dplyr" "purrr" "readr"
## [7] "tidyr" "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [13] "grDevices" "utils" "datasets" "methods" "base"
##
## [[2]]
## [1] "infer" "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [7] "readr" "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [13] "graphics" "grDevices" "utils" "datasets" "methods" "base"
##
## [[3]]
## [1] "fst" "infer" "lubridate" "forcats" "stringr" "dplyr"
## [7] "purrr" "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [13] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
## [19] "base"
##
## [[4]]
## [1] "modelsummary" "fst" "infer" "lubridate" "forcats"
## [6] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [11] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [16] "grDevices" "utils" "datasets" "methods" "base"
##
## [[5]]
## [1] "effects" "carData" "modelsummary" "fst" "infer"
## [6] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [11] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [16] "stats" "graphics" "grDevices" "utils" "datasets"
## [21] "methods" "base"
##
## [[6]]
## [1] "survey" "survival" "Matrix" "grid" "effects"
## [6] "carData" "modelsummary" "fst" "infer" "lubridate"
## [11] "forcats" "stringr" "dplyr" "purrr" "readr"
## [16] "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [21] "graphics" "grDevices" "utils" "datasets" "methods"
## [26] "base"
##
## [[7]]
## [1] "interactions" "survey" "survival" "Matrix" "grid"
## [6] "effects" "carData" "modelsummary" "fst" "infer"
## [11] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [16] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [21] "stats" "graphics" "grDevices" "utils" "datasets"
## [26] "methods" "base"
#Task 1 Graph the histogram distribution using the populist scale (as we did in the tutorial) for the country of Sweden. What do you note?
sweden_data <- read.fst("sweden_data.fst")
# Setting values greater than 10 to NA
sweden_data$trstplt <- ifelse(sweden_data$trstplt > 10, NA, sweden_data$trstplt)
sweden_data$trstprl <- ifelse(sweden_data$trstprl > 10, NA, sweden_data$trstprl)
sweden_data$trstprt <- ifelse(sweden_data$trstprt > 10, NA, sweden_data$trstprt)
# Creating and rescaling the trust variable
sweden_data$trust <- scales::rescale(sweden_data$trstplt + sweden_data$trstprl + sweden_data$trstprt, na.rm = TRUE, to = c(0, 100))
# Creating the populist scale
sweden_data$populist <- scales::rescale(sweden_data$trust, na.rm = TRUE, to=c(100,0))
# Plotting the distribution of the populist scale for Sweden
ggplot(sweden_data, aes(x = populist)) +
geom_histogram(bins = 30, fill = "blue", color = "black") +
theme_minimal() +
labs(title = "Distribution of Populist Scale for Sweden",
x = "Populist Scale",
y = "Count")
## Warning: Removed 2503 rows containing non-finite values (`stat_bin()`).
A greater percentage of people tend to have lower scores on the populist
scale, according to the Sweden populist scale distribution, which seems
to be skewed to the right. According to the scale being used, there is a
peak at the lower end, indicating that a sizable portion of people have
relatively low levels of populism. The distribution exhibits a degree of
symmetry, with a progressive decline in frequency as populist scores
rise.
#Task 2 Run a linear regression with populist attitudes as the outcome, educational attainment (recoded as a binary “BA or more” and “No BA”), and using the Swedish data. Print the intercept and coefficients only and interpret. Then do a tidy model table displaying the p-value (with digits = 3) and interpret.
df <- read.fst("sweden_data.fst")
## Creates an authoritarian values scale based on human modules items (can also do libertarian value scale)
df <- df %>%
mutate(behave = ipbhprp,
secure = impsafe,
safety = ipstrgv,
tradition = imptrad,
rules = ipfrule) %>%
mutate(across(c("behave", "secure", "safety", "tradition", "rules"),
~ na_if(.x, 7) %>% na_if(8) %>% na_if(9))) %>%
# Apply the reverse coding
mutate(across(c("behave", "secure", "safety", "tradition", "rules"), ~ 7 - .x ))
# Now you can calculate 'schwartzauth' after the NA recoding
df$auth <- scales::rescale(df$behave +
df$secure +
df$safety +
df$tradition +
df$rules, to=c(0,100), na.rm=TRUE)
df <- df %>% filter(!is.na(auth))
table(df$secure)
##
## 1 2 3 4 5 6
## 396 2123 2852 3673 3702 1582
table(df$auth)
##
## 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60
## 7 7 18 51 84 145 261 383 518 644 843 965 1118 1181 1301 1206
## 64 68 72 76 80 84 88 92 96 100
## 1177 1025 901 750 654 456 260 182 92 99
Looking at distribution before we proceed:
ggplot(df, aes(x = auth)) +
geom_histogram(bins = 30, fill = "blue", color = "black") +
theme_minimal() +
labs(title = "Distribution of Authoritarian Scale for Sweden",
x = "Authoritarian Scale",
y = "Count")
df$year <- NA
replacements <- c(2002, 2004, 2006, 2008, 2010, 2012, 2014, 2016, 2018, 2020)
for(i in 1:10){
df$year[df$essround == i] <- replacements[i]
}
auth_avg <- df %>%
group_by(year) %>%
summarize(auth_avg = mean(auth, na.rm = TRUE))
plot_auth <- ggplot(auth_avg, aes(x = year, y = auth_avg)) +
geom_point(aes(color = auth_avg), alpha = 1.0) +
geom_line(aes(group = 1), color = "blue", linetype = "dashed") +
labs(title = "Authoritarian Scale Average by Year (Sweden)",
x = "Survey Year",
y = "Authoritarian Scale Average") +
theme_minimal() +
theme(legend.position = "none") +
scale_y_continuous(limits = c(0, 100))
print(plot_auth)
sweden_model_data <- sweden_data %>%
mutate(
# Recoding gender
gndr = case_when(
gndr == 1 ~ "Male",
gndr == 2 ~ "Female",
gndr == 9 ~ NA_character_,
TRUE ~ as.character(gndr)
),
# Recoding education
educ.ba = case_when(
essround < 5 & edulvla == 5 ~ "BA or more",
essround >= 5 & edulvlb > 600 ~ "BA or more",
TRUE ~ "No BA"
),
# Handle NAs for education levels
edulvla = ifelse(edulvla %in% c(77, 88, 99), NA_integer_, edulvla),
edulvlb = ifelse(edulvlb %in% c(5555, 7777, 8888), NA_integer_, edulvlb),
# Explicitly making 'No BA' the reference category
educ.ba = factor(educ.ba, levels = c("No BA", "BA or more")),
# Recoding age, setting 999 to NA
age = ifelse(agea == 999, NA, agea),
# Recoding cohort variable, setting years before 1930 and after 2000 to NA
cohort = ifelse(yrbrn < 1930 | yrbrn > 2000, NA, yrbrn),
# Recoding generational cohorts based on year of birth
gen = case_when(
yrbrn %in% 1900:1945 ~ "1",
yrbrn %in% 1946:1964 ~ "2",
yrbrn %in% 1965:1979 ~ "3",
yrbrn %in% 1980:1996 ~ "4",
TRUE ~ as.character(cohort) # Keeping other values as character if they do not fit the ranges
),
# Converting cohort to a factor with labels
gen = factor(gen,
levels = c("1", "2", "3", "4"),
labels = c("Interwar", "Baby Boomers", "Gen X", "Millennials"))
)
table(sweden_model_data$gen)
##
## Interwar Baby Boomers Gen X Millennials
## 4021 5787 4263 3609
names(sweden_data)
## [1] "name" "essround" "edition" "proddate" "cntry" "idno"
## [7] "dweight" "pspwght" "pweight" "anweight" "prob" "stratum"
## [13] "psu" "netuse" "netusoft" "netustm" "nwspol" "nwsppol"
## [19] "nwsptot" "pplfair" "pplhlp" "ppltrst" "rdpol" "rdtot"
## [25] "tvpol" "tvtot" "actrolg" "actrolga" "badge" "bctprd"
## [31] "bghtprd" "clsprty" "contplt" "cptppol" "cptppola" "dclagr"
## [37] "dclaid" "dclcrm" "dcldef" "dclenv" "dclintr" "dclmig"
## [43] "dclwlfr" "dmcntov" "dntmny" "ecohenv" "etapapl" "euftf"
## [49] "freehms" "gincdif" "ginveco" "hmsacld" "hmsfmlsh" "ilglpst"
## [55] "lawobey" "lrscale" "mmbprty" "needtru" "pbldmn" "pbldmna"
## [61] "pltcare" "pltinvt" "polactiv" "polcmpl" "poldcs" "polintr"
## [67] "prtdgcl" "prtyban" "psppipl" "psppipla" "psppsgv" "psppsgva"
## [73] "pstplonl" "ptcpplt" "scnsenv" "sgnptit" "stfdem" "stfeco"
## [79] "stfedu" "stfgov" "stfhlth" "stflife" "trstep" "trstlgl"
## [85] "trstplc" "trstplt" "trstprl" "trstprt" "trstun" "vote"
## [91] "wrkorg" "wrkprty" "imsmetn" "imdfetn" "impcntr" "imbgeco"
## [97] "imueclt" "imwbcnt" "volunfp" "lrnobed" "loylead" "donprty"
## [103] "prtvde1" "prtvade1" "prtvbde1" "prtvcde1" "prtvdde1" "prtvede1"
## [109] "prtvfde1" "prtvde2" "prtvade2" "prtvbde2" "prtvcde2" "prtvdde2"
## [115] "prtvede2" "prtvfde2" "prtvlt1" "prtvalt1" "prtvblt1" "prtvclt1"
## [121] "prtvlt2" "prtvalt2" "prtvblt2" "prtvclt2" "prtvlt3" "prtvalt3"
## [127] "prtvblt3" "prtvclt3" "prtvtal" "prtvtat" "prtvtaat" "prtvtbat"
## [133] "prtvtcat" "prtvtbe" "prtvtabe" "prtvtbbe" "prtvtcbe" "prtvtdbe"
## [139] "prtvtebe" "prtvtbg" "prtvtabg" "prtvtbbg" "prtvtcbg" "prtvtdbg"
## [145] "prtvtebg" "prtvtch" "prtvtach" "prtvtbch" "prtvtcch" "prtvtdch"
## [151] "prtvtech" "prtvtfch" "prtvtgch" "prtvthch" "prtvtcy" "prtvtacy"
## [157] "prtvtbcy" "prtvtccy" "prtvtcz" "prtvtacz" "prtvtbcz" "prtvtccz"
## [163] "prtvtdcz" "prtvtecz" "prtvtdk" "prtvtadk" "prtvtbdk" "prtvtcdk"
## [169] "prtvtddk" "prtvtee" "prtvtaee" "prtvtbee" "prtvtcee" "prtvtdee"
## [175] "prtvteee" "prtvtfee" "prtvtgee" "prtvthee" "prtvtes" "prtvtaes"
## [181] "prtvtbes" "prtvtces" "prtvtdes" "prtvtees" "prtvtfes" "prtvtfi"
## [187] "prtvtafi" "prtvtbfi" "prtvtcfi" "prtvtdfi" "prtvtefi" "prtvtfr"
## [193] "prtvtafr" "prtvtbfr" "prtvtcfr" "prtvtdfr" "prtvtefr" "prtvtgb"
## [199] "prtvtagb" "prtvtbgb" "prtvtcgb" "prtvtdgb" "prtvtgr" "prtvtagr"
## [205] "prtvtbgr" "prtvtcgr" "prtvtdgr" "prtvthr" "prtvtahr" "prtvtbhr"
## [211] "prtvthu" "prtvtahu" "prtvtbhu" "prtvtchu" "prtvtdhu" "prtvtehu"
## [217] "prtvtfhu" "prtvtghu" "prtvtie" "prtvtaie" "prtvtbie" "prtvtcie"
## [223] "prtvtdie" "prtvtil" "prtvtail" "prtvtbil" "prtvtcil" "prtvtdil"
## [229] "prtvtis" "prtvtais" "prtvtbis" "prtvtcis" "prtvtdis" "prtvtit"
## [235] "prtvtait" "prtvtbit" "prtvtcit" "prtvtdit" "prtvtlu" "prtvtlv"
## [241] "prtvtalv" "prtvtnl" "prtvtanl" "prtvtbnl" "prtvtcnl" "prtvtdnl"
## [247] "prtvtenl" "prtvtfnl" "prtvtgnl" "prtvthnl" "prtvtno" "prtvtano"
## [253] "prtvtbno" "prtvtpl" "prtvtapl" "prtvtbpl" "prtvtcpl" "prtvtdpl"
## [259] "prtvtepl" "prtvtpt" "prtvtapt" "prtvtbpt" "prtvtcpt" "prtvtdpt"
## [265] "prtvtro" "prtvtaro" "prtvtru" "prtvtaru" "prtvtbru" "prtvtcru"
## [271] "prtvtdru" "prtvtse" "prtvtase" "prtvtbse" "prtvtcse" "prtvtdse"
## [277] "prtvtsi" "prtvtasi" "prtvtbsi" "prtvtcsi" "prtvtdsi" "prtvtesi"
## [283] "prtvtfsi" "prtvtsk" "prtvtask" "prtvtbsk" "prtvtcsk" "prtvtdsk"
## [289] "prtvtesk" "prtvttr" "prtvtatr" "prtvtua" "prtvtaua" "prtvtbua"
## [295] "prtvtcua" "prtvtxk" "prtvtrs" "prtvtars" "prtvtme" "prtvtame"
## [301] "prtclal" "prtclat" "prtclaat" "prtclcat" "prtcldat" "prtclbe"
## [307] "prtclabe" "prtclbbe" "prtclcbe" "prtcldbe" "prtclebe" "prtclbg"
## [313] "prtclabg" "prtclbbg" "prtclcbg" "prtcldbg" "prtclebg" "prtclch"
## [319] "prtclach" "prtclbch" "prtclcch" "prtcldch" "prtclech" "prtclfch"
## [325] "prtclgch" "prtclhch" "prtclsk" "prtclask" "prtclbsk" "prtclcsk"
## [331] "prtcldsk" "prtclesk" "prtclcy" "prtclacy" "prtclbcy" "prtclccy"
## [337] "prtclcz" "prtclacz" "prtclbcz" "prtclccz" "prtcldcz" "prtclecz"
## [343] "prtclde" "prtclade" "prtclbde" "prtclcde" "prtcldde" "prtclede"
## [349] "prtclfde" "prtcldk" "prtcladk" "prtclbdk" "prtclcdk" "prtclddk"
## [355] "prtclee" "prtclaee" "prtclbee" "prtclcee" "prtcldee" "prtcleee"
## [361] "prtclfee" "prtclgee" "prtclhee" "prtcles" "prtclaes" "prtclbes"
## [367] "prtclces" "prtcldes" "prtclees" "prtclfes" "prtclges" "prtclfi"
## [373] "prtclafi" "prtclbfi" "prtclcfi" "prtcldfi" "prtclefi" "prtclffi"
## [379] "prtclfr" "prtclafr" "prtclbfr" "prtclcfr" "prtcldfr" "prtclefr"
## [385] "prtclffr" "prtclgb" "prtclagb" "prtclbgb" "prtclcgb" "prtcldgb"
## [391] "prtclgr" "prtclagr" "prtclbgr" "prtclcgr" "prtcldgr" "prtclhr"
## [397] "prtclahr" "prtclbhr" "prtclhu" "prtclahu" "prtclbhu" "prtclchu"
## [403] "prtcldhu" "prtclehu" "prtclfhu" "prtclghu" "prtclhhu" "prtclie"
## [409] "prtclaie" "prtclbie" "prtclcie" "prtcldie" "prtcleie" "prtclfie"
## [415] "prtclil" "prtclail" "prtclbil" "prtclcil" "prtcldil" "prtcleil"
## [421] "prtclis" "prtclais" "prtclbis" "prtclcis" "prtcldis" "prtclit"
## [427] "prtclait" "prtclbit" "prtclcit" "prtcldit" "prtcleit" "prtcllt"
## [433] "prtclalt" "prtclblt" "prtclclt" "prtcllu" "prtcllv" "prtclalv"
## [439] "prtclnl" "prtclanl" "prtclbnl" "prtclcnl" "prtcldnl" "prtclenl"
## [445] "prtclfnl" "prtclgnl" "prtclno" "prtclano" "prtclbno" "prtclpl"
## [451] "prtclapl" "prtclbpl" "prtclcpl" "prtcldpl" "prtclepl" "prtclfpl"
## [457] "prtclgpl" "prtclhpl" "prtclipl" "prtclpt" "prtclapt" "prtclbpt"
## [463] "prtclcpt" "prtcldpt" "prtclept" "prtclfpt" "prtclro" "prtclaro"
## [469] "prtclru" "prtclaru" "prtclbru" "prtclcru" "prtcldru" "prtclse"
## [475] "prtclase" "prtclbse" "prtclcse" "prtcldse" "prtclsi" "prtclasi"
## [481] "prtclbsi" "prtclcsi" "prtcldsi" "prtclesi" "prtclfsi" "prtcltr"
## [487] "prtclatr" "prtclua" "prtclaua" "prtclbua" "prtclcua" "prtcldua"
## [493] "prtclxk" "prtclrs" "prtclars" "prtclme" "prtclame" "prtmbat"
## [499] "prtmbaat" "prtmbbe" "prtmbabe" "prtmbbbe" "prtmbcbe" "prtmbbg"
## [505] "prtmbabg" "prtmbbbg" "prtmbch" "prtmbach" "prtmbbch" "prtmbcch"
## [511] "prtmbcy" "prtmbcz" "prtmbacz" "prtmbbcz" "prtmbde" "prtmbade"
## [517] "prtmbbde" "prtmbcde" "prtmbdk" "prtmbadk" "prtmbbdk" "prtmbee"
## [523] "prtmbaee" "prtmbbee" "prtmbcee" "prtmbes" "prtmbaes" "prtmbbes"
## [529] "prtmbfi" "prtmbafi" "prtmbbfi" "prtmbfr" "prtmbafr" "prtmbbfr"
## [535] "prtmbcfr" "prtmbgb" "prtmbagb" "prtmbgr" "prtmbagr" "prtmbbgr"
## [541] "prtmbcgr" "prtmbhr" "prtmbhu" "prtmbahu" "prtmbbhu" "prtmbchu"
## [547] "prtmbie" "prtmbaie" "prtmbbie" "prtmbil" "prtmbail" "prtmbbil"
## [553] "prtmbis" "prtmbit" "prtmbait" "prtmblt" "prtmblu" "prtmblv"
## [559] "prtmbnl" "prtmbanl" "prtmbbnl" "prtmbcnl" "prtmbno" "prtmbano"
## [565] "prtmbpl" "prtmbapl" "prtmbbpl" "prtmbcpl" "prtmbdpl" "prtmbpt"
## [571] "prtmbapt" "prtmbbpt" "prtmbro" "prtmbaro" "prtmbru" "prtmbaru"
## [577] "prtmbbru" "prtmbse" "prtmbase" "prtmbsi" "prtmbasi" "prtmbbsi"
## [583] "prtmbcsi" "prtmbsk" "prtmbask" "prtmbbsk" "prtmbtr" "prtmbatr"
## [589] "prtmbua" "prtmbaua" "prtmbbua" "prtmbcua" "aesfdrk" "atchctr"
## [595] "atcherp" "blgetmg" "brghmef" "brghmwr" "brncntr" "cntbrth"
## [601] "cntbrtha" "cntbrthb" "cntbrthc" "cntbrthd" "crmvct" "crvctef"
## [607] "crvctwr" "ctzcntr" "ctzship" "ctzshipa" "ctzshipb" "ctzshipc"
## [613] "ctzshipd" "dscrage" "dscrdk" "dscrdsb" "dscretn" "dscrgnd"
## [619] "dscrgrp" "dscrlng" "dscrna" "dscrnap" "dscrntn" "dscroth"
## [625] "dscrrce" "dscrref" "dscrrlg" "dscrsex" "facntn" "facntr"
## [631] "fbrncnt" "fbrncnta" "fbrncntb" "fbrncntc" "happy" "health"
## [637] "hlthhmp" "inmdisc" "inprdsc" "livecntr" "livecnta" "lnghoma"
## [643] "lnghom1" "lnghomb" "lnghom2" "mbrncnt" "mbrncnta" "mbrncntb"
## [649] "mbrncntc" "mmbrn" "mocntn" "mocntr" "pray" "rlgatnd"
## [655] "rlgblg" "rlgblge" "rlgdgr" "rlgdnm" "rlgdnme" "sclact"
## [661] "sclmeet" "trrcnyr" "trrenyr" "trrprsn" "trrtort" "feethngr"
## [667] "vteurmmb" "vteubcmb" "vteumbgb" "rlgdnal" "rlgdnat" "rlgdnbat"
## [673] "rlgdnbe" "rlgdnch" "rlgdnach" "rlgdncy" "rlgdnacy" "rlgdnde"
## [679] "rlgdnade" "rlgdndk" "rlgdnfi" "rlgdnafi" "rlgdngb" "rlgdngr"
## [685] "rlgdnagr" "rlgdnhu" "rlgdnie" "rlgdnil" "rlgdnis" "rlgdnais"
## [691] "rlgdnlt" "rlgdnlv" "rlgdnnl" "rlgdnanl" "rlgdnno" "rlgdnpl"
## [697] "rlgdnapl" "rlgdnbpl" "rlgdnpt" "rlgdnro" "rlgdnru" "rlgdnaru"
## [703] "rlgdnse" "rlgdnase" "rlgdnsi" "rlgdnsk" "rlgdnask" "rlgdnbsk"
## [709] "rlgdnua" "rlgdnrs" "rlgdme" "rlgdeal" "rlgdeat" "rlgdebat"
## [715] "rlgdebe" "rlgdech" "rlgdeach" "rlgdecy" "rlgdeacy" "rlgdede"
## [721] "rlgdeade" "rlgdedk" "rlgdefi" "rlgdeafi" "rlgdegb" "rlgdegr"
## [727] "rlgdeagr" "rlgdehu" "rlgdeie" "rlgdeil" "rlgdeis" "rlgdeais"
## [733] "rlgdelt" "rlgdelv" "rlgdenl" "rlgdeanl" "rlgdeno" "rlgdepl"
## [739] "rlgdeapl" "rlgdebpl" "rlgdept" "rlgdero" "rlgderu" "rlgdearu"
## [745] "rlgdese" "rlgdease" "rlgdesi" "rlgdesk" "rlgdeask" "rlgdebsk"
## [751] "rlgdeua" "rlgders" "rlgdeme" "hhmmb" "gndr" "gndr2"
## [757] "gndr3" "gndr4" "gndr5" "gndr6" "gndr7" "gndr8"
## [763] "gndr9" "gndr10" "gndr11" "gndr12" "gndr13" "gndr14"
## [769] "gndr15" "gndr16" "gndr17" "gndr18" "gndr19" "gndr20"
## [775] "gndr21" "gndr22" "gndr23" "gndr24" "rship2" "rshipa2"
## [781] "rship3" "rshipa3" "rship4" "rshipa4" "rship5" "rshipa5"
## [787] "rship6" "rshipa6" "rship7" "rshipa7" "rship8" "rshipa8"
## [793] "rship9" "rshipa9" "rship10" "rshipa10" "rship11" "rshipa11"
## [799] "rship12" "rshipa12" "rship13" "rshipa13" "rship14" "rshipa14"
## [805] "rship15" "rshipa15" "rshipa16" "rshipa17" "rshipa18" "rshipa19"
## [811] "rshipa20" "rshipa21" "rshipa22" "rshipa23" "rshipa24" "yrbrn2"
## [817] "yrbrn3" "yrbrn4" "yrbrn5" "yrbrn6" "yrbrn7" "yrbrn8"
## [823] "yrbrn9" "yrbrn10" "yrbrn11" "yrbrn12" "yrbrn13" "yrbrn14"
## [829] "yrbrn15" "yrbrn16" "yrbrn17" "yrbrn18" "yrbrn19" "yrbrn20"
## [835] "yrbrn21" "yrbrn22" "yrbrn23" "yrbrn24" "age" "agea"
## [841] "ablrtr" "anctry1" "anctry2" "atncrse" "brwmny" "chldhhe"
## [847] "chldhm" "cmsrv" "cmsrvp" "crpdwk" "crpdwkp" "dngdk"
## [853] "dngdkp" "dngna" "dngnap" "dngnapp" "dngoth" "dngothp"
## [859] "dngref" "dngrefp" "domicil" "dsbld" "dsbldp" "dvrcdev"
## [865] "dvrcdeva" "edctn" "edctnp" "edufld" "edulvla" "edulvlb"
## [871] "edulvlfa" "edulvlfb" "edulvlma" "edulvlmb" "edulvlpa" "edulvlpb"
## [877] "eduyrs" "eisced" "eiscedf" "eiscedm" "eiscedp" "emplno"
## [883] "emplnof" "emplnom" "emplnop" "emplrel" "emprelp" "emprf14"
## [889] "emprm14" "estsz" "fxltph" "faalv" "hhmodwl" "hincfel"
## [895] "hincsrc" "hincsrca" "hinctnt" "hinctnta" "hswrk" "hswrkp"
## [901] "iccohbt" "icmnart" "icmsw" "icomdng" "icomdnp" "icpdwk2"
## [907] "icpdwrk" "icppdwk" "icwhct" "inttph" "ioactp" "iorgact"
## [913] "isco08" "isco08p" "iscoco" "iscocop" "jbspv" "jbspvf"
## [919] "jbspvm" "jbspvp" "lvghw" "lvghwa" "lvgoptn" "lvgptn"
## [925] "lvgptna" "lvgptne" "lvgptnea" "mainact" "marital" "maritala"
## [931] "maritalb" "marsts" "mbltph" "mbtru" "mnactic" "mnactp"
## [937] "moalv" "njbspv" "njbspvp" "occf14" "occf14a" "occf14b"
## [943] "occf14ie" "occm14" "occm14a" "occm14b" "occm14ie" "orgwrk"
## [949] "partner" "pdjobev" "pdjobyr" "pdwrk" "pdwrkp" "rmhhus"
## [955] "rshpsts" "rtdsbyr" "rtrd" "rtrdp" "tporgwk" "uemp12m"
## [961] "uemp3m" "uemp5yr" "uempla" "uemplap" "uempli" "uemplip"
## [967] "wkdcorp" "wkhtot" "wkhtotp" "wrkac6m" "wrkctr" "wrkctra"
## [973] "wrkctrhu" "wkdcorg" "wkdcorga" "nacer1" "nacer11" "nacer2"
## [979] "edagegb" "edlvat" "edlveat" "eduat1" "eduat2" "edlvbe"
## [985] "edlvabe" "edlvdbe" "edlvebe" "edlvbg" "edlvdbg" "edlvebg"
## [991] "edlvch" "edlvach" "edlvbch" "edlvcch" "edlvdch" "edlvcy"
## [997] "edlvacy" "edlvdcy" "edlvecy" "edlvgcy" "edlvcz" "edlvdcz"
## [1003] "edlvdal" "edlvde" "edlvade" "edlvdfi" "edlvdis" "edlvdk"
## [1009] "edlvadk" "edlvddk" "edlvdxk" "edlvee" "edlvaee" "edlvbee"
## [1015] "edlvdee" "edlves" "edlvaes" "edlvdes" "edlvees" "edlvges"
## [1021] "edlvhes" "edlvfr" "edlvafr" "edlvbfr" "edlvdfr" "edlvgb"
## [1027] "edlvagb" "edlvgr" "edlvagr" "edlvdgr" "edlvegr" "edlvhr"
## [1033] "edlvdhr" "edlvehr" "edlvhu" "edlvahu" "edlvbhu" "edlvdhu"
## [1039] "edlvdahu" "edlvie" "edlvaie" "edlvbie" "edlvdie" "edlvil"
## [1045] "edlvail" "eduil1" "eduail1" "edubil1" "edlvit" "edlvait"
## [1051] "edlvdit" "edlveit" "edlvlt" "edlvdlt" "edlvlu" "edlvlv"
## [1057] "edlvdlv" "edlvelv" "edlvnl" "edlvdnl" "edlvenl" "edlvno"
## [1063] "edlvano" "edlvdno" "edlveno" "edlvpl" "edlvapl" "edlvbpl"
## [1069] "edlvdpl" "edlvepl" "edlvgpl" "edlvhpl" "edlvpt" "edlvapt"
## [1075] "edlvbpt" "edlvdpt" "edlvro" "edlvru" "edlvdru" "edlvse"
## [1081] "edlvase" "edlvdse" "edlvsi" "edlvasi" "edlvdsi" "edlvesi"
## [1087] "edlvsk" "edlvask" "edlvdsk" "edlvtr" "edlvua" "edlvaua"
## [1093] "edlvdua" "edude1" "eduade1" "edubde1" "educde1" "edude2"
## [1099] "eduade2" "edubde2" "edude3" "eduade3" "edugb2" "eduagb2"
## [1105] "edubgb2" "eduil2" "eduail2" "edupl2" "eduyrpl" "edugb1"
## [1111] "eduagb1" "edubgb1" "educgb1" "edlvdrs" "edlvdme" "edagepgb"
## [1117] "edlvpat" "edlvpeat" "edlvpfat" "edlvpbe" "edlvpdbe" "edlvpebe"
## [1123] "edlvpch" "edlvpdch" "edlvpcy" "edlvpdcy" "edlvpecy" "edlvpgcy"
## [1129] "edlvpcz" "edlvpdcz" "edlvpdbg" "edlvpebg" "edlvpdfi" "edlvpdis"
## [1135] "edlvpdit" "edlvpeit" "edlvpdk" "edlvpddk" "edlvpdxk" "edlvpee"
## [1141] "edlvpdee" "edlvpes" "edlvpdes" "edlvpees" "edlvpfes" "edlvpges"
## [1147] "edlvpfr" "edlvpdfr" "edlvpgb" "edlvpgr" "edlvpdgr" "edlvpegr"
## [1153] "edlvphr" "edlvpdhr" "edlvpehr" "edlvphu" "edlvpdhu" "edlvpdahu"
## [1159] "edlvpie" "edlvpdie" "edlvpil" "edupil1" "edupail1" "edupbil1"
## [1165] "edlvplt" "edlvpdlt" "edlvplv" "edlvpdlv" "edlvpelv" "edlvpnl"
## [1171] "edlvpdnl" "edlvpenl" "edlvpno" "edlvpdno" "edlvpeno" "edlvppl"
## [1177] "edlvpdpl" "edlvpepl" "edlvpfpl" "edlvpgpl" "edlvppt" "edlvpdpt"
## [1183] "edlvpro" "edlvpru" "edlvpdru" "edlvpse" "edlvpdse" "edlvpsi"
## [1189] "edlvpdsi" "edlvpesi" "edlvpsk" "edlvpdsk" "edlvptr" "edlvpua"
## [1195] "edlvpdua" "edupde1" "edupade1" "edupbde1" "edupcde1" "edupde2"
## [1201] "edupade2" "edupbde2" "edupde3" "edupade3" "edupgb2" "edupagb2"
## [1207] "edupbgb2" "edupil2" "edupail2" "eduppl2" "eduyrppl" "edlvpdal"
## [1213] "edupgb1" "edupagb1" "edupbgb1" "edupcgb1" "edlvpdrs" "edlvpdme"
## [1219] "edlvfdal" "edlvfat" "edlvfeat" "edlvfbe" "edlvfdbe" "edlvfebe"
## [1225] "edlvfdbg" "edlvfebg" "edlvfhr" "edlvfdhr" "edlvfehr" "edlvfcy"
## [1231] "edlvfdcy" "edlvfecy" "edlvfgcy" "edlvfcz" "edlvfdcz" "edlvfdk"
## [1237] "edlvfddk" "edlvfee" "edlvfdee" "edlvfdfi" "edlvffr" "edlvfdfr"
## [1243] "edufde1" "edufade1" "edufbde1" "edufde2" "edufade2" "edufde3"
## [1249] "edufade3" "edlvfgr" "edlvfdgr" "edlvfegr" "edlvfhu" "edlvfdhu"
## [1255] "edlvfdahu" "edlvfdis" "edlvfie" "edlvfdie" "edlvfil" "edufil1"
## [1261] "edufail1" "edufbil1" "edufil2" "edufail2" "edlvfdit" "edlvfeit"
## [1267] "edlvfdxk" "edlvflv" "edlvfdlv" "edlvflt" "edlvfdlt" "edlvfnl"
## [1273] "edlvfdnl" "edlvfenl" "edlvfno" "edlvfdno" "edlvfeno" "edlvfpl"
## [1279] "edlvfdpl" "edlvfepl" "edlvffpl" "edlvfpt" "edlvfdpt" "edlvfro"
## [1285] "edlvfru" "edlvfdru" "edlvfsk" "edlvfdsk" "edlvfsi" "edlvfdsi"
## [1291] "edlvfesi" "edlvfes" "edlvfdes" "edlvfees" "edlvffes" "edlvfse"
## [1297] "edlvfdse" "edlvfch" "edlvfdch" "edlvftr" "edlvfua" "edlvfdua"
## [1303] "edlvfgb" "edufgb1" "edufagb1" "edufbgb1" "edufcgb1" "edufgb2"
## [1309] "edufagb2" "edufbgb2" "edagefgb" "edlvfdrs" "edlvfdme" "edagemgb"
## [1315] "edlvmat" "edlvmeat" "edlvmbe" "edlvmdbe" "edlvmebe" "edlvmch"
## [1321] "edlvmdch" "edlvmcy" "edlvmdcy" "edlvmecy" "edlvmgcy" "edlvmcz"
## [1327] "edlvmdcz" "edlvmdal" "edlvmdfi" "edlvmdis" "edlvmdit" "edlvmeit"
## [1333] "edlvmdk" "edlvmddk" "edlvmdxk" "edlvmee" "edlvmdee" "edlvmes"
## [1339] "edlvmdes" "edlvmees" "edlvmfes" "edlvmfr" "edlvmdfr" "edlvmgb"
## [1345] "edlvmgr" "edlvmdgr" "edlvmegr" "edlvmhr" "edlvmdhr" "edlvmehr"
## [1351] "edlvmhu" "edlvmdhu" "edlvmdahu" "edlvmie" "edlvmdie" "edlvmil"
## [1357] "edumil1" "edumail1" "edumbil1" "edlvmlt" "edlvmdlt" "edlvmlv"
## [1363] "edlvmdlv" "edlvmnl" "edlvmdnl" "edlvmenl" "edlvmno" "edlvmdno"
## [1369] "edlvmeno" "edlvmpl" "edlvmdpl" "edlvmepl" "edlvmfpl" "edlvmpt"
## [1375] "edlvmdpt" "edlvmro" "edlvmru" "edlvmdru" "edlvmse" "edlvmdse"
## [1381] "edlvmsi" "edlvmdsi" "edlvmesi" "edlvmsk" "edlvmdsk" "edlvmtr"
## [1387] "edlvmua" "edlvmdua" "edumde1" "edumade1" "edumbde1" "edumde2"
## [1393] "edumade2" "edumde3" "edumade3" "edumgb1" "edumagb1" "edumbgb1"
## [1399] "edumcgb1" "edumgb2" "edumagb2" "edumbgb2" "edumil2" "edumail2"
## [1405] "edlvmdbg" "edlvmebg" "edlvmdrs" "edlvmdme" "marstfi" "marstgb"
## [1411] "marstie" "martlfr" "rshpsfi" "rshpsgb" "impdiff" "impenv"
## [1417] "impfree" "impfun" "imprich" "impsafe" "imptrad" "ipadvnt"
## [1423] "ipbhprp" "ipcrtiv" "ipeqopt" "ipfrule" "ipgdtim" "iphlppl"
## [1429] "iplylfr" "ipmodst" "iprspot" "ipshabt" "ipstrgv" "ipsuces"
## [1435] "ipudrst" "regionat" "regionbe" "regionbg" "regionch" "regioach"
## [1441] "regioncy" "regioncz" "regioacz" "regionde" "regiondk" "regioadk"
## [1447] "regionee" "regiones" "regioaes" "regionfi" "regioafi" "regionfr"
## [1453] "regiongb" "regiongr" "regioagr" "regionhr" "regionhu" "regionie"
## [1459] "regioaie" "regiobie" "regionil" "regionis" "regionit" "regionlt"
## [1465] "regionlu" "regionlv" "regionnl" "regionno" "regionpl" "regionpt"
## [1471] "regioapt" "regionro" "regionru" "regionse" "regionsi" "regionsk"
## [1477] "regiontr" "regionua" "regunit" "inwtm" "inwshh" "inwsmm"
## [1483] "inwyys" "inwdd" "inwdds" "inwmm" "inwmms" "inwyr"
## [1489] "inwyye" "inwds" "inwehh" "inwemm" "inwdde" "inwmme"
## [1495] "inwde" "spltadm" "spltadma" "spltadmb" "spltadmc" "spltadmd"
## [1501] "spltadme" "spltadmf" "supqad1" "supqadm" "supqad2" "supqdd"
## [1507] "supqmm" "supqyr" "intewde" "mode" "actvgrs" "agertr"
## [1513] "bseftwk" "bsmw" "chdohwk" "cld12hh" "cldcrmr" "cldcrot"
## [1519] "cldnhh" "cldnhhd" "cldnhhg" "cldnhhn" "clfncrc" "clfncsp"
## [1525] "clhwkrc" "clhwksp" "clmrlx" "clnhhbo" "clnhhby" "clnhhyb"
## [1531] "crspce" "cuthheq" "dfcnswk" "dfcnswka" "dsdclve" "dsgrhwk"
## [1537] "dsgrmny" "dsgrmnya" "dsgrpwk" "edul12m" "edupdem" "emplrjb"
## [1543] "flthmcc" "fmpvtst" "frshrst" "frsptjb" "fstjbyr" "fthcncr"
## [1549] "gdsprt" "grspay" "grspaya" "gvprppv" "gwdvhwk" "gwhhprc"
## [1555] "hlpcowk" "hlthrwk" "hmeqphw" "hwkmono" "hwkpwd1" "hwkpwd2"
## [1561] "hwkpwdp" "hwkpwe1" "hwkpwe2" "hwkpwep" "hwkstrs" "hwktwd1"
## [1567] "hwktwd2" "hwktwe1" "hwktwe2" "hwwkhs" "icag45y" "icago45"
## [1573] "icagu70" "icagu70a" "icchld" "iccldnh" "icempl" "icemplr"
## [1579] "icgndr" "ichwk1" "ichwk2" "icmnac" "icmnact" "icnopfm"
## [1585] "icnopfma" "icpart1" "icpart2" "icpart3" "icptn" "icptnwk"
## [1591] "icptnwka" "indisdc" "ipjbhin" "ipjbini" "ipjbprm" "ipjbscr"
## [1597] "ipjbtro" "ipjbwfm" "jbcoedu" "jbedyrs" "jblrn" "jbrqlrn"
## [1603] "jbscr" "jbtmppm" "jbtsktm" "lfintr" "linwk3y" "lkafohh"
## [1609] "lscjb3y" "lsintjb" "mlohinc" "mnrsefw" "mnrsphm" "nbsrsp"
## [1615] "netpay" "nevdnjb" "npemp3y" "oprtad" "orgfd3y" "payprd"
## [1621] "payprda" "pdjbndm" "phwwkhs" "plnchld" "pphincr" "ppwwkp"
## [1627] "prmpls" "prntghr" "prrfmly" "pthcncr" "ptmhmcc" "ptnwkwe"
## [1633] "puemp3y" "pwkhsch" "quclss" "rdpay3y" "rpljbde" "rsnlvem"
## [1639] "rtryr" "scrsefw" "smblvjb" "stdask" "stdhrsw" "stdlvl"
## [1645] "stdmcdo" "stdtruf" "stpvtfm" "tchints" "tchlcrt" "tchlp"
## [1651] "tchtruf" "tmtowrk" "tngdohm" "trndnjb" "truinwk" "uemp3y"
## [1657] "updhlrl" "updhlrp" "useknwl" "vrtywrk" "wgdpeft" "wkdcpce"
## [1663] "wkengtp" "wkhsch" "wkjbndm" "wkovrtm" "wkovtmp" "wkshr3y"
## [1669] "wmcpwrk" "wntrtr" "wpmwkcp" "wrkengt" "wrkhrd" "wrkspv"
## [1675] "wrkwe" "yrcremp" "yrlvptn" "yrskdwk" "yrspdwk" "yrspdwka"
## [1681] "absddng" "accdng" "atnoact" "chlrnnw" "dclvlf" "deaimpp"
## [1687] "dngval" "enjstm" "enrglot" "flapppl" "flclpla" "flrms"
## [1693] "fltanx" "fltbrd" "fltpcfl" "fltrstm" "flttrd" "fmlenj"
## [1699] "fmlstrs" "fstwttv" "hlpoth" "hlprtrn" "inccmp" "inccmpw"
## [1705] "jbintr" "jbstrs" "lchshcp" "lfcllk" "lfwrs" "lotsgot"
## [1711] "lrnnew" "lrnntlf" "nhpftr" "optftr" "pactlot" "pdwrkcr"
## [1717] "physact" "plinsoc" "plprftr" "pplahlp" "ppllfcr" "prhlppl"
## [1723] "pstvms" "rcndsrv" "rehlppl" "sedirlf" "stfjb" "stflfsf"
## [1729] "stfsdlv" "tmabdng" "tmdotwa" "tmendng" "tmimdng" "tnapsur"
## [1735] "trtrsp" "trtunf" "uempnyr" "wkvlorg" "wrbknrm" "acetalv"
## [1741] "admaimg" "algyplv" "aljewlv" "allbpe" "allbpne" "almuslv"
## [1747] "alpfpe" "alpfpne" "alwspsc" "blncmig" "comnlng" "cpimpop"
## [1753] "ctbfsmv" "dfegcf" "dfegcon" "dfeghbg" "eimgrpc" "eimpcnt"
## [1759] "eimrcnt" "fclcntr" "gvrfgap" "gvtrimg" "icbrnct" "idetalv"
## [1765] "imacrlv" "imbghct" "imbleco" "imdetbs" "imdetmr" "imfljob"
## [1771] "imgclg" "imgetn" "imgfrnd" "imgrpc" "imhecop" "imrcntr"
## [1777] "imrsprc" "imscrlv" "imsetbs" "imsetmr" "imsmrgt" "imtcjob"
## [1783] "imunplv" "imwbcrm" "imwgdwn" "lwdscwp" "lwpeth" "noimbro"
## [1789] "pplstrd" "qfimchr" "qfimcmt" "qfimedu" "qfimfml" "qfimlng"
## [1795] "qfimwht" "qfimwlt" "qfimwsk" "rfgawrk" "rfgbfml" "rfgdtcn"
## [1801] "rfgfrpc" "rfggvfn" "rlgueim" "shrrfg" "smctmbe" "smegbhw"
## [1807] "smegbli" "stimrdt" "vrtrlg" "cltodm" "cltofrd" "cltommb"
## [1813] "cltona" "cltonn" "cltoptp" "cltoref" "cltovw" "cnsodm"
## [1819] "cnsofrd" "cnsommb" "cnsona" "cnsonn" "cnsoptp" "cnsoref"
## [1825] "cnsovw" "discpol" "empl" "epaodm" "epaofrd" "epaommb"
## [1831] "epaona" "epaonn" "epaoptp" "epaoref" "epaovw" "hlpppl"
## [1837] "hmnodm" "hmnofrd" "hmnommb" "hmnona" "hmnonn" "hmnoptp"
## [1843] "hmnoref" "hmnovw" "impapol" "impavo" "impfml" "impfrds"
## [1849] "implsrt" "impoblw" "impopin" "imppol" "imprlg" "imprwcr"
## [1855] "imprwct" "imprwkc" "impsppl" "impvo" "impvote" "impwrk"
## [1861] "othvdm" "othvfrd" "othvmmb" "othvna" "othvnn" "othvptp"
## [1867] "othvref" "othvvw" "prfodm" "prfofrd" "prfommb" "prfona"
## [1873] "prfonn" "prfoptp" "prforef" "prfovw" "prtydm" "prtyfrd"
## [1879] "prtymmb" "prtyna" "prtynn" "prtyptp" "prtyref" "prtyvw"
## [1885] "rlgodm" "rlgofrd" "rlgommb" "rlgona" "rlgonn" "rlgoptp"
## [1891] "rlgoref" "rlgovw" "sclcdm" "sclcfrd" "sclcmmb" "sclcna"
## [1897] "sclcnn" "sclcptp" "sclcref" "sclcvw" "setodm" "setofrd"
## [1903] "setommb" "setona" "setonn" "setoptp" "setoref" "setovw"
## [1909] "sptcdm" "sptcfrd" "sptcmmb" "sptcna" "sptcnn" "sptcptp"
## [1915] "sptcref" "sptcvw" "stfhwkp" "strtbsn" "trudm" "trufrd"
## [1921] "truiwkp" "trummb" "truna" "trunn" "truptp" "truref"
## [1927] "trusay" "truvw" "truwrkp" "wkchtsk" "wkdcsin" "wkenvin"
## [1933] "wrkflex" "yrlvdae" "advbach" "advhach" "advslep" "advsthr"
## [1939] "chsrgp" "dcadmms" "dcdfcwr" "dcdisc" "dckptrt" "dctreql"
## [1945] "ddprsmd" "dsplvpr" "follwdc" "hltherb" "illcure" "mdhair"
## [1951] "mdhappy" "mdlswgt" "mdmemo" "mdsdeff" "mdsexlf" "pplcure"
## [1957] "pprlydc" "prcbach" "prchach" "prcslep" "prcsthr" "prfmddc"
## [1963] "prfsmdc" "psmdcpr" "ptnrlcq" "tmcnsdc" "usmdprs" "usmprse"
## [1969] "bnkfldl" "bsnprft" "cmprcti" "ctzchtx" "ctzhlpo" "flgvbnf"
## [1975] "flinsr" "flinsrw" "fodcncl" "frdbnft" "frmwktg" "icsbfm"
## [1981] "ignrlaw" "kptchng" "mnyacth" "musdocm" "olwmsop" "payavtx"
## [1987] "pboafvr" "pbofvr" "pbofvrw" "pyavtxw" "rprochg" "scbevts"
## [1993] "scndhfl" "slcnflw" "slcnsfl" "tstfnch" "tstpboh" "tstrprh"
## [1999] "wrytrdh" "acldnmr" "adftjob" "adllvhm" "adlvptn" "adpnt"
## [2005] "advcyc" "aftjbyc" "ageadlt" "agemage" "ageoage" "alvgptn"
## [2011] "anvcld" "brnmm" "bthcld" "evlvptn" "evmar" "evpdemp"
## [2017] "fcldbrn" "ggchld" "iaglptn" "iaglvmr" "iagpnt" "iagrtr"
## [2023] "lvpntyr" "lvptnyr" "maryr" "nbthcld" "ngchld" "oldfrl"
## [2029] "oldgpnt" "oldhlpo" "pdempyr" "plnftr" "rcldnmr" "rdvcyc"
## [2035] "rftjbyc" "rlvgptn" "rnvcld" "rpntyng" "rspslvo" "rwkold"
## [2041] "svclvo" "tochld" "tolvpnt" "towkht" "tygledu" "tyglvmr"
## [2047] "tyglvp" "tygpnt" "tygrtr" "tygsexi" "wrinco" "ycldbyr"
## [2053] "ygcdbyr" "admub" "basinc" "bennent" "bnlwinc" "brnocnt"
## [2059] "cldcrsv" "dcndleq" "dfincac" "ditxssp" "earnpen" "earnueb"
## [2065] "eduunmp" "eudcnbf" "eusclbf" "gvcldcr" "gvhlthc" "gvjbevn"
## [2071] "gvpdlwk" "gvslvol" "gvslvue" "hlthcef" "imrccon" "imsclbn"
## [2077] "insfben" "lbenent" "lklpwcf" "lknemny" "lknhlcn" "lkuemp"
## [2083] "lvoapen" "lvpbhlt" "nmnybsc" "prtsick" "sbbsntx" "sbcwkfm"
## [2089] "sbenccm" "sbeqsoc" "sblazy" "sblwcoa" "sblwlka" "sbprvpv"
## [2095] "sbstrec" "schtaut" "sickdsb" "slvpens" "slvuemp" "smdfslv"
## [2101] "txadleq" "txautef" "txearn" "ub20edu" "ub20pay" "ub20unp"
## [2107] "ub50edu" "ub50pay" "ub50unp" "ubedu" "ubpay" "ubspedu"
## [2113] "ubsppay" "ubspunp" "ubunp" "uemplwk" "uentrjb" "wrkprbf"
## [2119] "yngfnjb" "acq30bs" "acq70bs" "agdcold" "agdcyng" "agegrbl"
## [2125] "ageyo30" "agrpblg" "buproag" "chg1530" "dprschg" "dprsf70"
## [2131] "dprso70" "dprsy30" "frndo70" "frndy30" "lkrspag" "mbfmo70"
## [2137] "oafl20" "oafl70" "p20cnec" "p20cust" "p70cnec" "p70cust"
## [2143] "p70hltb" "predage" "predetn" "predsex" "pvolwrk" "sgr2070"
## [2149] "srdscag" "stsp20" "stsp40" "stsp70" "suproag" "trtbdag"
## [2155] "twcol20" "twcol70" "v20adm" "v20cntm" "v20comp" "v20envy"
## [2161] "v20frnd" "v20mrst" "v20pity" "v20resp" "v70adm" "v70cntm"
## [2167] "v70comp" "v70envy" "v70frnd" "v70mrst" "v70pity" "v70resp"
## [2173] "wr20crm" "wr20emp" "bplcdc" "bstln5y" "bystlct" "bystlwr"
## [2179] "caplcst" "ctfrdc" "ctinplt" "ctjbcnt" "ctmtgfr" "ctprpwr"
## [2185] "dbctvrd" "doplcsy" "dpcstrb" "flsin5y" "gsupplc" "insclct"
## [2191] "insclwr" "jdgcbrb" "lwstrob" "plcarcr" "plccbrb" "plccbrg"
## [2197] "plccont" "plcexdc" "plcfrdc" "plciplt" "plcipvl" "plcjbcn"
## [2203] "plcpvcr" "plcrgwr" "plcrspc" "plcstf" "plcvcrc" "plcvcrp"
## [2209] "rgbrklw" "stcbg2t" "tmprs" "trfoct" "trfowr" "troff5y"
## [2215] "wevdct" "widprsn" "wraccrc" "wraccrp" "chpldm" "chpldmc"
## [2221] "chpldmi" "ctstogv" "cttresa" "cttresac" "dfprtal" "dfprtalc"
## [2227] "dspplvt" "dspplvtc" "fairelc" "fairelcc" "fplvdm" "fplvdmc"
## [2233] "fplvdmi" "gptpelc" "gptpelcc" "grdfinc" "grdfincc" "gvcodmc"
## [2239] "gvcodmi" "gvctzpv" "gvctzpvc" "gvexpdc" "gvexpdcc" "gvspcdm"
## [2245] "gvspdmc" "gvspdmi" "imvtctz" "medcrgv" "medcrgvc" "meprinf"
## [2251] "meprinfc" "oppcrgv" "oppcrgvc" "pltavie" "pltaviec" "pplvdmc"
## [2257] "pplvdmi" "rghmgpr" "rghmgprc" "stpldmc" "stpldmi" "votedir"
## [2263] "votedirc" "viepol" "wpestop" "keydec" "viepolc" "wpestopc"
## [2269] "keydecc" "admit" "showcv" "accalaw" "impdema" "impdemb"
## [2275] "impdemc" "impdemd" "impdeme" "alcbnge" "alcfreq" "alcwkdy"
## [2281] "alcwknd" "anypacc" "cgtsday" "cgtsmke" "cnfpplh" "dosprt"
## [2287] "dshltdk" "dshltgp" "dshltms" "dshltna" "dshltnt" "dshltref"
## [2293] "eatveg" "etfruit" "fnsdfml" "height" "hlpfmhr" "hlpfmly"
## [2299] "hltphal" "hltphbn" "hltphbp" "hltphdi" "hltphdk" "hltphhb"
## [2305] "hltphhc" "hltphna" "hltphnap" "hltphnt" "hltphpa" "hltphpf"
## [2311] "hltphref" "hltphsc" "hltphsd" "hltphsh" "hltpral" "hltprbn"
## [2317] "hltprbp" "hltprca" "hltprdi" "hltprdk" "hltprhb" "hltprhc"
## [2323] "hltprna" "hltprnt" "hltprpa" "hltprpf" "hltprref" "hltprsc"
## [2329] "hltprsd" "hltprsh" "jbexebs" "jbexecp" "jbexedk" "jbexena"
## [2335] "jbexenap" "jbexent" "jbexera" "jbexeref" "jbexevc" "jbexevh"
## [2341] "jbexevl" "jbexpdk" "jbexpmc" "jbexpml" "jbexpna" "jbexpnap"
## [2347] "jbexpnt" "jbexpref" "jbexpti" "jbexpvi" "medtrdk" "medtrna"
## [2353] "medtrnap" "medtrnl" "medtrnp" "medtrnt" "medtrnu" "medtrnaa"
## [2359] "medtroc" "medtroth" "medtrref" "medtrun" "medtrwl" "trhltacp"
## [2365] "trhltacu" "trhltch" "trhltcm" "trhltdk" "trhltho" "trhltht"
## [2371] "trhlthy" "trhltmt" "trhltna" "trhltnt" "trhltos" "trhltpt"
## [2377] "trhltre" "trhltref" "trhltsh" "weight" "icgndra" "banhhap"
## [2383] "ccgdbd" "cflsenr" "clmchng" "clmthgt1" "clmthgt2" "elgbio"
## [2389] "elgcoal" "elghydr" "elgngas" "elgnuc" "elgsun" "elgwind"
## [2395] "eneffap" "gvsrdcc" "inctxff" "lklmten" "lkredcc" "ownrdcc"
## [2401] "rdcenr" "sbsrnen" "wrdpfos" "wrdpimp" "wrenexp" "wrinspw"
## [2407] "wrntdis" "wrpwrct" "wrtcfl" "wrtratc" "btminfr" "evfredu"
## [2413] "evfrjob" "frlgrsp" "frlneti" "frprtpl" "fvgabc" "grspfr"
## [2419] "grsplet" "grspnum" "gvintcz" "ifredu" "ifrjob" "infqbst"
## [2425] "jstprev" "netifr" "netilet" "netinum" "occinfr" "pcmpinj"
## [2431] "poltran" "ppldsrv" "recexp" "recgndr" "recimg" "recknow"
## [2437] "recskil" "sofrdst" "sofrpr" "sofrprv" "sofrwrk" "topinfr"
## [2443] "wltdffr" "iincsrc" "acchome" "accwrk" "accmove" "accoth"
## [2449] "accnone" "accref" "accdk" "accna" "fampref" "famadvs"
## [2455] "fampdf" "mcclose" "mcinter" "mccoord" "mcpriv" "mcmsinf"
## [2461] "chldo12" "gndro12a" "gndro12b" "ageo12" "hhlio12" "closeo12"
## [2467] "ttmino12" "speako12" "como12" "scrno12" "phoneo12" "livpnt"
## [2473] "pntmofa" "agepnt" "hhlipnt" "closepnt" "ttminpnt" "speakpnt"
## [2479] "compnt" "scrnpnt" "phonepnt" "wrkhome" "wrklong" "wrkresp"
## [2485] "scrhlm" "sclmsup" "mansupp" "manhlp" "manwrkpl" "manspeak"
## [2491] "mancom" "manscrn" "manphone" "teamfeel" "wrkextra" "colprop"
## [2497] "colhlp" "colspeak" "colcom" "colscrn" "colphone" "mcwrkhom"
## [2503] "c19spo12" "c19mco12" "c19sppnt" "c19mcpnt" "c19whome" "c19wplch"
## [2509] "c19whacc" "c19spwrk" "c19mcwrk" "secgrdec" "scidecpb" "admc19"
## [2515] "panpriph" "panmonpb" "govpriph" "govmonpb" "panfolru" "panclobo"
## [2521] "panresmo" "gvhanc19" "gvjobc19" "gveldc19" "gvfamc19" "hscopc19"
## [2527] "gvbalc19" "gvimpc19" "gvconc19" "respc19" "reshhc19" "hapljc19"
## [2533] "hapirc19" "hapwrc19" "hapfuc19" "hapfoc19" "hapnoc19" "hapnwc19"
## [2539] "hapnpc19" "haprec19" "hapdkc19" "hapnac19" "icvacc19" "getavc19"
## [2545] "getnvc19" "vdcond" "vdovexre" "vdtype" "vdtpsvre" "vdtpitre"
## [2551] "vdtpscre" "vdtpaure" "vdtpvire" "vdtpoire" "vdtpntre" "vdtpapre"
## [2557] "vdtprere" "vdtpdkre" "vdtpnare" "cldgng" "enjlf" "fltdpr"
## [2563] "flteeff" "fltlnl" "fltlnla" "fltsd" "hrshsnt" "hrshsnta"
## [2569] "mnrgtjb" "pdaprp" "pdaprpa" "slprl" "smbtjob" "smbtjoba"
## [2575] "stfjbot" "wrhpp" "stfmjob" "wrywprb" "trdawrk" "jbprtfp"
## [2581] "pfmfdjb" "pfmfdjba" "dcsfwrk" "dcsfwrka" "implvdm" "ccrdprs"
## [2587] "ccnthum" "wrclmch" "yrbrn" "wkhct" "region" "admdw"
## [2593] "admge" "iagmr" "tygmr" "domain" "trstsci" "prtvtmk"
## [2599] "prtclmk" "rlgdnmk" "admrclc" "testic34" "testic35" "testic36"
## [2605] "testic37" "testic38" "testic39" "testic40" "testic41" "testic42"
## [2611] "rshpsmk" "marstmk" "edlvdmk" "edlvpdmk" "edlvfdmk" "edlvmdmk"
## [2617] "testii1" "testii2" "testii3" "testii4" "testii5" "testii6"
## [2623] "testii7" "testii8" "testii9" "ainws" "ainwe" "binwe"
## [2629] "cinwe" "dinwe" "finwe" "ginwe" "hinwe" "iinwe"
## [2635] "kinwe" "vinwe" "jinws" "jinwe" "scrlgblg" "scchpldm"
## [2641] "scwflt" "scrwiat" "sctmfeel" "scrwwc" "scclprp" "scwsds"
## [2647] "scwass" "scwa5se" "scwa11se" "scwa59se" "scwa89se" "scwb30se"
## [2653] "scwc55se" "scwd62se" "scwd78se" "scwrecse" "scwtype" "uagent"
## [2659] "smplresp" "questcmp" "intagea" "intgndr" "intnum" "intlnga"
## [2665] "rlgdemk" "trust" "populist"
# Load the broom package
library(broom)
## Registered S3 methods overwritten by 'broom':
## method from
## tidy.glht jtools
## tidy.summary.glht jtools
# Run the linear regression model
model_sweden <- lm(populist ~ stfedu, data = sweden_data)
# Convert the model object to tidy format
tidy_model_sweden <- tidy(model_sweden)
# Print the intercept and coefficients
print(tidy_model_sweden)
## # A tibble: 2 × 5
## term estimate std.error statistic p.value
## <chr> <dbl> <dbl> <dbl> <dbl>
## 1 (Intercept) 49.2 0.181 272. 0
## 2 stfedu 0.00419 0.0118 0.355 0.723
# Recode education as binary variable
sweden_data <- sweden_data %>%
mutate(
educ.ba = case_when(
# Conditions for BA or more education
edulvla == 5 | edulvlb > 600 ~ "BA or more",
TRUE ~ "No BA"
)
)
# Run linear regression
sweden_model <- lm(populist ~ educ.ba, data = sweden_data)
# Print intercept and coefficients
coefficients_sweden <- coef(sweden_model)
print(coefficients_sweden)
## (Intercept) educ.baNo BA
## 43.490559 7.868121
# Tidy model table displaying p-value
tidy(sweden_model) |>
knitr::kable(digits = 3)
| term | estimate | std.error | statistic | p.value |
|---|---|---|---|---|
| (Intercept) | 43.491 | 0.299 | 145.376 | 0 |
| educ.baNo BA | 7.868 | 0.350 | 22.494 | 0 |
Intercept (e.g., 62.5): This figure indicates the mean score for Sweden’s reference category (“No BA” education level) on the populist scale. The average populist scale score for those who report having “No BA” education level is 62.5.
Coefficient (e.g., BA or more: -5.8): According to the negative coefficient linked to “BA or more” education level, people with this education level typically score 5.8 points lower on the populist scale than people with “No BA” education level. Given that the difference is statistically significant (p < 0.001), it appears that populist views are less common among those with higher levels of education.
#Task 3 Now using the Italian dataset and the authoritarian values scale (as we did in the tutorial), graph the average by survey year. Interpret.
italy_data <- read.fst("italy_data.fst")
df <- read.fst("italy_data.fst")
## Creates an authoritarian values scale based on human modules items (can also do libertarian value scale)
df <- df %>%
mutate(behave = ipbhprp,
secure = impsafe,
safety = ipstrgv,
tradition = imptrad,
rules = ipfrule) %>%
mutate(across(c("behave", "secure", "safety", "tradition", "rules"),
~ na_if(.x, 7) %>% na_if(8) %>% na_if(9))) %>%
# Apply the reverse coding
mutate(across(c("behave", "secure", "safety", "tradition", "rules"), ~ 7 - .x ))
# Now you can calculate 'schwartzauth' after the NA recoding
df$auth <- scales::rescale(df$behave +
df$secure +
df$safety +
df$tradition +
df$rules, to=c(0,100), na.rm=TRUE)
df <- df %>% filter(!is.na(auth))
table(df$secure)
##
## 1 2 3 4 5 6
## 54 139 626 1856 2876 2881
library(ggplot2)
# Plotting the frequency table of the 'secure' variable
ggplot(df, aes(x = factor(secure))) +
geom_bar(fill = "blue") +
labs(title = "Frequency of Secure Variable",
x = "Secure Variable",
y = "Frequency")
The graph displays the average authoritarian values in Italy over the course of the survey years. Authoritarian values seem to be gradually declining over time.
#Task 4 Now run a linear regression model, using the modelsummary package, with authoritarian values as the outcome, and generations as the predictor/potential explanatory variable, and using the Italian data again. Rename the coefficients using the coef_rename function. Interpret the coefficients, whether they are statistically significant, and the adjusted R-squared.
model_data <- df %>%
mutate(
# Recoding gender
gndr = case_when(
gndr == 1 ~ "Male",
gndr == 2 ~ "Female",
gndr == 9 ~ NA_character_,
TRUE ~ as.character(gndr)
),
# Recoding education
educ.ba = case_when(
essround < 5 & edulvla == 5 ~ "BA or more",
essround >= 5 & edulvlb > 600 ~ "BA or more",
TRUE ~ "No BA"
),
# Handle NAs for education levels
edulvla = ifelse(edulvla %in% c(77, 88, 99), NA_integer_, edulvla),
edulvlb = ifelse(edulvlb %in% c(5555, 7777, 8888), NA_integer_, edulvlb),
# Explicitly making 'No BA' the reference category
educ.ba = factor(educ.ba, levels = c("No BA", "BA or more")),
# Recoding age, setting 999 to NA
age = ifelse(agea == 999, NA, agea),
# Recoding cohort variable, setting years before 1930 and after 2000 to NA
cohort = ifelse(yrbrn < 1930 | yrbrn > 2000, NA, yrbrn),
# Recoding generational cohorts based on year of birth
gen = case_when(
yrbrn %in% 1900:1945 ~ "1",
yrbrn %in% 1946:1964 ~ "2",
yrbrn %in% 1965:1979 ~ "3",
yrbrn %in% 1980:1996 ~ "4",
TRUE ~ as.character(cohort) # Keeping other values as character if they do not fit the ranges
),
# Converting cohort to a factor with labels
gen = factor(gen,
levels = c("1", "2", "3", "4"),
labels = c("Interwar", "Baby Boomers", "Gen X", "Millennials"))
)
table(model_data$gen)
##
## Interwar Baby Boomers Gen X Millennials
## 1026 2580 2214 1811
The offered regression models examine the connection between a dependent variable and multiple independent variables (Millennials, Gen X, Baby Boomers, Males, and BA or More). With all other variables held constant, each model displays coefficients that show how the dependent variable changes when each independent variable is increased by one unit. Three factors are linked to a lower predicted value of the dependent variable in all three models: being male, belonging to younger generations (Gen X and Millennials), and having a higher education level (BA or More). Additionally, compared to younger generations, being a Baby Boomer is associated with a smaller decrease in the predicted value. In all models, these effects are statistically significant, though to differing degrees.
#Task 5
Now visualize, using the modelplot() function from the modelsummary package, coefficient estimates and 95% confidence intervals for the following three models:
Model 1 = populist attitudes scale as the outcome; left/right as the single predictor (omitting moderates as we did in the tutorial), and using data for Greece.
Model 2 = populist attitudes scale as the outcome; gender as the single predictor, and using data for Greece.
Model 3 = populist attitudes scale as the outcome; generations as the single predictor (using the four generational category recode we did in the tutorial), and using data for Greece. Interpret.
# Load necessary libraries
library(tidyverse)
library(modelsummary)
greece_data <- read.fst("greece_data.fst")
# Create the populist scale based on trust variables
greece_data <- greece_data %>%
mutate(
# Setting values greater than 10 to NA
trstplt = ifelse(trstplt > 10, NA, trstplt),
trstprl = ifelse(trstprl > 10, NA, trstprl),
trstprt = ifelse(trstprt > 10, NA, trstprt),
# Creating and rescaling the trust variable
trust = scales::rescale(trstplt + trstprl + trstprt, na.rm = TRUE, to = c(0, 100)),
# Creating the populist scale by flipping trust values
populist = scales::rescale(trust, na.rm = TRUE, to = c(100, 0))
)
# Check the distribution of the populist scale
ggplot(greece_data, aes(x = populist)) +
geom_histogram(bins = 30, fill = "blue", color = "black") +
theme_minimal() +
labs(title = "Distribution of Populist Scale for Greece",
x = "Populist Scale",
y = "Count")
## Warning: Removed 2735 rows containing non-finite values (`stat_bin()`).
# Recode gender variable
greece_data <- greece_data %>%
mutate(
gndr = case_when(
gndr == 1 ~ "Male",
gndr == 2 ~ "Female",
TRUE ~ NA_character_
)
)
# Recode generation variable based on birth year
greece_data <- greece_data %>%
mutate(
gen = case_when(
yrbrn >= 1928 & yrbrn <= 1945 ~ "Interwar",
yrbrn >= 1946 & yrbrn <= 1964 ~ "Baby Boomers",
yrbrn >= 1965 & yrbrn <= 1979 ~ "Gen X",
yrbrn >= 1980 & yrbrn <= 1996 ~ "Millennials",
TRUE ~ NA_character_
)
)
# Model 1: Populist attitudes scale as the outcome; left/right as the single predictor
model1 <- lm(populist ~ lrscale, data = greece_data)
# Model 2: Populist attitudes scale as the outcome; gender as the single predictor
model2 <- lm(populist ~ gndr, data = greece_data)
# Model 3: Populist attitudes scale as the outcome; generations as the single predictor
model3 <- lm(populist ~ gen, data = greece_data)
# Display model summaries
modelsummary(
list(model1, model2, model3),
fmt = 1,
estimate = "{estimate} ({std.error}){stars}",
statistic = NULL,
coef_omit = "Intercept",
title = "Model Summaries for Populist Attitudes in Greece"
)
| (1) | (2) | (3) | |
|---|---|---|---|
| lrscale | 0.1 (0.0)*** | ||
| gndrMale | −1.0 (0.5)* | ||
| genGen X | 2.0 (0.6)*** | ||
| genInterwar | −3.0 (0.7)*** | ||
| genMillennials | 2.2 (0.6)*** | ||
| Num.Obs. | 9823 | 9823 | 9318 |
| R2 | 0.021 | 0.000 | 0.007 |
| R2 Adj. | 0.021 | 0.000 | 0.007 |
| AIC | 88667.6 | 88873.2 | 84240.5 |
| BIC | 88689.2 | 88894.8 | 84276.2 |
| Log.Lik. | −44330.802 | −44433.590 | −42115.231 |
| RMSE | 22.07 | 22.30 | 22.22 |
# Visualize coefficients using modelplot
modelplot(list(model1, model2, model3), coef_omit = "Interc")