#Loading required packages
packages <- c(
"tidyverse",
"sjPlot",
"broom",
"modelsummary",
"gt",
"knitr",
"scales",
"kableExtra",
"flextable",
"car",
"fst"
)
#Install and load packages if needed
new_packages <- packages[!(packages %in% installed.packages()[,"Package"])]
if(length(new_packages)) install.packages(new_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.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ 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
## Warning: package 'sjPlot' was built under R version 4.4.3
## Learn more about sjPlot with 'browseVignettes("sjPlot")'.
## `modelsummary` 2.0.0 now uses `tinytable` as its default table-drawing
## backend. Learn more at: https://vincentarelbundock.github.io/tinytable/
##
## Revert to `kableExtra` for one session:
##
## options(modelsummary_factory_default = 'kableExtra')
## options(modelsummary_factory_latex = 'kableExtra')
## options(modelsummary_factory_html = 'kableExtra')
##
## Silence this message forever:
##
## config_modelsummary(startup_message = FALSE)
##
## Attaching package: 'scales'
##
## The following object is masked from 'package:purrr':
##
## discard
##
## The following object is masked from 'package:readr':
##
## col_factor
##
##
## Attaching package: 'kableExtra'
##
## The following object is masked from 'package:dplyr':
##
## group_rows
## Warning: package 'flextable' was built under R version 4.4.3
##
## Attaching package: 'flextable'
##
## The following objects are masked from 'package:kableExtra':
##
## as_image, footnote
##
## The following object is masked from 'package:purrr':
##
## compose
## Warning: package 'car' was built under R version 4.4.3
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.4.3
##
## Attaching package: 'car'
##
## The following object is masked from 'package:dplyr':
##
## recode
##
## The following object is masked from 'package:purrr':
##
## some
## [[1]]
## [1] "lubridate" "forcats" "stringr" "dplyr" "purrr" "readr"
## [7] "tidyr" "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [13] "grDevices" "utils" "datasets" "methods" "base"
##
## [[2]]
## [1] "sjPlot" "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [7] "readr" "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [13] "graphics" "grDevices" "utils" "datasets" "methods" "base"
##
## [[3]]
## [1] "broom" "sjPlot" "lubridate" "forcats" "stringr" "dplyr"
## [7] "purrr" "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [13] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
## [19] "base"
##
## [[4]]
## [1] "modelsummary" "broom" "sjPlot" "lubridate" "forcats"
## [6] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [11] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [16] "grDevices" "utils" "datasets" "methods" "base"
##
## [[5]]
## [1] "gt" "modelsummary" "broom" "sjPlot" "lubridate"
## [6] "forcats" "stringr" "dplyr" "purrr" "readr"
## [11] "tidyr" "tibble" "ggplot2" "tidyverse" "stats"
## [16] "graphics" "grDevices" "utils" "datasets" "methods"
## [21] "base"
##
## [[6]]
## [1] "knitr" "gt" "modelsummary" "broom" "sjPlot"
## [6] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [11] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [16] "stats" "graphics" "grDevices" "utils" "datasets"
## [21] "methods" "base"
##
## [[7]]
## [1] "scales" "knitr" "gt" "modelsummary" "broom"
## [6] "sjPlot" "lubridate" "forcats" "stringr" "dplyr"
## [11] "purrr" "readr" "tidyr" "tibble" "ggplot2"
## [16] "tidyverse" "stats" "graphics" "grDevices" "utils"
## [21] "datasets" "methods" "base"
##
## [[8]]
## [1] "kableExtra" "scales" "knitr" "gt" "modelsummary"
## [6] "broom" "sjPlot" "lubridate" "forcats" "stringr"
## [11] "dplyr" "purrr" "readr" "tidyr" "tibble"
## [16] "ggplot2" "tidyverse" "stats" "graphics" "grDevices"
## [21] "utils" "datasets" "methods" "base"
##
## [[9]]
## [1] "flextable" "kableExtra" "scales" "knitr" "gt"
## [6] "modelsummary" "broom" "sjPlot" "lubridate" "forcats"
## [11] "stringr" "dplyr" "purrr" "readr" "tidyr"
## [16] "tibble" "ggplot2" "tidyverse" "stats" "graphics"
## [21] "grDevices" "utils" "datasets" "methods" "base"
##
## [[10]]
## [1] "car" "carData" "flextable" "kableExtra" "scales"
## [6] "knitr" "gt" "modelsummary" "broom" "sjPlot"
## [11] "lubridate" "forcats" "stringr" "dplyr" "purrr"
## [16] "readr" "tidyr" "tibble" "ggplot2" "tidyverse"
## [21] "stats" "graphics" "grDevices" "utils" "datasets"
## [26] "methods" "base"
##
## [[11]]
## [1] "fst" "car" "carData" "flextable" "kableExtra"
## [6] "scales" "knitr" "gt" "modelsummary" "broom"
## [11] "sjPlot" "lubridate" "forcats" "stringr" "dplyr"
## [16] "purrr" "readr" "tidyr" "tibble" "ggplot2"
## [21] "tidyverse" "stats" "graphics" "grDevices" "utils"
## [26] "datasets" "methods" "base"
#loading CHS
chs <- read.csv("C:/Users/camsa/OneDrive/Documents/SOC3320/CHS2021ECL_PUMF.csv")
#Task 1 Life Satisfaction in Alantic Canada Regions
table(chs$PGEOGR, useNA = "ifany") #checking variable data
##
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
## 2446 1714 1088 1977 2037 2001 1218 1165 1395 2195 946 1021 1009 1091 1033 2233
## 17 18 19 20 21 22 23 24 25 26 27 28
## 1037 1924 997 940 1742 1078 968 2748 1110 1123 1964 788
table(chs$PLIS_05, useNA = "ifany") #checking variable data
##
## 1 2 3 4 5 6 7 8 9 99
## 1442 1059 1164 3933 3279 6634 9707 5597 7881 292
atlantic_data <- chs %>% #creating Atlantic Canada subset
filter(PGEOGR %in% c(1, 2, 3, 4, 5, 6)) %>%
select(PGEOGR, PLIS_05) %>% #filtering in Life Satisfaction
filter(PLIS_05 != 99, !is.na(PLIS_05)) %>% #filtering out invalid values
mutate(region = factor(PGEOGR, #creating clear region names
levels = c(1, 2, 3, 4, 5, 6),
labels = c("Newfoundland and Labrador",
"Prince Edward Island",
"Halifax",
"Outside Halifax - NS",
"Saint John and Moncton",
"Outside Saint John and Moncton - NB")),
life_satisfaction = case_when( #cleaning life satisfaction
PLIS_05 == 1 ~ "Very dissatisfied",
PLIS_05 %in% c(2, 3) ~ "Dissatisfied",
PLIS_05 %in% c(4, 5) ~ "Neutral",
PLIS_05 %in% c(6, 7) ~ "Satisfied",
PLIS_05 %in% c(8, 9) ~ "Very satisfied"
),
life_satisfaction = factor(life_satisfaction,
levels = c("Very dissatisfied", "Dissatisfied",
"Neutral", "Satisfied", "Very satisfied")))
ggplot(atlantic_data, aes(x = region, y = PLIS_05, fill = region)) +
geom_boxplot(outlier.shape = 16, outlier.size = 2, outlier.color = "blue") +
labs( #clear labels
title = "Life Satisfaction In Atlantic Canada Regions",
x = "Region",
y = "Life Satisfaction Score"
) +
scale_fill_brewer(palette = "Set1") + #vibrant yet appropriate color scheme (my favorite)
theme_minimal() +
theme(
axis.text.x = element_text(angle = 40, hjust = 1), #Rotate x-axis labels
plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
axis.text = element_text(size = 12),
axis.title = element_text(size = 14)
)
#Descriptive analysis The boxplot illustrates life satisfaction scores
across different regions in Atlantic Canada. The median life
satisfaction scores are fairly consistent, with most regions clustering
around the mid-to-upper range of the scale. Newfoundland and Labrador
and Outside Saint John and Moncton – NB appear to have the highest
median satisfaction scores, while Halifax and Prince Edward Island show
slightly lower median values. In terms of interquartile range (IQR),
Halifax and Outside Halifax – NS have the narrowest IQRs, suggesting
more consistent satisfaction levels within those regions. In contrast,
Newfoundland and Labrador and Outside Saint John and Moncton – NB show
wider IQRs, indicating greater variability in responses. These outliers
reflect notably low satisfaction scores, particularly in Newfoundland
and Labrador, Prince Edward Island, and Halifax. Despite these outliers,
the overall trend shows that most life satisfaction scores are
concentrated between 5 and 8 across all regions. A noticeable pattern is
that rural areas (e.g., Outside Halifax and Outside Saint John and
Moncton) tend to have more variability in satisfaction scores, while
urban areas like Halifax exhibit more consistency. This may reflect
differences in local resources, economic conditions, or community
dynamics. Overall, while some regional differences exist, the general
trend suggests relatively high life satisfaction across Atlantic Canada.
word count: 203
#Regression Analysis
levels(atlantic_data$region) #checking the levels because at this point I was having issues with the below chart not displaying properly and had to go and remove the 0s in "01", "02" etc.
## [1] "Newfoundland and Labrador" "Prince Edward Island"
## [3] "Halifax" "Outside Halifax - NS"
## [5] "Saint John and Moncton" "Outside Saint John and Moncton - NB"
model <- lm(PLIS_05 ~ region, data = atlantic_data)
#Summary of the regression model
summary(model)
##
## Call:
## lm(formula = PLIS_05 ~ region, data = atlantic_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.7721 -0.7721 0.3052 1.4802 2.7500
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.69485 0.04166 160.702 < 2e-16
## regionPrince Edward Island 0.07727 0.06482 1.192 0.23323
## regionHalifax -0.44485 0.07495 -5.935 3.03e-09
## regionOutside Halifax - NS -0.07711 0.06230 -1.238 0.21582
## regionSaint John and Moncton -0.17502 0.06182 -2.831 0.00464
## regionOutside Saint John and Moncton - NB 0.01389 0.06213 0.224 0.82313
##
## (Intercept) ***
## regionPrince Edward Island
## regionHalifax ***
## regionOutside Halifax - NS
## regionSaint John and Moncton **
## regionOutside Saint John and Moncton - NB
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.052 on 11171 degrees of freedom
## Multiple R-squared: 0.005023, Adjusted R-squared: 0.004577
## F-statistic: 11.28 on 5 and 11171 DF, p-value: 7.196e-11
#Visualizing Coefficients
plot_model(model,
type = "est",
show.values = TRUE,
value.offset = 0.3,
vline.color = "red") +
labs(
title = "Regression Coefficients for Life Satisfaction Across Atlantic Canada Regions",
x = "Region",
y = "Coefficient Estimate"
) +
theme_minimal()
#Professional regression table
pred_labels <- c(
"(Intercept)" = "Intercept",
"regionPrince Edward Island" = "Prince Edward Island",
"regionHalifax" = "Halifax",
"regionOutside Halifax - NS" = "Outside Halifax (NS)",
"regionSaint John and Moncton" = "Saint John & Moncton",
"regionOutside Saint John and Moncton - NB" = "Outside SJ & Moncton (NB)"
)
tab_model(
model,
pred.labels = pred_labels,
dv.labels = "Life Satisfaction",
title = "Linear Regression Results: Life Satisfaction by Region"
)
Life Satisfaction | |||
---|---|---|---|
Predictors | Estimates | CI | p |
Intercept | 6.69 | 6.61 – 6.78 | <0.001 |
Prince Edward Island | 0.08 | -0.05 – 0.20 | 0.233 |
Halifax | -0.44 | -0.59 – -0.30 | <0.001 |
Outside Halifax (NS) | -0.08 | -0.20 – 0.05 | 0.216 |
Saint John & Moncton | -0.18 | -0.30 – -0.05 | 0.005 |
Outside SJ & Moncton (NB) | 0.01 | -0.11 – 0.14 | 0.823 |
Observations | 11177 | ||
R2 / R2 adjusted | 0.005 / 0.005 |
#Regression Interpretation The linear regression model examining life satisfaction across different regions in Atlantic Canada suggests that regional differences have a statistically significant, yet limited, effect on life satisfaction scores. The model’s overall R^2 value is 0.005, indicating that only 0.5% of the variance in life satisfaction is explained by regional differences. This suggests that factors beyond geographic location, such as individual-level characteristics or other socioeconomic variables, likely account for the majority of variation in life satisfaction. Among the six examined regions examined, only three show statistically significant differences in life satisfaction compared to the reference region (which is Newfoundland and Labrador). The coefficient for Halifax is -0.44, with a 95% CI of (-0.59, -0.30) and a p-value of <0.001. This result indicates that, on average, people living in Halifax report significantly lower life satisfaction than those in Newfoundland and Labrador. The coefficient for Saint John & Moncton is -0.18, with a CI of (-0.30, -0.05) and a p-value of 0.005. This shows that individuals in Saint John & Moncton have significantly lower life satisfaction compared to those in Newfoundland and Labrador. The effect size is smaller than that of Halifax, with a reduction of about 0.18 points on the scale. The other regions, Prince Edward Island, Outside Halifax (NS), and Outside Saint John & Moncton (NB), did not show statistically significant differences in life satisfaction compared to Newfoundland and Labrador. The p-values for these regions were above the common significance threshold of 0.05, meaning that any differences in life satisfaction between these regions and Newfoundland and Labrador are likely due to random variation rather than a true effect. For the significant regions, the direction of the coefficients tells us whether people in those regions tend to have higher or lower life satisfaction compared to the reference region: Halifax: The negative coefficient (-0.44) suggests that people in Halifax have lower life satisfaction on average compared to those in Newfoundland and Labrador. Saint John & Moncton: Similarly, the negative coefficient (-0.18) indicates that people in Saint John & Moncton report lower life satisfaction than individuals in Newfoundland and Labrador. The R^2 value of the model is 0.005, which means that regional differences account for only 0.5% of the variation in life satisfaction. This is a very small proportion, indicating that other factors, such as individual characteristics (ex: income, education, health status) or broader societal influences (ex: social networks, work-life balance), are much more influential in determining life satisfaction. The low R^2 value suggests that while regions do exhibit some differences in life satisfaction, these differences are not substantial enough to be a major predictor of life satisfaction. While some regions, particularly Halifax and Saint John & Moncton, have lower life satisfaction compared to Newfoundland and Labrador, the overall regional differences in life satisfaction are relatively small. The small effect sizes and the minimal variance explained by the model suggest that regional factors alone do not strongly influence life satisfaction. The model’s low R^2 value suggests that regional differences explain only a small fraction of the variation in life satisfaction. This highlights the complexity of life satisfaction and the need to consider a broad range of factors when seeking to understand and improve well-being in different regions. word count: 547
#Bonus Point !!! Significant coefficients: If the CI does not cross zero, the coefficient is statistically significant. This means the effect is likely real and not due to random chance. Non-significant coefficients: If the CI crosses zero, the coefficient is not statistically significant, indicating that the effect could be due to random variation. This visual approach is helpful because it quickly shows which coefficients are significant and which are not, without needing to read through detailed p-values or CIs in a table. The visual clarity allows for fast interpretation of the results. word count: 89
#Task 2: Populist Attitudes in Portugal
#Loading Portugal Data
portugal_data <- read.fst ("C:/Users/camsa/OneDrive/Documents/SOC3320/portugal_data.fst")
#Part A
colnames(portugal_data) #checking for age variable
## [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"
#Clean the trust variables
portugal_data$trstplt <- ifelse(portugal_data$trstplt > 10, NA, portugal_data$trstplt)
portugal_data$trstprl <- ifelse(portugal_data$trstprl > 10, NA, portugal_data$trstprl)
portugal_data$trstprt <- ifelse(portugal_data$trstprt > 10, NA, portugal_data$trstprt)
portugal_data$trust_score <- portugal_data$trstplt + portugal_data$trstprl + portugal_data$trstprt
portugal_data$trust <- scales::rescale(
portugal_data$trust_score, to = c(0, 100), na.rm = TRUE)
portugal_data$populist <- scales::rescale(
portugal_data$trust, to = c(100, 0), na.rm = TRUE)
#Creating generation variable
portugal_data <- portugal_data %>%
mutate(
birth_year = ifelse(yrbrn <1928 | yrbrn > 2005, NA, yrbrn), #recoding birth year
generation = case_when(
birth_year %in% 1928:1945 ~ "Interwar",
birth_year %in% 1946:1964 ~ "Baby Boomers",
birth_year %in% 1965:1980 ~ "Gen X",
birth_year %in% 1981:1996 ~ "Millenials",
birth_year %in% 1997:2005 ~ "Gen Z",
TRUE ~ NA_character_),
generation = factor(generation, #Ensuring correct order
levels = c("Interwar", "Baby Boomers", "Gen X", "Millenials", "Gen Z")))
#Checking distribution
table(portugal_data$generation, useNA = "ifany")
##
## Interwar Baby Boomers Gen X Millenials Gen Z <NA>
## 4382 5371 4416 2645 307 760
#Converting numeric codes to "Male" and "Female" labels
portugal_data$gndr <- case_when(
portugal_data$gndr == 1 ~ "Male",
portugal_data$gndr == 2 ~ "Female",
TRUE ~ NA_character_
)
#Converting to factor for analysis
portugal_data$gndr <- factor(portugal_data$gndr, levels = c("Male", "Female"))
#Descriptive Analysis
#Filter out NA values for both generation and populist variables
filtered_data <- portugal_data %>%
filter(!is.na(generation) & !is.na(populist))
#Create the boxplot visualization
ggplot(filtered_data, aes(x = generation, y = populist, fill = generation)) +
geom_boxplot(outlier.shape = 16, outlier.size = 2, outlier.color = "blue") +
labs(
title = "Populist Attitudes by Generation",
subtitle = "Boxplot showing the distribution of populist attitudes across generations",
x = "Generation",
y = "Populist Attitudes Score",
caption = "Source: ESS Data, 2025"
) +
scale_fill_brewer(palette = "Set1") + #Using a suitable color palette (this one is my favorite)
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
plot.subtitle = element_text(size = 12, hjust = 0.5),
axis.text = element_text(size = 12),
axis.title = element_text(size = 14),
plot.caption = element_text(size = 10, hjust = 1)
)
#The Descriptive Part of the Analysis The boxplot displays the
distribution of populist attitudes across five generational groups:
Interwar, Baby Boomers, Generation X, Millennials, and Gen Z. The median
populist attitude score appears to be relatively high for the Interwar
generation, with the median score for this group reaching around 75,
indicating a tendency for stronger populist views. In contrast,
Millennials have the lowest median, around 25, reflecting a relatively
weaker inclination towards populism. Looking at the spread of attitudes
(IQR), we observe that Generation X and Millennials exhibit the
narrowest IQRs, indicating more consistency in populist attitudes within
these groups. Gen Z, on the other hand, shows a wider IQR, suggesting
more variability in populist attitudes. The Interwar and Baby Boomers
groups also show relatively broad IQRs, indicating that there is greater
diversity in populist attitudes within these groups compared to
Millennials. In terms of outliers, there are a few scattered outliers in
the Millennial group with lower populist scores, possibly reflecting
individuals whose views diverge from the general trend. Overall, the
boxplot suggests that older generations (Interwar and Baby Boomers) tend
to display stronger and more varied populist attitudes, while
Millennials and Gen Z show more consistent, but weaker, populist views.
word count: 197
#Regression Models
#Model 1: Populist attitudes predicted by gender only
model1 <- lm(populist ~ gndr, data = portugal_data)
#Model 2: Populist attitudes predicted by both gender and generation
model2 <- lm(populist ~ gndr + generation, data = portugal_data)
#Create the regression summary table
modelsummary(
list(model1, model2),
fmt = 2, #Format for the estimates
estimate = "{estimate} [{conf.low}, {conf.high}]",
statistic = NULL,
stars = TRUE,
coef_rename = c( #Renaming coefficients
"(Intercept)" = "Intercept",
"gndrFemale" = "Female",
"gndrMale" = "Male",
"generationBaby Boomers" = "Baby Boomers",
"generationGen X" = "Generation X",
"generationMillenials" = "Millenials",
"generationGen Z" = "Gen Z"
),
gof_map = c("nobs", "r.squared", "adj.r.squared", "aic", "bic"), #Goodness-of-fit statistics
title = "Regression Comparison of Populist Attitudes",
notes = "Source: ESS Data, 2025"
)
(1) | (2) | |
---|---|---|
+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001 | ||
Source: ESS Data, 2025 | ||
Intercept | 72.12 [71.63, 72.60] | 73.71 [72.96, 74.47] |
Female | 0.89 [0.26, 1.53] | 0.75 [0.11, 1.40] |
Baby Boomers | -0.67 [-1.53, 0.19] | |
Generation X | -1.65 [-2.54, -0.75] | |
Millenials | -3.49 [-4.52, -2.47] | |
Gen Z | -13.92 [-16.28, -11.55] | |
Num.Obs. | 15531 | 15001 |
R2 | 0.000 | 0.012 |
R2 Adj. | 0.000 | 0.011 |
AIC | 137097.9 | 132243.9 |
BIC | 137120.8 | 132297.2 |
#Regression Interpretation Model 1: Populist Attitudes Predicted by Gender Only In Model 1, populist attitudes are predicted solely by gender. The model’s intercept is 72.12, with a confidence interval of (71.63, 72.60), meaning that for males (the reference category), the predicted populist attitude score is approximately 72.12. The gender coefficient for females is 0.89, with a confidence interval of (0.26, 1.53). The coefficient for gender is statistically significant because the confidence interval does not include 0. The p-value is likely below 0.05, which indicates that the gender difference in populist attitudes is not due to chance. In this model, gender is a significant predictor of populist attitudes, with females exhibiting slightly higher populist scores compared to males. The R^2 value for Model 1 is 0, meaning the model explains virtually none of the variance in populist attitudes. The AIC and BIC values (137097.9 and 137120.8) indicate that the model is not an optimal fit to the data, and the very low R^2 value further confirms this. Model 2: Populist Attitudes Predicted by Gender and Generation Model 2 extends Model 1 by adding generation as an additional predictor of populist attitudes. The intercept for this model is 73.71, with a confidence interval of [72.96, 74.47]. This means that for individuals in the reference generation (likely the Interwar generation, depending on the coding), the predicted populist attitude score is 73.71. Baby Boomers have a coefficient of -0.67, with a confidence interval of [-1.53, 0.19]. This means that Baby Boomers tend to have slightly lower populist attitude scores than the reference generation (Interwar). Generation X has a coefficient of -1.65, with a confidence interval of [-2.54, -0.75], indicating that Generation X tends to have significantly lower populist attitudes than the reference generation (Interwar). Millennials have a coefficient of -3.49, with a confidence interval of [-4.52, -2.47], suggesting that Millennials exhibit significantly lower populist attitudes than the reference generation, and this result is also statistically significant. Gen Z has a coefficient of -13.92, with a confidence interval of [-16.28, -11.55], indicating that Gen Z has a much lower populist attitude score than the reference generation. The gender coefficient in Model 2 is 0.75, with a confidence interval of [0.11, 1.40], which is very similar to the coefficient in Model 1. This suggests that females still exhibit slightly higher populist attitudes than males, even when controlling for generations. The coefficients for Generation X, Millennials, and Gen Z are statistically significant, indicating that these generations exhibit significantly lower populist attitudes than the reference group (likely Interwar). The confidence intervals for Baby Boomers indicate that this generation’s difference from the reference group is not statistically significant, suggesting that their populist attitude scores are not significantly different from the Interwar generation. Model 2 explains populist attitudes better than Model 1 because it includes generation as an additional predictor. Model 1, with only gender as a predictor, has a very low R^2 and fails to explain much of the variance in populist attitudes. The results from Model 2 suggest that generational differences play a more significant role in shaping populist attitudes in Portugal than gender. Specifically, younger generations, particularly Gen Z and Millennials, exhibit significantly lower populist attitudes than older generations. This finding aligns with the notion that younger generations may be more progressive or less likely to embrace populist ideologies compared to older, more traditional generations. word count: 588
#Bonus !!! The intercept changes because Model 2 includes generation as a predictor. In Model 1, the intercept represents the predicted populist attitude score for males (the reference group). In Model 2, the intercept represents the predicted score for the reference generation (likely Interwar), and the effects of gender and generation are separated out. In Model 1, the coefficient for Male reflects the difference in populist attitudes between males and females. In Model 2, the gender coefficient is adjusted to account for the effect of generation. This causes the coefficient for Male to change, as it now represents the difference between males and females within each generation rather than overall. The change in the coefficient for Male suggests that gender differences in populist attitudes are partially explained by generational differences. When generation is accounted for, the effect of gender on populist attitudes becomes smaller, indicating that generation plays a more significant role than gender in shaping populist views. word count: 156
#Task 3: Authoritarian Valuess in France
#Loading France data
france_data <- read.fst("C:/Users/camsa/OneDrive/Documents/SOC3320/france_data.fst")
#Data Preparation
#Identifying relevant variables
france_data <- france_data %>%
mutate(
behave = ipbhprp, # Proper behavior
secure = impsafe, # Security
safety = ipstrgv, # Strong government
tradition = imptrad, # Tradition
rules = ipfrule # Following rules
)
france_data <- france_data %>%
mutate(
across(c("behave", "secure", "safety", "tradition", "rules"), #cleaning variables
~ na_if(.x, 7) %>% na_if(8) %>% na_if(9)) %>%
mutate(
across(c("behave", "secure", "safety", "tradition", "rules"), ~ 7 - .x))) #reverse coding
#Calculate the authoritarian scale (0-100)
france_data$auth <- scales::rescale(
france_data$behave +
france_data$secure +
france_data$safety +
france_data$tradition +
france_data$rules,
to = c(0, 100),
na.rm = TRUE
)
#Examine the distribution
summary(france_data$auth)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.00 48.00 60.00 59.75 72.00 100.00 800
#Create Education Level
france_data <- france_data %>%
mutate(
education = case_when(
eisced %in% 1:2 ~ "Lower Secondary or Less", #Values for lower secondary or less
eisced %in% 3:4 ~ "Upper Secondary", #Values for upper secondary
eisced %in% 5:7 ~ "Tertiary Education", #Values for tertiary education
TRUE ~ NA_character_
),
education = factor(education,
levels = c("Lower Secondary or Less", "Upper Secondary", "Tertiary Education"))
)
#Create Residential Area variable
france_data <- france_data %>%
mutate(
residential_area = case_when(
domicil == 1 ~ "Major city",
domicil %in% c(2, 3) ~ "Urban periphery",
domicil %in% c(4, 5) ~ "Rural",
TRUE ~ NA_character_
),
residential_area = factor(residential_area,
levels = c("Major city", "Urban periphery", "Rural"))
)
#Create Economic Status
france_data <- france_data %>%
mutate(
economic_status = case_when(
hinctnta %in% c(7, 8, 9, 10) ~ "Economic Comfort", #Higher income (7th to 10th deciles)
hinctnta %in% c(1, 2, 3, 4, 5, 6) ~ "Economic Strain", #Lower income (1st to 6th deciles)
hinctnta %in% c(77, 88, 99) ~ NA_character_ #Refusal, Don't Know, No answer, set to NA
),
economic_status = factor(economic_status,
levels = c("Economic Comfort", "Economic Strain"))
)
#Check distribution of education variable
table(france_data$education, useNA = "ifany")
##
## Lower Secondary or Less Upper Secondary Tertiary Education
## 4218 6529 4949
## <NA>
## 3342
#Check distribution of residential area variable
table(france_data$residential_area, useNA = "ifany")
##
## Major city Urban periphery Rural <NA>
## 3584 8618 6830 6
#Check distribution of economic status
table(france_data$economic_status, useNA = "ifany")
##
## Economic Comfort Economic Strain <NA>
## 4505 7972 6561
#Descriptive Analysis Visualization
#Filter out NA values for authoritarian values and education level
france_data_filtered <- france_data %>%
filter(!is.na(auth), !is.na(education))
#Create a violin plot with internal boxplots
ggplot(
data = france_data_filtered, mapping = aes(x = education, y = auth, fill = education)) +
geom_violin(alpha = 0.7, trim = FALSE) + #Add the violin plot shapes
geom_boxplot(width = 0.2, alpha = 0.5, color = "gray30") + #Add the inner boxplots
scale_fill_manual(values = c("#7fb6db", "#f2ce85", "#a1f26b")) + #Color scheme for education levels
labs(
title = "Distribution of Authoritarian Values by Education Level",
subtitle = "Violin plot with boxplots for summary statistics",
x = "Education Level",
y = "Authoritarian Values (0-100)"
) +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 45, hjust = 1),
plot.title = element_text(size = 16, face = "bold", hjust = 0.5),
plot.subtitle = element_text(size = 12, hjust = 0.5),
axis.text = element_text(size = 12),
axis.title = element_text(size = 14),
plot.caption = element_text(size = 10, hjust = 1)
)
#The Descriptive Part The violin plot above provides both the
distribution shape and summary statistics for each education group. The
median (represented by the horizontal line in the boxplot) is highest
for the Lower Secondary or Less group, with a score around 80,
suggesting that individuals in this group tend to have higher
authoritarian values. The Tertiary Education group has a much lower
median, around 50, indicating lower authoritarian values compared to the
other groups. Upper Secondary sits between these two, closer to Lower
Secondary or Less. The variability within each education group is
captured by the width of the violin and the IQR. The Tertiary Education
group has the widest distribution, indicating more spread in
authoritarian values. In contrast, Lower Secondary or Less and Upper
Secondary have narrower distributions, suggesting more consistency in
authoritarian values within these groups. The distribution shape for all
groups is fairly symmetric, but the Lower Secondary or Less group has a
slight skew towards higher authoritarian values. Tertiary Education has
a more uniform shape, with a concentration of values in the lower range,
while Upper Secondary shows a relatively uniform distribution. These
patterns suggest that individuals with higher education tend to exhibit
lower authoritarian values, and there is greater variability in these
values within the Tertiary Education group. The more uniform
distributions for Lower Secondary or Less and Upper Secondary imply a
stronger tendency towards higher authoritarian views in less educated
groups. These descriptive patterns may indicate a relationship between
education and political or social attitudes, with higher education
potentially fostering more liberal or non-authoritarian views. word
count: 259
#Progressive Model Building
#Model 1: Education level only
model1 <- lm(auth ~ education, data = france_data)
#Model 2: Education level + Residential area
model2 <- lm(auth ~ education + residential_area, data = france_data)
#Model 3: Education level + Residential area + Economic status
model3 <- lm(auth ~ education + residential_area + economic_status, data = france_data)
#Define meaningful labels for the predictors
pred_labels <- c(
"(Intercept)" = "Intercept",
"educationLower Secondary or Less" = "Lower Secondary or Less",
"educationUpper Secondary" = "Upper Secondary",
"educationTertiary Education" = "Tertiary Education",
"residential_areaUrban periphery" = "Urban",
"residential_areaRural" = "Rural",
"economic_statusEconomic Comfort" = "Economic Comfort",
"economic_statusEconomic Strain" = "Economic Strain"
)
#Create regression table for all three models
tab_model(
model1, model2, model3,
pred.labels = pred_labels,
dv.labels = c("Model 1:\nEducation Level", "Model 2:\n+ Residential Area", "Model 3:\n+ Economic Status"),
string.pred = "Predictors",
string.est = "β",
string.ci = "95% CI",
string.p = "p-value",
p.style = "stars",
p.threshold = c(0.05, 0.01, 0.001), #Show stars for significance
show.aic = TRUE, #Show AIC values
show.r2 = TRUE, #Show R^2 values
show.fstat = TRUE, #Show F-statistics
digits = 2, #Round estimates to 3 decimal places
title = "Regression Models Predicting Authoritarian Values",
CSS = list(
css.table = "font-size: 12px; width: auto; margin-bottom: 20px;",
css.thead = "font-weight: bold; border-bottom: 1px solid #ddd;",
css.tdata = "padding: 5px; border-bottom: 1px solid #f0f0f0;",
css.caption = "font-weight: bold; font-size: 14px; margin-bottom: 10px;",
css.footnote = "font-size: 11px;",
css.depvarhead = "font-weight: bold; text-align: center; border-bottom: 1px solid #ddd;",
css.centeralign = "text-align: center;",
css.firsttablecol = "font-weight: bold; font-size: 12px;"
)
)
Model 1: Education Level | Model 2: + Residential Area | Model 3: + Economic Status | ||||
---|---|---|---|---|---|---|
Predictors | β | 95% CI | β | 95% CI | β | 95% CI |
Intercept | 63.92 *** | 63.35 – 64.50 | 64.75 *** | 63.88 – 65.61 | 63.92 *** | 62.75 – 65.08 |
Upper Secondary | -4.45 *** | -5.18 – -3.72 | -4.42 *** | -5.15 – -3.69 | -4.63 *** | -5.47 – -3.79 |
Tertiary Education | -9.22 *** | -9.99 – -8.44 | -9.36 *** | -10.14 – -8.58 | -8.95 *** | -9.88 – -8.03 |
Urban | -0.51 | -1.33 – 0.31 | -0.33 | -1.24 – 0.58 | ||
Rural | -1.54 *** | -2.39 – -0.69 | -1.35 ** | -2.29 – -0.41 | ||
Economic Strain | 1.01 ** | 0.29 – 1.73 | ||||
Observations | 15214 | 15211 | 12124 | |||
R2 / R2 adjusted | 0.035 / 0.034 | 0.036 / 0.035 | 0.036 / 0.036 | |||
AIC | 132050.620 | 132006.560 | 105005.750 | |||
|
# Calculate AIC and BIC for each model
aic_bic_values <- data.frame(
Model = c("Model 1", "Model 2", "Model 3"),
AIC = c(AIC(model1), AIC(model2), AIC(model3)),
BIC = c(BIC(model1), BIC(model2), BIC(model3))
)
kable(aic_bic_values, digits = 1, caption = "Comparison of AIC and BIC Across Models")
Model | AIC | BIC |
---|---|---|
Model 1 | 132050.6 | 132081.1 |
Model 2 | 132006.6 | 132052.3 |
Model 3 | 105005.7 | 105057.6 |
#Create a coefficient plot for Model 3 with a red vertical reference line at zero
plot_model(model3,
show.values = TRUE,
value.offset = 0.3,
vline.color = "red",
vline.size = 1.5,
title = "Coefficient Plot for Model 3: Education, Residential Area, and Economic Status")
#Model Comparison and Interpretation Model 1: Education Level Only The
intercept of 63.92 represents the predicted authoritarian value for
individuals with Lower Secondary or Less education, which is the
reference category. This suggests that individuals in this group tend to
have higher authoritarian values on average compared to those with
higher education levels. The coefficient of -4.45 (p < 0.001)
indicates that individuals with Upper Secondary education have lower
authoritarian values compared to those with Lower Secondary or Less
education. A one-unit increase in education level (from Lower Secondary
to Upper Secondary) decreases authoritarian values by 4.45 points. The
coefficient of -9.22 (p < 0.001) suggests that individuals with
Tertiary Education hold significantly lower authoritarian values, with a
decrease of 9.22 points. The coefficient of -9.22 (p < 0.001)
suggests that individuals with Tertiary Education hold significantly
lower authoritarian values, with a decrease of 9.22 points. Model 2:
Education Level + Residential Area The intercept of 64.75 represents
individuals with Lower Secondary or Less education, living in an Urban
area, which is the reference category for both education and residence.
This suggests that individuals in this group have higher authoritarian
values compared to the other groups. The coefficient for Upper Secondary
education is -5.15 (p < 0.001), which is slightly larger than in
Model 1, suggesting the addition of residential area strengthens the
negative relationship between Upper Secondary education and
authoritarian values. The coefficient of -9.36 (p < 0.001) remains
significant, reinforcing that higher education is associated with lower
authoritarian values. The coefficient of -0.51 (not significant)
suggests that living in an urban area does not significantly affect
authoritarian values after controlling for education. The coefficient
for Rural is -1.54 (p < 0.01), indicating that individuals in rural
areas tend to have slightly lower authoritarian values compared to urban
residents, though the effect is modest. Model 2 explains 3.6% of the
variance in authoritarian values, which is a slight improvement over
Model 1 (R^2 = 0.035). Model 3: Education Level + Residential Area +
Economic Status The intercept of 63.92 represents individuals with Lower
Secondary or Less education, living in an Urban area, and experiencing
Economic Comfort. The coefficient of -4.63 (p < 0.001) is similar to
Model 2, showing that Upper Secondary education continues to reduce
authoritarian values.The coefficient of -8.95 (p < 0.001) suggests
that individuals with Tertiary Education hold significantly lower
authoritarian values, similar to Model 2. The coefficient of -0.33 (not
significant) becomes smaller and loses statistical significance in Urban
areas. The coefficient of -1.35 (p < 0.01) remains significant,
indicating that rural residents still show slightly lower authoritarian
values. The coefficient of 1.01 (p < 0.01) shows that individuals
experiencing economic strain have significantly higher authoritarian
values compared to those in economic comfort. Model 3 explains 3.6% of
the variance, with an improvement in AIC (from 132050.620 to
105005.750), showing a better fit compared to the earlier models. The
addition of economic status reveals its significant role in shaping
authoritarian attitudes. As new predictors are added, the coefficients
for education remain largely stable, with Tertiary Education
consistently showing the strongest negative effect on authoritarian
values. Rural residence continues to have a small negative effect on
authoritarian values, while Urban residence loses significance. The
inclusion of economic status in Model 3 introduces economic strain as a
significant predictor of higher authoritarian values, indicating that
individuals facing economic hardship tend to support more authoritarian
views. R^2 remains low (around 0.035) across all models, suggesting that
these predictors explain only a small portion of the variance in
authoritarian values. AIC decreases substantially in Model 3, indicating
that this model provides a better fit to the data compared to Models 1
and 2. Education is the most important predictor: individuals with
higher education (especially Tertiary Education) tend to hold lower
authoritarian values. Economic strain also significantly influences
authoritarian attitudes, with individuals facing economic hardship
displaying higher authoritarian values. The findings suggest that
economic insecurity plays a substantial role in promoting authoritarian
attitudes, while education works in the opposite direction, reducing
authoritarian views. These results underscore the importance of
socioeconomic factors in shaping political attitudes and highlight the
potential influence of economic stability in fostering more liberal or
open-minded political ideologies. word count: 720 (sorry, everything
felt important)
RPubs Link to knitted HTML: https://rpubs.com/Casaloe/1287490