Group Austria

Preparing the data

# Loading the data on rda
load("~/Documents/DATA ANALYTICS/Austria.rda")

# Summary statistics
summary(data)
##    cntry_AN              year       reg_nuts1              A001      
##  Length:844         Min.   :2018   Length:844         Min.   :1.000  
##  Class :character   1st Qu.:2018   Class :character   1st Qu.:1.000  
##  Mode  :character   Median :2018   Mode  :character   Median :1.000  
##                     Mean   :2018                      Mean   :1.164  
##                     3rd Qu.:2018                      3rd Qu.:1.000  
##                     Max.   :2018                      Max.   :4.000  
##       A002            A004            A005            A006      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:2.000   1st Qu.:1.000   1st Qu.:2.000  
##  Median :1.000   Median :2.000   Median :1.000   Median :3.000  
##  Mean   :1.417   Mean   :2.431   Mean   :1.649   Mean   :2.655  
##  3rd Qu.:2.000   3rd Qu.:3.000   3rd Qu.:2.000   3rd Qu.:3.000  
##  Max.   :4.000   Max.   :4.000   Max.   :4.000   Max.   :4.000  
##       A008            A009            A170             A173       
##  Min.   :1.000   Min.   :1.000   Min.   : 1.000   Min.   : 1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.: 7.000   1st Qu.: 6.000  
##  Median :2.000   Median :2.000   Median : 8.000   Median : 8.000  
##  Mean   :1.754   Mean   :1.975   Mean   : 7.919   Mean   : 7.255  
##  3rd Qu.:2.000   3rd Qu.:3.000   3rd Qu.: 9.000   3rd Qu.: 9.000  
##  Max.   :4.000   Max.   :5.000   Max.   :10.000   Max.   :10.000  
##       A065            A066             A067             A068        
##  Min.   :0.000   Min.   :0.0000   Min.   :0.0000   Min.   :0.00000  
##  1st Qu.:0.000   1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:0.00000  
##  Median :0.000   Median :0.0000   Median :0.0000   Median :0.00000  
##  Mean   :0.359   Mean   :0.1363   Mean   :0.1351   Mean   :0.07583  
##  3rd Qu.:1.000   3rd Qu.:0.0000   3rd Qu.:0.0000   3rd Qu.:0.00000  
##  Max.   :1.000   Max.   :1.0000   Max.   :1.0000   Max.   :1.00000  
##       A071              A072              A074             A078        
##  Min.   :0.00000   Min.   :0.00000   Min.   :0.0000   Min.   :0.00000  
##  1st Qu.:0.00000   1st Qu.:0.00000   1st Qu.:0.0000   1st Qu.:0.00000  
##  Median :0.00000   Median :0.00000   Median :0.0000   Median :0.00000  
##  Mean   :0.04028   Mean   :0.06043   Mean   :0.2761   Mean   :0.03199  
##  3rd Qu.:0.00000   3rd Qu.:0.00000   3rd Qu.:1.0000   3rd Qu.:0.00000  
##  Max.   :1.00000   Max.   :1.00000   Max.   :1.0000   Max.   :1.00000  
##       A079            A080_01          A080_02           A124_02       
##  Min.   :0.00000   Min.   :0.0000   Min.   :0.00000   Min.   :0.00000  
##  1st Qu.:0.00000   1st Qu.:0.0000   1st Qu.:0.00000   1st Qu.:0.00000  
##  Median :0.00000   Median :0.0000   Median :0.00000   Median :0.00000  
##  Mean   :0.07346   Mean   :0.0936   Mean   :0.04976   Mean   :0.09479  
##  3rd Qu.:0.00000   3rd Qu.:0.0000   3rd Qu.:0.00000   3rd Qu.:0.00000  
##  Max.   :1.00000   Max.   :1.0000   Max.   :1.00000   Max.   :1.00000  
##     A124_03          A124_06          A124_08          A124_09      
##  Min.   :0.0000   Min.   :0.0000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:1.0000   1st Qu.:0.0000  
##  Median :1.0000   Median :0.0000   Median :1.0000   Median :0.0000  
##  Mean   :0.6789   Mean   :0.1943   Mean   :0.7855   Mean   :0.1232  
##  3rd Qu.:1.0000   3rd Qu.:0.0000   3rd Qu.:1.0000   3rd Qu.:0.0000  
##  Max.   :1.0000   Max.   :1.0000   Max.   :1.0000   Max.   :1.0000  
##       A165            B008           D001_B        G007_18_B    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :2.000  
##  Mean   :1.491   Mean   :1.491   Mean   :1.178   Mean   :1.864  
##  3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:1.000   3rd Qu.:2.000  
##  Max.   :2.000   Max.   :3.000   Max.   :4.000   Max.   :4.000  
##    G007_33_B       G007_34_B      G007_35_B       G007_36_B          E023      
##  Min.   :1.000   Min.   :1.00   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:2.00   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.000  
##  Median :2.000   Median :3.00   Median :2.000   Median :2.000   Median :2.000  
##  Mean   :1.648   Mean   :2.62   Mean   :2.469   Mean   :2.387   Mean   :2.179  
##  3rd Qu.:2.000   3rd Qu.:3.00   3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :4.000   Max.   :4.00   Max.   :4.000   Max.   :4.000   Max.   :4.000  
##       E025            E026            E027            E028      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :1.000   Median :3.000   Median :2.000   Median :3.000  
##  Mean   :1.615   Mean   :2.368   Mean   :2.283   Mean   :2.685  
##  3rd Qu.:2.000   3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :3.000   Max.   :3.000   Max.   :3.000   Max.   :3.000  
##       E035             E037             E039           E111_01      
##  Min.   : 1.000   Min.   : 1.000   Min.   : 1.000   Min.   : 1.000  
##  1st Qu.: 3.000   1st Qu.: 3.000   1st Qu.: 2.000   1st Qu.: 5.000  
##  Median : 5.000   Median : 5.000   Median : 3.000   Median : 7.000  
##  Mean   : 5.121   Mean   : 4.614   Mean   : 3.477   Mean   : 6.411  
##  3rd Qu.: 7.000   3rd Qu.: 6.000   3rd Qu.: 5.000   3rd Qu.: 8.000  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :10.000  
##       E117            E235             F025             F028      
##  Min.   :1.000   Min.   : 1.000   Min.   :0.0000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.: 9.000   1st Qu.:0.0000   1st Qu.:3.000  
##  Median :1.000   Median :10.000   Median :1.0000   Median :6.000  
##  Mean   :1.348   Mean   : 9.104   Mean   :0.9929   Mean   :5.351  
##  3rd Qu.:2.000   3rd Qu.:10.000   3rd Qu.:1.0000   3rd Qu.:8.000  
##  Max.   :4.000   Max.   :10.000   Max.   :9.0000   Max.   :8.000  
##       F034            F050             F063             F116       
##  Min.   :1.000   Min.   :0.0000   Min.   : 1.000   Min.   : 1.000  
##  1st Qu.:1.000   1st Qu.:0.0000   1st Qu.: 3.000   1st Qu.: 1.000  
##  Median :1.000   Median :1.0000   Median : 6.000   Median : 1.000  
##  Mean   :1.436   Mean   :0.7251   Mean   : 5.608   Mean   : 1.793  
##  3rd Qu.:2.000   3rd Qu.:1.0000   3rd Qu.: 8.000   3rd Qu.: 2.000  
##  Max.   :3.000   Max.   :1.0000   Max.   :10.000   Max.   :10.000  
##       F118             F119             F120             F121       
##  Min.   : 1.000   Min.   : 1.000   Min.   : 1.000   Min.   : 1.000  
##  1st Qu.: 5.000   1st Qu.: 1.000   1st Qu.: 4.000   1st Qu.: 5.000  
##  Median : 8.000   Median : 5.000   Median : 6.000   Median : 8.000  
##  Mean   : 7.081   Mean   : 4.578   Mean   : 5.996   Mean   : 7.419  
##  3rd Qu.:10.000   3rd Qu.: 7.000   3rd Qu.: 9.000   3rd Qu.:10.000  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :10.000  
##       F122             F123             F132             G052      
##  Min.   : 1.000   Min.   : 1.000   Min.   : 1.000   Min.   :1.000  
##  1st Qu.: 3.000   1st Qu.: 1.000   1st Qu.: 1.000   1st Qu.:2.000  
##  Median : 6.000   Median : 3.000   Median : 5.000   Median :3.000  
##  Mean   : 5.963   Mean   : 3.919   Mean   : 4.668   Mean   :2.883  
##  3rd Qu.: 9.000   3rd Qu.: 6.000   3rd Qu.: 7.000   3rd Qu.:4.000  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :5.000  
##       X001            X002           X003          G027A            X007      
##  Min.   :1.000   Min.   :1937   Min.   :18.0   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1953   1st Qu.:37.0   1st Qu.:1.000   1st Qu.:1.000  
##  Median :2.000   Median :1968   Median :50.0   Median :1.000   Median :3.000  
##  Mean   :1.556   Mean   :1967   Mean   :50.8   Mean   :1.105   Mean   :2.942  
##  3rd Qu.:2.000   3rd Qu.:1981   3rd Qu.:65.0   3rd Qu.:1.000   3rd Qu.:5.000  
##  Max.   :2.000   Max.   :2000   Max.   :82.0   Max.   :2.000   Max.   :6.000  
##       X011          x026_01           X013          X025A_01    
##  Min.   :0.000   Min.   :1.000   Min.   :1.000   Min.   :2.000  
##  1st Qu.:0.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:3.000  
##  Median :1.000   Median :1.000   Median :2.000   Median :3.000  
##  Mean   :1.412   Mean   :1.098   Mean   :2.259   Mean   :3.547  
##  3rd Qu.:2.000   3rd Qu.:1.000   3rd Qu.:3.000   3rd Qu.:4.000  
##  Max.   :5.000   Max.   :4.000   Max.   :6.000   Max.   :8.000  
##       X028         X047E_EVS5    
##  Min.   :1.000   Min.   : 1.000  
##  1st Qu.:1.000   1st Qu.: 3.000  
##  Median :2.000   Median : 5.000  
##  Mean   :2.573   Mean   : 4.773  
##  3rd Qu.:4.000   3rd Qu.: 7.000  
##  Max.   :8.000   Max.   :10.000
# Renaming the variables

colnames(data)[9]<-"A008_hp"
colnames(data)[11]<-"A170_ls"

Descriptive statistics

“A008_hp” variable (happiness)

## Descriptive statistics for A008_hp variable (happiness)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 844 1.753554 0.6450278 2 1.684911 0 1 4 3 0.4147694 -0.1000776 0.0222028
Summary of Happiness
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   1.000   2.000   1.754   2.000   4.000

“A170_ls” variable (life satisfaction)

## Descriptive statistics for A170_ls variable (life satisfaction)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 844 7.919431 1.805002 8 8.142012 1.4826 1 10 9 -1.022233 0.7895252 0.0621307
Summary of Life Satisfaction
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   7.000   8.000   7.919   9.000  10.000

Analyzing the distribution of categorical variable “A008_hp” (Happiness):

For categorical variables, such as “A008_hp,” which represents different categories of happiness, a frequency table or bar plot can illustrate the distribution.This will display the frequency of responses for each category of happiness (1 - Very Happy, 2 - Quite Happy, 3 - Not Very Happy, 4 - Not at All Happy).

## 
##   1   2   3   4 
## 300 457  82   5

Analyzing the distribution of numerical variable “A170_ls” (Life Satisfaction):

As “A170_ls” represents a numerical scale from 1 to 10 for life satisfaction, you can visualize the distribution using a histogram or summary statistics.

## 
##   1   2   3   4   5   6   7   8   9  10 
##   3   2  17  28  51  57  98 235 179 174

Relations between happiness and life satisfaction with other variables

Marital status

## 
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
## 
##     %+%, alpha

INTERPRETATION SCBSJHBCERIUERFIEGRFGERUFGERJHFGJHEFGJEBFJBCJEHCJEVCJEVCVREVEURCUFUWTFR

Income

INTERPRETATION SCBSJHBCERIUERFIEGRFGERUFGERJHFGJHEFGJEBFJBCJEHCJEVCJEVCVREVEURCUFUWTFR

Health

INTERPRETATION SCBSJHBCERIUERFIEGRFGERUFGERJHFGJHEFGJEBFJBCJEHCJEVCJEVCVREVEURCUFUWTFR

Finding components for political interest and attitude dimension

For this, we’ve run a PCA analysis using this variables provided in the study:

  • A004 - Important in life: Politics
  • E023 - Interest in politics
  • E025 - Political action: signing a petition
  • E026 - Political action: joining in boycotts
  • E027 - Political action: attending lawful/peaceful demonstrations
  • E111_01 - Satisfaction with the political system
  • E117 - Political system: Having a democratic political system
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
## Importance of components:
##                           PC1    PC2    PC3    PC4     PC5     PC6     PC7
## Standard deviation     1.5923 1.0906 1.0347 0.8902 0.75918 0.67837 0.61273
## Proportion of Variance 0.3622 0.1699 0.1529 0.1132 0.08234 0.06574 0.05363
## Cumulative Proportion  0.3622 0.5321 0.6851 0.7983 0.88062 0.94637 1.00000

##                 PC1         PC2        PC3         PC4          PC5         PC6
## A004    -0.40977668  0.02339588 -0.5974592  0.12633928 -0.180276873 -0.03528728
## E023    -0.45962213 -0.01044677 -0.4917372  0.01129788  0.005158214  0.01574180
## E025    -0.45575864  0.02841067  0.1954399 -0.16844981  0.817171999  0.17768923
## E026    -0.42004654 -0.19117098  0.4192006  0.24583390 -0.411353598  0.61776894
## E027    -0.44686383 -0.17787420  0.4013389  0.05413573 -0.161881864 -0.76056191
## E111_01  0.02864705 -0.72342293 -0.1059491 -0.66899869 -0.096955670  0.06924821
## E117    -0.19017784  0.63797338  0.1225275 -0.66679170 -0.308035133  0.04522549
##                   PC7
## A004    -0.6518217611
## E023     0.7392096152
## E025    -0.1598789854
## E026     0.0009420335
## E027     0.0031149271
## E111_01 -0.0534644366
## E117    -0.0163465712