::opts_chunk$set(message = FALSE) knitr
Operationalization
library(haven)
library(scales)
library(ggplot2)
library(reshape2)
library(ggthemes)
library(dplyr)
library(qualtRics)
library(tidyr)
library(stringr)
library(gridExtra)
library(openxlsx)
library(scales)
library(gtsummary)
library(psy)
library(lavaan)
#read data with qualtRics
setwd("C:\\Users\\Nir\\Dropbox\\Civil Servants' Perceptions of Democratic Decline\\Code")
<- read_spss("survey_9.3.2023.sav")
data
#create a new dataset with combined variables for men and women
<- data[, 1:19]
new_data
#combine variables for men and women
$Q2 <- coalesce(data$Q2_cs_filter, data$Q2_f)
new_data
#Q4 - influence past
$Q4_1 <- coalesce(data$Q4_influence_past_1, data$Q4_f_influence_past_1)
new_data$Q4_2 <- coalesce(data$Q4_influence_past_2, data$Q4_f_influence_past_2)
new_data$Q4_3 <-coalesce(data$Q4_influence_past_3, data$Q4_f_influence_past_3)
new_data
#Q5 - influence future
$Q5 <- coalesce(data$Q5_influence_future, data$Q5_f_influence_futur)
new_data
#Q6 - influence comments
$Q6 <- coalesce(data$Q6_influence_comment, data$Q6_f_influence_comme)
new_data
#Q10 - meritocracy - past
$Q10_1 <- coalesce(data$Q10_meritocracy_past_1, data$Q10_f_meritocracy_pa_1)
new_data$Q10_2 <- coalesce(data$Q10_meritocracy_past_2, data$Q10_f_meritocracy_pa_2)
new_data$Q10_3 <- coalesce(data$Q10_meritocracy_past_3, data$Q10_f_meritocracy_pa_3)
new_data
#Q11 - meritocracy - future
$Q11 <- coalesce(data$Q11_meritocracy_futu, data$Q11_f_meritocracy_fu)
new_data
#Q12 - meritocracy - comments
$Q12 <- coalesce(data$Q12_meritocracy_comm, data$Q12_f_meritocracy_co)
new_data
#Q13 - functioning - past
$Q13 <- coalesce(data$Q13_functioning_poli,data$Q13_f_functioning_po)
new_data
#Q14 - functioning - hr
$Q14 <- coalesce(data$Q14_functioning_hr, data$Q14_f_functioni_hr)
new_data
#Q15 - democratic decline - future expectations
$Q15 <- coalesce(data$Q15_democracy_future, data$Q15_f_democracy_futu)
new_data
#Q16 - democratic decline - protest
$Q16_1 <- coalesce(data$Q16_democracy_1, data$Q16_f_democracy_1)
new_data$Q16_2 <- coalesce(data$Q16_democracy_2, data$Q16_f_democracy_2)
new_data$Q16_3 <- coalesce(data$Q16_democracy_3, data$Q16_f_democracy_3)
new_data$Q16_4 <- coalesce(data$Q16_democracy_4, data$Q16_f_democracy_4)
new_data$Q16_5 <- coalesce(data$Q16_democracy_5, data$Q16_f_democracy_5)
new_data
#Q17 - democratic decline - comments
$Q17 <- coalesce(data$Q17_democracy_commen, data$Q17_f_democracy_comm)
new_data
#Q19 - investment at work - past
$Q19 <- coalesce(data$Q19_investment_past, data$Q19_f_investment_pa)
new_data
#Q20 - investment at work - collegaues
$Q20 <- coalesce(data$Q20_investment_compa, data$Q20_f_investment_com)
new_data
#Q21 - investment at work - future
$Q21 <- coalesce(data$Q21_investment_futur, data$Q21_f_investment_fut)
new_data
#Q21_a - investment at work - comments
$Q21_a <- coalesce(data$Q21_comment, data$Q21_f_comment)
new_data
#Q22 - voice - past
$Q22_1 <- coalesce(data$Q22_voice_past_1, data$Q22_f_voice_past_1)
new_data$Q22_2 <- coalesce(data$Q22_voice_past_2, data$Q22_f_voice_past_2)
new_data$Q22_3 <- coalesce(data$Q22_voice_past_3, data$Q22_f_voice_past_3)
new_data
#Q22_a - voice - collegaues
$Q22_a <- coalesce(data$Q22a_voice_compare, data$Q22a_f_voice_compare)
new_data
#Q23 - voice - future
$Q23 <- coalesce(data$Q23_voice_future, data$Q23_f_voice_future)
new_data
#Q24 - voice - comments
$Q24 <- coalesce(data$Q24_voice_comment, data$Q24_f_voice_comment)
new_data
#Q25 - exit
$Q25 <- coalesce(data$Q25_CS_resign, data$Q25_f_CS_resign)
new_data
#Q26 - exit - private sector's equal salary
$Q26 <- coalesce(data$Q26_CS_resign_money, data$Q26_f_CS_resign_mone)
new_data
#Q27- reutrn to CS
$Q27 <- coalesce(data$Q27_CS_return_money, data$Q27_f_CS_return_mon)
new_data
#Q27_a- comments
$Q27_a <- coalesce(data$Q27_comment, data$Q27_f_comment)
new_data
#Q28 - PSM
$Q28_1 <- coalesce(data$Q28_PSM_1, data$Q28_f_PSM_1)
new_data$Q28_2 <- coalesce(data$Q28_PSM_2, data$Q28_f_PSM_2)
new_data$Q28_3 <- coalesce(data$Q28_PSM_3, data$Q28_f_PSM_3)
new_data$Q28_4 <- coalesce(data$Q28_PSM_4, data$Q28_f_PSM_4)
new_data
#Q29 - subotage
$Q29_1 <- coalesce(data$Q29_subotage_1, data$Q29_f_subotage_1)
new_data$Q29_2 <- coalesce(data$Q29_subotage_2, data$Q29_f_subotage_2)
new_data$Q29_3 <- coalesce(data$Q29_subotage_3, data$Q29_f_subotage_3)
new_data$Q29_4 <- coalesce(data$Q29_subotage_4, data$Q29_f_subotage_4)
new_data$Q29_5 <- coalesce(data$Q29_subotage_5, data$Q29_f_subotage_5)
new_data$Q29_6 <- coalesce(data$Q29_subotage_6, data$Q29_f_subotage_6)
new_data$Q29_7 <- coalesce(data$Q29_subotage_7, data$Q29_f_subotage_7)
new_data$Q29_8 <- coalesce(data$Q29_subotage_8, data$Q29_f_subotage_8)
new_data$Q29_9 <- coalesce(data$Q29_subotage_9, data$Q29_f_subotage_9)
new_data
#Q29_a - subotage comments
$Q29_a <- coalesce(data$Q29a_subotage_commen, data$Q29a_f_subotage_comm)
new_data
#Q31 - unit (if still works)
$Q31 <- coalesce(data$Q31_unit, data$Q31_f_unit)
new_data
#Q31_a - unit (if still works) - other
$Q31_a <- str_c(data$Q31_unit_26_TEXT, data$Q31_f_unit_26_TEXT)
new_data
#Q32 - unit (if left)
$Q32 <- coalesce(data$Q32_unit_left, data$Q32_f_unit_left)
new_data
#Q32_a - unit (if left) - other
$Q32_a <- str_c(data$Q32_unit_left_26_TEXT, data$Q32_unit_left_26_TEXT)
new_data
#Q33 - seniority (if still works)
$Q33 <- coalesce(data$Q33_seniority, data$Q33_f_seniority)
new_data
#Q34 - seniority (if left)
$Q34 <- coalesce(data$Q34_seniority_left, data$Q34_f_seniority_left)
new_data
#Q35 - appointing (if still works)
$Q35 <- coalesce(data$Q35_appointing, data$Q35_f_appointing)
new_data
#Q35_a - appointing (if still works) - other
$Q35_a <- coalesce(data$Q35_appointing_4_TEXT, data$Q35_f_appointing_4_TEXT)
new_data
#Q36 - appointing (if left)
$Q36 <- coalesce(data$Q36_appointing_left, data$Q36_f_appointing_lef)
new_data
#Q36_a - appointing (if left) - other
$Q36_a <- coalesce(data$Q36_appointing_left_4_TEXT, data$Q36_f_appointing_lef_4_TEXT)
new_data
#Q37 - percieved seniority (if still works)
$Q37 <- coalesce(data$Q37_senior_per, data$Q37_f_senior_per)
new_data
#Q38 - percieved seniority (if left)
$Q38 <- coalesce(data$Q38_senior_per_left, data$Q38_f_senior_per_le)
new_data
#Q39 - jewish
$Q39 <- coalesce(data$Q39_jewish, data$Q39_f_jewish)
new_data
#Q40 - age
$Q40 <- coalesce(data$Q40_age, data$Q40_f_age)
new_data
#Q41 - religion
$Q41 <- coalesce(data$Q41_religion, data$Q41_f_religion)
new_data
#Q42 - education
$Q42 <- coalesce(data$Q42_education, data$Q42_f_education)
new_data
#Q42_a - education - other
$Q42_a <- coalesce(data$Q42_education_999_TEXT, data$Q42_f_education_999_TEXT)
new_data
#Q43 - education field
$Q43 <- coalesce(data$Q43_education_field, data$Q43_f_education_fiel)
new_data
#Q44 - survey feelings
$Q44 <- str_c(data$Q44_feelings, data$Q44_f_feelings)
new_data
#Q45 - survey formulation
$Q45 <- coalesce(data$Q45_common_method_va, data$Q45_f_common_meth_va) new_data
Operationalization of explanatory variables
Perceptions of past professional influence
#get the Cronbach's alpha of Q4_1, Q4_2, Q4_3
cronbach(new_data[,21:23])
## $sample.size
## [1] 586
##
## $number.of.items
## [1] 3
##
## $alpha
## [1] 0.8562165
::alpha(new_data[, c("Q4_1", "Q4_2", "Q4_3")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q4_1", "Q4_2", "Q4_3")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.86 0.86 0.81 0.66 5.9 0.0082 5.1 1.3 0.65
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.84 0.86 0.87
## Duhachek 0.84 0.86 0.87
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q4_1 0.86 0.86 0.75 0.75 6.0 0.0093 NA 0.75
## Q4_2 0.79 0.79 0.65 0.65 3.7 0.0140 NA 0.65
## Q4_3 0.75 0.75 0.60 0.60 3.0 0.0164 NA 0.60
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q4_1 595 0.85 0.85 0.71 0.66 5.4 1.5
## Q4_2 592 0.89 0.89 0.81 0.74 4.8 1.5
## Q4_3 596 0.91 0.91 0.85 0.78 5.1 1.5
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Q4_1 0.02 0.05 0.05 0.06 0.25 0.31 0.26 0.37
## Q4_2 0.02 0.07 0.13 0.11 0.28 0.26 0.13 0.37
## Q4_3 0.02 0.05 0.10 0.10 0.25 0.33 0.16 0.37
$PAST_INFLUENCE <- (new_data$Q4_1 + new_data$Q4_2 + new_data$Q4_3)/3
new_data#rescale to 0-1
$PAST_INFLUENCE <- rescale(new_data$PAST_INFLUENCE , from = c(min(new_data$PAST_INFLUENCE, na.rm = TRUE), max(new_data$PAST_INFLUENCE, na.rm = TRUE)), to = c(0, 1)) new_data
CFA -Past influence
<-'past_influence =~ Q4_1 + Q4_2 + Q4_3'
past_influence_one_factor
<- cfa(past_influence_one_factor,data = new_data)
fit_model_past_influence
summary(fit_model_past_influence, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 21 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 6
Used Total
Number of observations 586 943
Model Test User Model:
Test statistic 0.000
Degrees of freedom 0
Model Test Baseline Model:
Test statistic 836.901
Degrees of freedom 3
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 1.000
Tucker-Lewis Index (TLI) 1.000
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -2792.648
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 5597.296
Bayesian (BIC) 5623.536
Sample-size adjusted Bayesian (SABIC) 5604.488
Root Mean Square Error of Approximation:
RMSEA 0.000
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.000
P-value H_0: RMSEA <= 0.050 NA
P-value H_0: RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
past_influence =~
Q4_1 1.000 1.078 0.716
Q4_2 1.183 0.064 18.556 0.000 1.276 0.833
Q4_3 1.235 0.066 18.617 0.000 1.332 0.904
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q4_1 1.103 0.076 14.437 0.000 1.103 0.487
.Q4_2 0.718 0.071 10.093 0.000 0.718 0.306
.Q4_3 0.398 0.067 5.959 0.000 0.398 0.183
past_influence 1.162 0.123 9.476 0.000 1.000 1.000
Perceptions of past meritocratic human resource management
#get the Cronbach's alpha of Q10_1, Q10_2, Q10_3
cronbach(new_data[,26:28])
## $sample.size
## [1] 558
##
## $number.of.items
## [1] 3
##
## $alpha
## [1] 0.9341711
::alpha(new_data[, c("Q10_1", "Q10_2", "Q10_3")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q10_1", "Q10_2", "Q10_3")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.93 0.93 0.91 0.83 14 0.0038 4 1.6 0.85
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.93 0.93 0.94
## Duhachek 0.93 0.93 0.94
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q10_1 0.92 0.92 0.86 0.86 12 0.0050 NA 0.86
## Q10_2 0.92 0.92 0.85 0.85 11 0.0054 NA 0.85
## Q10_3 0.88 0.88 0.78 0.78 7 0.0081 NA 0.78
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q10_1 559 0.93 0.93 0.87 0.84 4.2 1.8
## Q10_2 560 0.93 0.93 0.88 0.85 3.7 1.7
## Q10_3 559 0.96 0.96 0.94 0.90 4.0 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Q10_1 0.09 0.12 0.13 0.13 0.26 0.19 0.07 0.41
## Q10_2 0.13 0.16 0.15 0.15 0.25 0.12 0.03 0.41
## Q10_3 0.10 0.13 0.14 0.15 0.27 0.17 0.03 0.41
$PAST_MERITOCRATIC <- (new_data$Q10_1 +new_data$Q10_2 + new_data$Q10_3)/3
new_data#rescale to 0-1
$PAST_MERITOCRATIC <- rescale(new_data$PAST_MERITOCRATIC , from = c(min(new_data$PAST_MERITOCRATIC, na.rm = TRUE), max(new_data$PAST_MERITOCRATIC, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Past meritocratic
<-'past_meritocratic =~ Q10_1 + Q10_2 + Q10_3'
past_meritocratic_one_factor
<- cfa(past_meritocratic_one_factor,data = new_data)
fit_model_past_meritocratic
summary(fit_model_past_meritocratic, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 21 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 6
Used Total
Number of observations 558 943
Model Test User Model:
Test statistic 0.000
Degrees of freedom 0
Model Test Baseline Model:
Test statistic 1458.521
Degrees of freedom 3
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 1.000
Tucker-Lewis Index (TLI) 1.000
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -2553.179
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 5118.358
Bayesian (BIC) 5144.304
Sample-size adjusted Bayesian (SABIC) 5125.257
Root Mean Square Error of Approximation:
RMSEA 0.000
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.000
P-value H_0: RMSEA <= 0.050 NA
P-value H_0: RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
past_meritocratic =~
Q10_1 1.000 1.548 0.877
Q10_2 0.985 0.033 30.197 0.000 1.524 0.888
Q10_3 1.045 0.031 34.173 0.000 1.617 0.964
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q10_1 0.720 0.056 12.868 0.000 0.720 0.231
.Q10_2 0.622 0.051 12.238 0.000 0.622 0.211
.Q10_3 0.199 0.041 4.888 0.000 0.199 0.071
past_meritcrtc 2.396 0.185 12.951 0.000 1.000 1.000
Past effort
$PAST_EFFORT <- new_data$Q19 new_data
Past voice behavior
#get the Cronbach's alpha of Q22_1, Q22_2, Q22_3
cronbach(new_data[,44:46])
## $sample.size
## [1] 507
##
## $number.of.items
## [1] 3
##
## $alpha
## [1] 0.8081349
::alpha(new_data[, c("Q22_1", "Q22_2", "Q22_3")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q22_1", "Q22_2", "Q22_3")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.81 0.81 0.76 0.58 4.2 0.011 4.8 0.82 0.52
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.78 0.81 0.83
## Duhachek 0.78 0.81 0.83
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q22_1 0.68 0.68 0.52 0.52 2.1 0.0207 NA 0.52
## Q22_2 0.85 0.85 0.74 0.74 5.8 0.0097 NA 0.74
## Q22_3 0.66 0.66 0.49 0.49 1.9 0.0221 NA 0.49
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q22_1 510 0.87 0.88 0.81 0.71 4.9 0.90
## Q22_2 509 0.79 0.79 0.59 0.54 4.8 0.97
## Q22_3 507 0.89 0.89 0.83 0.72 4.8 0.98
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 miss
## Q22_1 0.00 0.02 0.02 0.27 0.43 0.25 0.46
## Q22_2 0.00 0.04 0.05 0.24 0.46 0.23 0.46
## Q22_3 0.01 0.01 0.05 0.30 0.37 0.26 0.46
$PAST_VOICE <-(new_data$Q22_1 +new_data$Q22_2 + new_data$Q22_3)/3
new_data#rescale to 0-1
$PAST_VOICE <-rescale(new_data$PAST_VOICE , from = c(min(new_data$PAST_VOICE, na.rm = TRUE), max(new_data$PAST_VOICE, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Past voice
<-'past_voice =~ Q22_1 + Q22_2 + Q22_3'
past_voice_one_factor
<- cfa(past_voice_one_factor,data = new_data)
fit_model_past_voice
summary(fit_model_past_voice, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 17 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 6
Used Total
Number of observations 507 943
Model Test User Model:
Test statistic 0.000
Degrees of freedom 0
Model Test Baseline Model:
Test statistic 591.743
Degrees of freedom 3
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 1.000
Tucker-Lewis Index (TLI) 1.000
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -1780.813
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 3573.625
Bayesian (BIC) 3598.996
Sample-size adjusted Bayesian (SABIC) 3579.952
Root Mean Square Error of Approximation:
RMSEA 0.000
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.000
P-value H_0: RMSEA <= 0.050 NA
P-value H_0: RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
past_voice =~
Q22_1 1.000 0.761 0.848
Q22_2 0.750 0.057 13.092 0.000 0.571 0.587
Q22_3 1.130 0.070 16.035 0.000 0.860 0.881
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q22_1 0.226 0.034 6.727 0.000 0.226 0.281
.Q22_2 0.621 0.043 14.575 0.000 0.621 0.656
.Q22_3 0.213 0.041 5.166 0.000 0.213 0.223
past_voice 0.578 0.057 10.101 0.000 1.000 1.000
Projected change in professional influence
$Project_influence <- new_data[,47] new_data
Projected change in meritocratic human resource management
$PROJECT_MERITOCRATIC <- new_data[,29] new_data
Perceptions of democratic backsliding
#get the Cronbach's alpha of Q16_1, Q16_2, Q16_3, Q16_4, Q16_5 (and Q15)
#recode 16_1 & 16_5. New direction: 1 - does not support legal reform, 7 - support legal reform
#define columns to reverse code
= c("Q16_1", "Q16_5")
reverse_cols
#reverse code Q2 and Q5 columns
<- 8 - new_data[ , reverse_cols]
new_data[ , reverse_cols]
#without Q15
cronbach(new_data[,34:38])
## $sample.size
## [1] 478
##
## $number.of.items
## [1] 5
##
## $alpha
## [1] 0.9648315
::alpha(new_data[, c("Q16_1", "Q16_2", "Q16_3", "Q16_4", "Q16_5")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q16_1", "Q16_2", "Q16_3", "Q16_4",
## "Q16_5")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.96 0.96 0.96 0.84 26 0.0019 3 2.1 0.84
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.96 0.96 0.97
## Duhachek 0.96 0.96 0.97
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q16_1 0.96 0.96 0.95 0.84 22 0.0025 0.0051 0.85
## Q16_2 0.95 0.95 0.94 0.83 20 0.0027 0.0029 0.82
## Q16_3 0.95 0.95 0.94 0.83 19 0.0027 0.0022 0.81
## Q16_4 0.95 0.95 0.94 0.83 19 0.0027 0.0031 0.81
## Q16_5 0.97 0.97 0.96 0.88 29 0.0018 0.0011 0.88
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q16_1 504 0.93 0.93 0.91 0.89 3.2 2.3
## Q16_2 508 0.95 0.95 0.94 0.92 2.7 2.1
## Q16_3 509 0.95 0.95 0.95 0.93 2.7 2.2
## Q16_4 505 0.95 0.95 0.95 0.93 2.8 2.2
## Q16_5 500 0.89 0.88 0.83 0.82 3.7 2.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Q16_1 0.34 0.18 0.12 0.05 0.07 0.09 0.15 0.47
## Q16_2 0.46 0.17 0.06 0.07 0.06 0.08 0.10 0.46
## Q16_3 0.48 0.15 0.06 0.06 0.06 0.08 0.11 0.46
## Q16_4 0.48 0.14 0.07 0.05 0.07 0.08 0.12 0.46
## Q16_5 0.23 0.18 0.13 0.08 0.08 0.11 0.18 0.47
$BACKSLIDING_1 <- (new_data$Q16_1 +new_data$Q16_2 + new_data$Q16_3 + new_data$Q16_4 + new_data$Q16_5)/5
new_data#rescale to 0-1
$BACKSLIDING_1 <-rescale(new_data$BACKSLIDING_1 , from = c(min(new_data$BACKSLIDING_1, na.rm = TRUE), max(new_data$BACKSLIDING_1, na.rm = TRUE)), to = c(0, 1))
new_data
#add Q15
$Q15[new_data$Q15 == 999] <- NA
new_datacronbach(new_data[,33:38])
## $sample.size
## [1] 465
##
## $number.of.items
## [1] 6
##
## $alpha
## [1] 0.9577549
::alpha(new_data[, c("Q15" ,"Q16_1", "Q16_2", "Q16_3", "Q16_4", "Q16_5")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q15", "Q16_1", "Q16_2", "Q16_3",
## "Q16_4", "Q16_5")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.96 0.96 0.96 0.82 27 0.0018 2.9 1.9 0.81
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.95 0.96 0.96
## Duhachek 0.95 0.96 0.96
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q15 0.96 0.96 0.96 0.84 26 0.0019 0.0031 0.84
## Q16_1 0.94 0.95 0.95 0.81 21 0.0022 0.0064 0.79
## Q16_2 0.94 0.95 0.95 0.81 21 0.0023 0.0045 0.80
## Q16_3 0.94 0.95 0.95 0.80 20 0.0024 0.0041 0.79
## Q16_4 0.94 0.95 0.95 0.80 20 0.0024 0.0046 0.80
## Q16_5 0.95 0.96 0.96 0.85 27 0.0017 0.0026 0.84
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q15 516 0.84 0.88 0.84 0.82 2.1 1.1
## Q16_1 504 0.93 0.93 0.92 0.90 3.2 2.3
## Q16_2 508 0.94 0.94 0.94 0.92 2.7 2.1
## Q16_3 509 0.95 0.95 0.95 0.93 2.7 2.2
## Q16_4 505 0.95 0.95 0.94 0.93 2.8 2.2
## Q16_5 500 0.88 0.87 0.83 0.82 3.7 2.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Q15 0.36 0.34 0.12 0.17 0.00 0.00 0.00 0.45
## Q16_1 0.34 0.18 0.12 0.05 0.07 0.09 0.15 0.47
## Q16_2 0.46 0.17 0.06 0.07 0.06 0.08 0.10 0.46
## Q16_3 0.48 0.15 0.06 0.06 0.06 0.08 0.11 0.46
## Q16_4 0.48 0.14 0.07 0.05 0.07 0.08 0.12 0.46
## Q16_5 0.23 0.18 0.13 0.08 0.08 0.11 0.18 0.47
$BACKSLIDING_2 <- (new_data$Q16_1 +new_data$Q16_2 + new_data$Q16_3 + new_data$Q16_4 + new_data$Q16_5 + new_data$Q15)/6
new_data
#rescale to 0-1
$BACKSLIDING_2 <-rescale(new_data$BACKSLIDING_2 , from = c(min(new_data$BACKSLIDING_2, na.rm = TRUE), max(new_data$BACKSLIDING_2, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Democratic backsliding
#BACKSLIDING_1
<-'backsliding =~ Q16_1 + Q16_2 + Q16_3 + Q16_4 + Q16_5'
backsliding_one_factor
<- cfa(backsliding_one_factor,data = new_data)
fit_model_backsliding
summary(fit_model_backsliding, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 34 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 10
Used Total
Number of observations 478 943
Model Test User Model:
Test statistic 38.323
Degrees of freedom 5
P-value (Chi-square) 0.000
Model Test Baseline Model:
Test statistic 3128.946
Degrees of freedom 10
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.989
Tucker-Lewis Index (TLI) 0.979
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3730.229
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 7480.458
Bayesian (BIC) 7522.154
Sample-size adjusted Bayesian (SABIC) 7490.415
Root Mean Square Error of Approximation:
RMSEA 0.118
90 Percent confidence interval - lower 0.085
90 Percent confidence interval - upper 0.154
P-value H_0: RMSEA <= 0.050 0.001
P-value H_0: RMSEA >= 0.080 0.970
Standardized Root Mean Square Residual:
SRMR 0.016
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
backsliding =~
Q16_1 1.000 2.017 0.896
Q16_2 1.003 0.028 35.376 0.000 2.022 0.944
Q16_3 1.025 0.028 37.135 0.000 2.067 0.959
Q16_4 1.060 0.028 37.394 0.000 2.138 0.961
Q16_5 0.923 0.035 26.192 0.000 1.862 0.836
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q16_1 0.999 0.073 13.769 0.000 0.999 0.197
.Q16_2 0.502 0.042 11.994 0.000 0.502 0.109
.Q16_3 0.374 0.035 10.545 0.000 0.374 0.080
.Q16_4 0.378 0.037 10.264 0.000 0.378 0.076
.Q16_5 1.492 0.103 14.504 0.000 1.492 0.301
backsliding 4.068 0.323 12.595 0.000 1.000 1.000
#BACKSLIDING_2
<-'backsliding =~ Q16_1 + Q16_2 + Q16_3 + Q16_4 + Q16_5 + Q15'
backsliding_one_factor
<- cfa(backsliding_one_factor,data = new_data)
fit_model_backsliding
summary(fit_model_backsliding, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 32 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 12
Used Total
Number of observations 465 943
Model Test User Model:
Test statistic 74.752
Degrees of freedom 9
P-value (Chi-square) 0.000
Model Test Baseline Model:
Test statistic 3627.080
Degrees of freedom 15
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.982
Tucker-Lewis Index (TLI) 0.970
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -4060.658
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 8145.316
Bayesian (BIC) 8195.021
Sample-size adjusted Bayesian (SABIC) 8156.936
Root Mean Square Error of Approximation:
RMSEA 0.125
90 Percent confidence interval - lower 0.100
90 Percent confidence interval - upper 0.152
P-value H_0: RMSEA <= 0.050 0.000
P-value H_0: RMSEA >= 0.080 0.998
Standardized Root Mean Square Residual:
SRMR 0.018
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
backsliding =~
Q16_1 1.000 2.033 0.901
Q16_2 0.998 0.028 35.411 0.000 2.030 0.942
Q16_3 1.024 0.027 37.702 0.000 2.081 0.960
Q16_4 1.057 0.028 37.825 0.000 2.148 0.961
Q16_5 0.914 0.035 26.131 0.000 1.858 0.836
Q15 0.444 0.017 25.941 0.000 0.904 0.833
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q16_1 0.955 0.070 13.601 0.000 0.955 0.188
.Q16_2 0.525 0.043 12.211 0.000 0.525 0.113
.Q16_3 0.365 0.034 10.597 0.000 0.365 0.078
.Q16_4 0.378 0.036 10.479 0.000 0.378 0.076
.Q16_5 1.488 0.104 14.373 0.000 1.488 0.301
.Q15 0.360 0.025 14.392 0.000 0.360 0.306
backsliding 4.133 0.329 12.551 0.000 1.000 1.000
Public Service Motivation (PSM)
cronbach(new_data[,54:57])
## $sample.size
## [1] 470
##
## $number.of.items
## [1] 4
##
## $alpha
## [1] 0.7566057
::alpha(new_data[, c("Q28_1", "Q28_2", "Q28_3", "Q28_4")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q28_1", "Q28_2", "Q28_3", "Q28_4")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.75 0.76 0.72 0.44 3.1 0.012 5.4 1.1 0.45
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.73 0.75 0.78
## Duhachek 0.73 0.75 0.78
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q28_1 0.76 0.76 0.69 0.51 3.2 0.014 0.0098 0.48
## Q28_2 0.69 0.68 0.63 0.42 2.2 0.015 0.0329 0.34
## Q28_3 0.65 0.68 0.59 0.41 2.1 0.018 0.0043 0.44
## Q28_4 0.66 0.67 0.59 0.41 2.1 0.018 0.0098 0.45
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q28_1 479 0.60 0.69 0.51 0.44 6.5 0.9
## Q28_2 479 0.78 0.78 0.66 0.57 5.5 1.5
## Q28_3 477 0.82 0.79 0.71 0.63 5.0 1.5
## Q28_4 481 0.83 0.79 0.71 0.62 4.6 1.7
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## Q28_1 0.00 0.01 0.01 0.02 0.08 0.24 0.64 0.49
## Q28_2 0.02 0.06 0.03 0.09 0.20 0.30 0.30 0.49
## Q28_3 0.02 0.06 0.08 0.18 0.25 0.22 0.20 0.49
## Q28_4 0.04 0.10 0.10 0.22 0.21 0.19 0.14 0.49
$PSM <- (new_data$Q28_1 + new_data$Q28_2 + new_data$Q28_3 + new_data$Q28_4)/4
new_data
#rescale to 0-1
$PSM <-rescale(new_data$PSM , from = c(min(new_data$PSM, na.rm = TRUE), max(new_data$PSM, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - PSM
<-'sabotage =~ Q28_1 + Q28_2 + Q28_3 + Q28_4'
PSM_one_factor
<- cfa(PSM_one_factor,data = new_data)
fit_model_PSM
summary(fit_model_PSM, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 30 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 8
Used Total
Number of observations 470 943
Model Test User Model:
Test statistic 40.218
Degrees of freedom 2
P-value (Chi-square) 0.000
Model Test Baseline Model:
Test statistic 507.773
Degrees of freedom 6
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.924
Tucker-Lewis Index (TLI) 0.772
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3020.921
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 6057.843
Bayesian (BIC) 6091.065
Sample-size adjusted Bayesian (SABIC) 6065.674
Root Mean Square Error of Approximation:
RMSEA 0.202
90 Percent confidence interval - lower 0.150
90 Percent confidence interval - upper 0.258
P-value H_0: RMSEA <= 0.050 0.000
P-value H_0: RMSEA >= 0.080 1.000
Standardized Root Mean Square Residual:
SRMR 0.059
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
sabotage =~
Q28_1 1.000 0.418 0.461
Q28_2 2.295 0.277 8.277 0.000 0.959 0.629
Q28_3 2.846 0.321 8.861 0.000 1.188 0.779
Q28_4 3.085 0.348 8.860 0.000 1.288 0.778
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q28_1 0.644 0.045 14.270 0.000 0.644 0.787
.Q28_2 1.403 0.111 12.677 0.000 1.403 0.604
.Q28_3 0.917 0.106 8.643 0.000 0.917 0.394
.Q28_4 1.086 0.125 8.685 0.000 1.086 0.395
sabotage 0.174 0.037 4.732 0.000 1.000 1.000
Projected exertion of effort at work
$PROJECT_EFFORT<- new_data$Q21 new_data
Projected voice behavior
$PROJECT_VOICE <- new_data$Q5 new_data
Intentions to exit the civil service
$EXIT_INTENT_1 <- new_data$Q25
new_data$EXIT_INTENT_2 <- new_data$Q26 new_data
Scenario - sabotage
#get the Cronbach's alpha of Q29_1, Q29_2, Q29_3, Q29_4
cronbach(new_data[,58:61])
## $sample.size
## [1] 458
##
## $number.of.items
## [1] 4
##
## $alpha
## [1] 0.7176125
::alpha(new_data[, c("Q29_1", "Q29_2", "Q29_3", "Q29_4")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q29_1", "Q29_2", "Q29_3", "Q29_4")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.72 0.72 0.67 0.39 2.6 0.015 2.8 0.87 0.38
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.69 0.72 0.75
## Duhachek 0.69 0.72 0.75
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q29_1 0.62 0.62 0.52 0.35 1.6 0.022 0.00054 0.35
## Q29_2 0.65 0.65 0.55 0.38 1.9 0.020 0.00093 0.39
## Q29_3 0.69 0.69 0.61 0.43 2.2 0.018 0.00606 0.39
## Q29_4 0.68 0.68 0.60 0.42 2.2 0.018 0.00885 0.41
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q29_1 469 0.78 0.78 0.69 0.58 2.7 1.1
## Q29_2 469 0.75 0.75 0.63 0.53 3.0 1.2
## Q29_3 467 0.71 0.71 0.54 0.46 2.5 1.2
## Q29_4 471 0.72 0.72 0.55 0.47 2.8 1.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 miss
## Q29_1 0.13 0.32 0.30 0.20 0.06 0.5
## Q29_2 0.11 0.25 0.27 0.25 0.11 0.5
## Q29_3 0.25 0.30 0.24 0.14 0.07 0.5
## Q29_4 0.15 0.26 0.27 0.25 0.07 0.5
$RESPONSE_SABOTAGE <- (new_data$Q29_1 +new_data$Q29_2 + new_data$Q29_3 + new_data$Q29_4)/4
new_data
#rescale to 0-1
$RESPONSE_SABOTAGE <-rescale(new_data$RESPONSE_SABOTAGE , from = c(min(new_data$RESPONSE_SABOTAGE, na.rm = TRUE), max(new_data$RESPONSE_SABOTAGE, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Sabotage (scenario)
<-'sabotage =~ Q29_1 + Q29_2 + Q29_3 + Q29_4'
sabotage_one_factor
<- cfa(sabotage_one_factor,data = new_data)
fit_model_sabotage
summary(fit_model_sabotage, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 21 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 8
Used Total
Number of observations 458 943
Model Test User Model:
Test statistic 5.275
Degrees of freedom 2
P-value (Chi-square) 0.072
Model Test Baseline Model:
Test statistic 350.424
Degrees of freedom 6
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.990
Tucker-Lewis Index (TLI) 0.971
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -2698.965
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 5413.929
Bayesian (BIC) 5446.944
Sample-size adjusted Bayesian (SABIC) 5421.555
Root Mean Square Error of Approximation:
RMSEA 0.060
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.125
P-value H_0: RMSEA <= 0.050 0.308
P-value H_0: RMSEA >= 0.080 0.366
Standardized Root Mean Square Residual:
SRMR 0.022
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
sabotage =~
Q29_1 1.000 0.827 0.757
Q29_2 0.961 0.093 10.282 0.000 0.795 0.672
Q29_3 0.779 0.086 9.059 0.000 0.645 0.536
Q29_4 0.760 0.083 9.109 0.000 0.629 0.540
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q29_1 0.509 0.065 7.783 0.000 0.509 0.427
.Q29_2 0.769 0.074 10.405 0.000 0.769 0.549
.Q29_3 1.031 0.079 12.975 0.000 1.031 0.713
.Q29_4 0.961 0.074 12.928 0.000 0.961 0.709
sabotage 0.684 0.091 7.542 0.000 1.000 1.000
Scenario - voice
#get the Cronbach's alpha of Q29_5, Q29_6, Q29_7
cronbach(new_data[,62:64])
## $sample.size
## [1] 461
##
## $number.of.items
## [1] 3
##
## $alpha
## [1] 0.8398037
::alpha(new_data[, c("Q29_5", "Q29_6", "Q29_7")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q29_5", "Q29_6", "Q29_7")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.84 0.84 0.78 0.64 5.3 0.009 3.7 0.91 0.63
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.82 0.84 0.86
## Duhachek 0.82 0.84 0.86
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q29_5 0.80 0.80 0.67 0.67 4.1 0.013 NA 0.67
## Q29_6 0.77 0.77 0.63 0.63 3.4 0.015 NA 0.63
## Q29_7 0.76 0.76 0.62 0.62 3.2 0.015 NA 0.62
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q29_5 472 0.86 0.86 0.74 0.68 3.7 1.1
## Q29_6 468 0.88 0.88 0.78 0.71 3.5 1.1
## Q29_7 475 0.88 0.88 0.79 0.73 3.8 1.0
##
## Non missing response frequency for each item
## 1 2 3 4 5 miss
## Q29_5 0.04 0.11 0.20 0.44 0.20 0.5
## Q29_6 0.04 0.12 0.26 0.39 0.18 0.5
## Q29_7 0.03 0.07 0.21 0.43 0.26 0.5
$RESPONSE_VOICE <- (new_data$Q29_5 +new_data$Q29_6 + new_data$Q29_7)/3
new_data
#rescale to 0-1
$RESPONSE_VOICE <-rescale(new_data$RESPONSE_VOICE , from = c(min(new_data$RESPONSE_VOICE, na.rm = TRUE), max(new_data$RESPONSE_VOICE, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Voice (scenario)
<-'voice =~ Q29_5 + Q29_6 + Q29_7'
voice_one_factor
<- cfa(voice_one_factor,data = new_data)
fit_model_voice
summary(fit_model_voice, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 15 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 6
Used Total
Number of observations 461 943
Model Test User Model:
Test statistic 0.000
Degrees of freedom 0
Model Test Baseline Model:
Test statistic 560.192
Degrees of freedom 3
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 1.000
Tucker-Lewis Index (TLI) 1.000
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -1733.753
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 3479.506
Bayesian (BIC) 3504.307
Sample-size adjusted Bayesian (SABIC) 3485.264
Root Mean Square Error of Approximation:
RMSEA 0.000
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.000
P-value H_0: RMSEA <= 0.050 NA
P-value H_0: RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
voice =~
Q29_5 1.000 0.793 0.756
Q29_6 1.078 0.068 15.757 0.000 0.855 0.806
Q29_7 1.057 0.067 15.862 0.000 0.838 0.833
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q29_5 0.470 0.042 11.104 0.000 0.470 0.428
.Q29_6 0.394 0.042 9.285 0.000 0.394 0.350
.Q29_7 0.311 0.038 8.135 0.000 0.311 0.307
voice 0.628 0.071 8.791 0.000 1.000 1.000
Scenario - exit
#get the Cronbach's alpha of Q29_8, Q29_9
cronbach(new_data[,65:66])
## $sample.size
## [1] 462
##
## $number.of.items
## [1] 2
##
## $alpha
## [1] 0.9053904
::alpha(new_data[, c("Q29_8", "Q29_9")])
psych##
## Reliability analysis
## Call: psych::alpha(x = new_data[, c("Q29_8", "Q29_9")])
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.91 0.91 0.83 0.83 9.8 0.0061 2.1 0.94 0.83
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.89 0.91 0.92
## Duhachek 0.89 0.91 0.92
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Q29_8 0.80 0.83 0.69 0.83 4.9 NA 0 0.83
## Q29_9 0.87 0.83 0.69 0.83 4.9 NA 0 0.83
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## Q29_8 469 0.95 0.96 0.87 0.83 2.1 0.97
## Q29_9 470 0.96 0.96 0.87 0.83 2.1 1.01
##
## Non missing response frequency for each item
## 1 2 3 4 5 miss
## Q29_8 0.28 0.40 0.23 0.08 0.01 0.5
## Q29_9 0.34 0.34 0.22 0.09 0.01 0.5
$RESPONSE_EXIT <- (new_data$Q29_8 +new_data$Q29_9)/2
new_data
#rescale to 0-1
$RESPONSE_EXIT <-rescale(new_data$RESPONSE_EXIT , from = c(min(new_data$RESPONSE_EXIT, na.rm = TRUE), max(new_data$RESPONSE_EXIT, na.rm = TRUE)), to = c(0, 1)) new_data
CFA - Exit (scenario)
<-'exit =~ Q29_8 + Q29_9'
exit_one_factor
<- cfa(exit_one_factor,data = new_data) fit_model_exit
Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING:
Could not compute standard errors! The information matrix could
not be inverted. This may be a symptom that the model is not
identified.
summary(fit_model_exit, standardized=TRUE, fit.measures=TRUE)
lavaan 0.6.15 ended normally after 14 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 4
Used Total
Number of observations 462 943
Model Test User Model:
Test statistic NA
Degrees of freedom -1
P-value (Unknown) NA
Model Test Baseline Model:
Test statistic NA
Degrees of freedom NA
P-value NA
User Model versus Baseline Model:
Comparative Fit Index (CFI) NA
Tucker-Lewis Index (TLI) NA
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -1032.344
Loglikelihood unrestricted model (H1) NA
Akaike (AIC) 2072.689
Bayesian (BIC) 2089.231
Sample-size adjusted Bayesian (SABIC) 2076.536
Root Mean Square Error of Approximation:
RMSEA 0.000
90 Percent confidence interval - lower NA
90 Percent confidence interval - upper NA
P-value H_0: RMSEA <= 0.050 NA
P-value H_0: RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.000
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
exit =~
Q29_8 1.000 0.942 0.977
Q29_9 0.912 NA 0.858 0.848
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Q29_8 0.043 NA 0.043 0.046
.Q29_9 0.288 NA 0.288 0.281
exit 0.887 NA 1.000 1.000
Control Variables
#ranking
$ranking <- coalesce(new_data$Q37, new_data$Q38)
new_data$ranking <- as.factor(new_data$ranking)
new_datalevels(new_data$ranking) <- c("����", "������", "����", "���� ����")
#position_type
$position_type <- coalesce(new_data$Q35, new_data$Q36)
new_data$position_type <- as.factor(new_data$position_type)
new_datalevels(new_data$position_type) <- c("���� ����", "����� �����", "���� ����", "���")
#tenure
$tenure <- coalesce(new_data$Q33, new_data$Q34)
new_data$tenure <- as.factor(new_data$tenure)
new_datalevels(new_data$tenure) <- c("���� ����", "��� �� ��� ����", "�� �� ��� ����", "��� ���� �� ����� ���", "����� ������ ����")
#ministry
<- read.xlsx("units_manually_coded.xlsx")
ministry_text_to_fill $ministry <- coalesce(new_data$Q31, new_data$Q32) new_data
Warning: `..1` and `..2` have conflicting value labels.
i Labels for these values will be taken from `..1`.
x Values: 15
for (response_id_new_data in 1:length(new_data$ResponseId)){
for (response_id_ministry_to_fill in 1:length(ministry_text_to_fill$ResponseId)){
if (ministry_text_to_fill$ResponseId[response_id_ministry_to_fill] == new_data$ResponseId[response_id_new_data] & is.na(ministry_text_to_fill$code[response_id_ministry_to_fill]) == FALSE){
$ministry[response_id_new_data] <- ministry_text_to_fill$code[response_id_ministry_to_fill]
new_data
}
}
}
$ministry <- as.factor(new_data$ministry)
new_datalevels(new_data$ministry) <- levels(new_data$ministry) <- c("������", "������", "������ �����", "����", "����� ������", "������", "���� ������", "���", "�����", "������", "�����", "��� ����������", "������", "����� ������� �����", "���� ������", "����", "��� ������", "���� ��������� �������", "������ �����", "������ ��", "������", "������", "������", "����� ������", "���", "���� ������", "���� ������", "���� ������")
$age <- new_data$Q40
new_data$gender <- new_data$Q1_gender
new_data$religiosity <- new_data$Q41
new_data$nationality <- new_data$Q39
new_data$education <- new_data$Q42 new_data