This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
plot(cars)
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
library(lavaan)
library(semPlot)
library(haven)
library(dplyr)
library(caTools) # For Linear regression
library(car) # To check multicollinearity
library(quantmod)
library(MASS)
library(haven)
data <- read_sav("/Users/mj/Library/CloudStorage/Dropbox/Chat GPT and User Adaptation/ChatGPT_cleaned.sav")
data
model 2 or model 3 - KU (Know and Understand) items are: know wha AI and recall the definitions, how to use AI applications, can compare differences between AI concepts. - Test Chronbach’s alpha of the three items and check if it makes sense to delete the second item.
#Testing chronbach's alpha of Ng_K
# Specify mediation model with MH expert, objective, accurate only
model_3<-
'
# Direct effects of IVs on DV
factcheck_A ~ c1*Lit_Pin_TK + c2*Lit_Pin_SK + c3*Lit_Ng_SE + c4*Lit_Ng_KU + c5*Lit_Ng_EC
# Direct effects of IVs on first-level mediators
MH_expert ~ a3_1*Lit_Pin_TK + a3_2*Lit_Pin_SK + a3_3*Lit_Ng_SE + a3_4*Lit_Ng_KU + a3_5*Lit_Ng_EC
MH_objective ~ a4_1*Lit_Pin_TK + a4_2*Lit_Pin_SK + a4_3*Lit_Ng_SE + a4_4*Lit_Ng_KU + a4_5*Lit_Ng_EC
MH_accurate ~ a5_1*Lit_Pin_TK + a5_2*Lit_Pin_SK + a5_3*Lit_Ng_SE + a5_4*Lit_Ng_KU + a5_5*Lit_Ng_EC
# Direct effects of first-level mediators on second-level mediators
credible ~ b1_3*MH_expert + b1_4*MH_objective + b1_5*MH_accurate
trust ~ b2_3*MH_expert + b2_4*MH_objective + b2_5*MH_accurate
# Direct effects of second-level mediators on DV
factcheck_A ~ d1*credible + d2*trust
# Indirect effects via first and second-level mediators
SE_expert_credible := a3_3*b1_3*d1
SE_obj_credible := a4_3*b1_4*d1
SE_acc_credible := a5_3*b1_5*d1
EC_expert_credible := a3_5*b1_3*d1
EC_obj_credible := a4_5*b1_3*d1
EC_acc_credible := a5_5*b1_3*d1
KU_expert_credible := a3_4*b1_3*d1
#Estimating covariance and residuals
#Estimating variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_TK
Lit_Pin_SK~~Lit_Pin_SK
Lit_Ng_SE~~Lit_Ng_SE
Lit_Ng_KU~~Lit_Ng_KU
Lit_Ng_EC~~Lit_Ng_EC
#Estimating co-variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_SK
Lit_Pin_TK~~Lit_Ng_SE
Lit_Pin_TK~~Lit_Ng_KU
Lit_Pin_TK~~Lit_Ng_EC
Lit_Pin_SK~~Lit_Ng_SE
Lit_Pin_SK~~Lit_Ng_KU
Lit_Pin_SK~~Lit_Ng_EC
Lit_Ng_SE~~Lit_Ng_KU
Lit_Ng_SE~~Lit_Ng_EC
Lit_Ng_KU~~Lit_Ng_EC
#Estimating the residual variances (e1,…) for endogenous variables (Ms and Ys)
MH_expert~~MH_expert
MH_objective~~MH_objective
MH_accurate~~MH_accurate
credible~~credible
trust~~trust
factcheck_A~~factcheck_A
#Estimating the covariances of residuals for Ms
MH_expert~~MH_objective
MH_expert~~MH_accurate
MH_objective~~MH_accurate
credible~~trust
'
# Add bootstrapping to the lavaan function call
result.model_3 <- lavaan(model_3, data = data, se = "boot", bootstrap = 5000)
# Display the results with the specified options
summary(result.model_3, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
lavaan 0.6-18 ended normally after 43 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 53
Used Total
Number of observations 223 225
Model Test User Model:
Test statistic 25.538
Degrees of freedom 13
P-value (Chi-square) 0.020
Model Test Baseline Model:
Test statistic 1437.268
Degrees of freedom 55
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.991
Tucker-Lewis Index (TLI) 0.962
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3342.687
Loglikelihood unrestricted model (H1) -3329.918
Akaike (AIC) 6791.374
Bayesian (BIC) 6971.954
Sample-size adjusted Bayesian (SABIC) 6803.990
Root Mean Square Error of Approximation:
RMSEA 0.066
90 Percent confidence interval - lower 0.026
90 Percent confidence interval - upper 0.103
P-value H_0: RMSEA <= 0.050 0.220
P-value H_0: RMSEA >= 0.080 0.294
Standardized Root Mean Square Residual:
SRMR 0.036
Parameter Estimates:
Standard errors Bootstrap
Number of requested bootstrap draws 5000
Number of successful bootstrap draws 5000
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
factcheck_A ~
Lt_P_TK (c1) -0.125 0.107 -1.168 0.243 -0.125 -0.131
Lt_P_SK (c2) 0.257 0.096 2.669 0.008 0.257 0.265
Lt_N_SE (c3) 0.111 0.099 1.126 0.260 0.111 0.100
Lt_N_KU (c4) 0.030 0.117 0.254 0.800 0.030 0.021
Lt_N_EC (c5) 0.042 0.106 0.399 0.690 0.042 0.040
MH_expert ~
Lt_P_TK (a3_1) -0.088 0.117 -0.754 0.451 -0.088 -0.085
Lt_P_SK (a3_2) 0.016 0.113 0.140 0.888 0.016 0.015
Lt_N_SE (a3_3) 0.250 0.102 2.447 0.014 0.250 0.209
Lt_N_KU (a3_4) -0.373 0.132 -2.822 0.005 -0.373 -0.246
Lt_N_EC (a3_5) 0.438 0.106 4.112 0.000 0.438 0.390
MH_objective ~
Lt_P_TK (a4_1) -0.072 0.145 -0.496 0.620 -0.072 -0.061
Lt_P_SK (a4_2) -0.084 0.146 -0.579 0.563 -0.084 -0.070
Lt_N_SE (a4_3) 0.272 0.117 2.318 0.020 0.272 0.197
Lt_N_KU (a4_4) -0.209 0.157 -1.335 0.182 -0.209 -0.120
Lt_N_EC (a4_5) 0.429 0.127 3.381 0.001 0.429 0.331
MH_accurate ~
Lt_P_TK (a5_1) -0.162 0.126 -1.289 0.197 -0.162 -0.153
Lt_P_SK (a5_2) -0.048 0.126 -0.379 0.705 -0.048 -0.045
Lt_N_SE (a5_3) 0.265 0.108 2.465 0.014 0.265 0.216
Lt_N_KU (a5_4) -0.241 0.135 -1.789 0.074 -0.241 -0.155
Lt_N_EC (a5_5) 0.482 0.111 4.362 0.000 0.482 0.418
credible ~
MH_xprt (b1_3) 0.364 0.050 7.250 0.000 0.364 0.418
MH_bjct (b1_4) 0.066 0.042 1.559 0.119 0.066 0.087
MH_ccrt (b1_5) 0.345 0.051 6.797 0.000 0.345 0.407
trust ~
MH_xprt (b2_3) 0.304 0.056 5.452 0.000 0.304 0.386
MH_bjct (b2_4) 0.033 0.040 0.813 0.416 0.033 0.048
MH_ccrt (b2_5) 0.293 0.061 4.817 0.000 0.293 0.382
factcheck_A ~
credibl (d1) -0.403 0.138 -2.920 0.004 -0.403 -0.378
trust (d2) 0.041 0.149 0.276 0.782 0.041 0.035
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Lit_Pin_TK ~~
Lit_Pin_SK 1.468 0.140 10.498 0.000 1.468 0.820
Lit_Ng_SE 0.719 0.123 5.846 0.000 0.719 0.458
Lit_Ng_KU 0.721 0.095 7.556 0.000 0.721 0.583
Lit_Ng_EC 0.912 0.134 6.812 0.000 0.912 0.547
Lit_Pin_SK ~~
Lit_Ng_SE 0.625 0.113 5.513 0.000 0.625 0.405
Lit_Ng_KU 0.653 0.083 7.920 0.000 0.653 0.536
Lit_Ng_EC 0.782 0.121 6.468 0.000 0.782 0.477
Lit_Ng_SE ~~
Lit_Ng_KU 0.565 0.075 7.530 0.000 0.565 0.529
Lit_Ng_EC 0.816 0.132 6.181 0.000 0.816 0.567
Lit_Ng_KU ~~
Lit_Ng_EC 0.745 0.082 9.092 0.000 0.745 0.656
.MH_expert ~~
.MH_objective 0.961 0.156 6.147 0.000 0.961 0.501
.MH_accurate 0.978 0.155 6.317 0.000 0.978 0.588
.MH_objective ~~
.MH_accurate 1.089 0.138 7.911 0.000 1.089 0.561
.credible ~~
.trust 0.281 0.048 5.839 0.000 0.281 0.527
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Lit_Pin_TK 1.818 0.157 11.594 0.000 1.818 1.000
Lit_Pin_SK 1.761 0.139 12.645 0.000 1.761 1.000
Lit_Ng_SE 1.354 0.151 8.991 0.000 1.354 1.000
Lit_Ng_KU 0.843 0.071 11.918 0.000 0.843 1.000
Lit_Ng_EC 1.529 0.135 11.291 0.000 1.529 1.000
.MH_expert 1.644 0.190 8.669 0.000 1.644 0.851
.MH_objective 2.242 0.179 12.498 0.000 2.242 0.873
.MH_accurate 1.683 0.159 10.596 0.000 1.683 0.827
.credible 0.506 0.054 9.296 0.000 0.506 0.345
.trust 0.560 0.058 9.737 0.000 0.560 0.468
.factcheck_A 1.396 0.124 11.255 0.000 1.396 0.841
R-Square:
Estimate
MH_expert 0.149
MH_objective 0.127
MH_accurate 0.173
credible 0.655
trust 0.532
factcheck_A 0.159
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
SE_exprt_crdbl -0.037 0.022 -1.639 0.101 -0.037 -0.033
SE_obj_credibl -0.007 0.007 -1.023 0.306 -0.007 -0.007
SE_acc_credibl -0.037 0.022 -1.711 0.087 -0.037 -0.033
EC_exprt_crdbl -0.064 0.029 -2.205 0.027 -0.064 -0.062
EC_obj_credibl -0.063 0.029 -2.203 0.028 -0.063 -0.052
EC_acc_credibl -0.071 0.030 -2.382 0.017 -0.071 -0.066
KU_exprt_crdbl 0.055 0.026 2.075 0.038 0.055 0.039
# Specify mediation model with all five MH (efficient, useful, expert, objective, and accurate)
model_2<-
'
# Direct effects of IVs on DV
factcheck_A ~ c1*Lit_Pin_TK + c2*Lit_Pin_SK + c3*Lit_Ng_SE + c4*Lit_Ng_KU + c5*Lit_Ng_EC
# Direct effects of IVs on first-level mediators
MH_efficient ~ a1_1*Lit_Pin_TK + a1_2*Lit_Pin_SK + a1_3*Lit_Ng_SE + a1_4*Lit_Ng_KU + a1_5*Lit_Ng_EC
MH_useful ~ a2_1*Lit_Pin_TK + a2_2*Lit_Pin_SK + a2_3*Lit_Ng_SE + a2_4*Lit_Ng_KU + a2_5*Lit_Ng_EC
MH_expert ~ a3_1*Lit_Pin_TK + a3_2*Lit_Pin_SK + a3_3*Lit_Ng_SE + a3_4*Lit_Ng_KU + a3_5*Lit_Ng_EC
MH_objective ~ a4_1*Lit_Pin_TK + a4_2*Lit_Pin_SK + a4_3*Lit_Ng_SE + a4_4*Lit_Ng_KU + a4_5*Lit_Ng_EC
MH_accurate ~ a5_1*Lit_Pin_TK + a5_2*Lit_Pin_SK + a5_3*Lit_Ng_SE + a5_4*Lit_Ng_KU + a5_5*Lit_Ng_EC
# Direct effects of first-level mediators on second-level mediators
credible ~ b1_1*MH_efficient + b1_2*MH_useful + b1_3*MH_expert + b1_4*MH_objective + b1_5*MH_accurate
trust ~ b2_1*MH_efficient + b2_2*MH_useful + b2_3*MH_expert + b2_4*MH_objective + b2_5*MH_accurate
# Direct effects of second-level mediators on DV
factcheck_A ~ d1*credible + d2*trust
# Indirect effects via first and second-level mediators
SE_expert_credible := a3_3*b1_3*d1
SE_obj_credible := a4_3*b1_4*d1
SE_acc_credible := a5_3*b1_5*d1
EC_expert_credible := a3_5*b1_3*d1
EC_obj_credible := a4_5*b1_3*d1
EC_acc_credible := a5_5*b1_3*d1
KU_expert_credible := a3_4*b1_3*d1
#Estimating covariance and residuals
#Estimating variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_TK
Lit_Pin_SK~~Lit_Pin_SK
Lit_Ng_SE~~Lit_Ng_SE
Lit_Ng_KU~~Lit_Ng_KU
Lit_Ng_EC~~Lit_Ng_EC
#Estimating co-variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_SK
Lit_Pin_TK~~Lit_Ng_SE
Lit_Pin_TK~~Lit_Ng_KU
Lit_Pin_TK~~Lit_Ng_EC
Lit_Pin_SK~~Lit_Ng_SE
Lit_Pin_SK~~Lit_Ng_KU
Lit_Pin_SK~~Lit_Ng_EC
Lit_Ng_SE~~Lit_Ng_KU
Lit_Ng_SE~~Lit_Ng_EC
Lit_Ng_KU~~Lit_Ng_EC
#Estimating the residual variances (e1,…) for endogenous variables (Ms and Ys)
MH_efficient~~MH_efficient
MH_useful~~MH_useful
MH_expert~~MH_expert
MH_objective~~MH_objective
MH_accurate~~MH_accurate
credible~~credible
trust~~trust
factcheck_A~~factcheck_A
#Estimating the covariances of residuals for Ms
MH_efficient~~MH_useful
MH_efficient~~MH_expert
MH_efficient~~MH_objective
MH_efficient~~MH_accurate
MH_useful~~MH_expert
MH_useful~~MH_objective
MH_useful~~MH_accurate
MH_expert~~MH_objective
MH_expert~~MH_accurate
MH_objective~~MH_accurate
credible~~trust
'
# Add bootstrapping to the lavaan function call
result.model_2 <- lavaan(model_2, data = data, se = "boot", bootstrap = 5000)
# Display the results with the specified options
summary(result.model_2, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
lavaan 0.6-18 ended normally after 58 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 76
Used Total
Number of observations 223 225
Model Test User Model:
Test statistic 20.784
Degrees of freedom 15
P-value (Chi-square) 0.144
Model Test Baseline Model:
Test statistic 1802.248
Degrees of freedom 78
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.997
Tucker-Lewis Index (TLI) 0.983
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -3729.368
Loglikelihood unrestricted model (H1) -3718.976
Akaike (AIC) 7610.736
Bayesian (BIC) 7869.681
Sample-size adjusted Bayesian (SABIC) 7628.827
Root Mean Square Error of Approximation:
RMSEA 0.042
90 Percent confidence interval - lower 0.000
90 Percent confidence interval - upper 0.081
P-value H_0: RMSEA <= 0.050 0.590
P-value H_0: RMSEA >= 0.080 0.055
Standardized Root Mean Square Residual:
SRMR 0.023
Parameter Estimates:
Standard errors Bootstrap
Number of requested bootstrap draws 5000
Number of successful bootstrap draws 5000
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
factcheck_A ~
Lt_P_TK (c1) -0.125 0.109 -1.153 0.249 -0.125 -0.131
Lt_P_SK (c2) 0.257 0.098 2.634 0.008 0.257 0.265
Lt_N_SE (c3) 0.111 0.097 1.150 0.250 0.111 0.100
Lt_N_KU (c4) 0.030 0.116 0.256 0.798 0.030 0.021
Lt_N_EC (c5) 0.042 0.109 0.387 0.699 0.042 0.041
MH_efficient ~
Lt_P_TK (a1_1) -0.065 0.079 -0.819 0.413 -0.065 -0.109
Lt_P_SK (a1_2) 0.025 0.083 0.303 0.762 0.025 0.042
Lt_N_SE (a1_3) 0.131 0.052 2.535 0.011 0.131 0.190
Lt_N_KU (a1_4) -0.013 0.106 -0.123 0.902 -0.013 -0.015
Lt_N_EC (a1_5) 0.099 0.074 1.335 0.182 0.099 0.152
MH_useful ~
Lt_P_TK (a2_1) -0.017 0.085 -0.203 0.839 -0.017 -0.024
Lt_P_SK (a2_2) -0.070 0.090 -0.778 0.437 -0.070 -0.098
Lt_N_SE (a2_3) 0.240 0.087 2.763 0.006 0.240 0.295
Lt_N_KU (a2_4) -0.100 0.105 -0.946 0.344 -0.100 -0.097
Lt_N_EC (a2_5) 0.241 0.088 2.718 0.007 0.241 0.314
MH_expert ~
Lt_P_TK (a3_1) -0.088 0.121 -0.730 0.466 -0.088 -0.085
Lt_P_SK (a3_2) 0.016 0.115 0.138 0.890 0.016 0.015
Lt_N_SE (a3_3) 0.250 0.102 2.446 0.014 0.250 0.209
Lt_N_KU (a3_4) -0.373 0.135 -2.760 0.006 -0.373 -0.246
Lt_N_EC (a3_5) 0.438 0.109 4.017 0.000 0.438 0.390
MH_objective ~
Lt_P_TK (a4_1) -0.072 0.144 -0.500 0.617 -0.072 -0.061
Lt_P_SK (a4_2) -0.084 0.143 -0.589 0.556 -0.084 -0.070
Lt_N_SE (a4_3) 0.272 0.118 2.310 0.021 0.272 0.197
Lt_N_KU (a4_4) -0.209 0.157 -1.334 0.182 -0.209 -0.120
Lt_N_EC (a4_5) 0.429 0.126 3.406 0.001 0.429 0.331
MH_accurate ~
Lt_P_TK (a5_1) -0.162 0.128 -1.260 0.208 -0.162 -0.153
Lt_P_SK (a5_2) -0.048 0.127 -0.376 0.707 -0.048 -0.045
Lt_N_SE (a5_3) 0.265 0.108 2.452 0.014 0.265 0.216
Lt_N_KU (a5_4) -0.241 0.135 -1.780 0.075 -0.241 -0.155
Lt_N_EC (a5_5) 0.482 0.109 4.419 0.000 0.482 0.418
credible ~
MH_ffcn (b1_1) 0.003 0.082 0.033 0.974 0.003 0.002
MH_usfl (b1_2) 0.177 0.084 2.106 0.035 0.177 0.139
MH_xprt (b1_3) 0.291 0.060 4.815 0.000 0.291 0.334
MH_bjct (b1_4) 0.078 0.042 1.847 0.065 0.078 0.103
MH_ccrt (b1_5) 0.311 0.052 6.043 0.000 0.311 0.367
trust ~
MH_ffcn (b2_1) 0.065 0.090 0.714 0.475 0.065 0.047
MH_usfl (b2_2) 0.347 0.078 4.461 0.000 0.347 0.300
MH_xprt (b2_3) 0.141 0.063 2.248 0.025 0.141 0.179
MH_bjct (b2_4) 0.058 0.039 1.513 0.130 0.058 0.085
MH_ccrt (b2_5) 0.223 0.058 3.832 0.000 0.223 0.290
factcheck_A ~
credibl (d1) -0.403 0.139 -2.905 0.004 -0.403 -0.379
trust (d2) 0.041 0.148 0.277 0.781 0.041 0.035
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Lit_Pin_TK ~~
Lit_Pin_SK 1.468 0.140 10.495 0.000 1.468 0.820
Lit_Ng_SE 0.719 0.124 5.787 0.000 0.719 0.458
Lit_Ng_KU 0.721 0.097 7.436 0.000 0.721 0.583
Lit_Ng_EC 0.912 0.136 6.693 0.000 0.912 0.547
Lit_Pin_SK ~~
Lit_Ng_SE 0.625 0.114 5.489 0.000 0.625 0.405
Lit_Ng_KU 0.653 0.084 7.767 0.000 0.653 0.536
Lit_Ng_EC 0.782 0.123 6.369 0.000 0.782 0.477
Lit_Ng_SE ~~
Lit_Ng_KU 0.565 0.074 7.640 0.000 0.565 0.529
Lit_Ng_EC 0.816 0.134 6.084 0.000 0.816 0.567
Lit_Ng_KU ~~
Lit_Ng_EC 0.745 0.081 9.187 0.000 0.745 0.656
.MH_efficient ~~
.MH_useful 0.421 0.062 6.831 0.000 0.421 0.639
.MH_expert 0.547 0.080 6.836 0.000 0.547 0.551
.MH_objective 0.275 0.085 3.253 0.001 0.275 0.237
.MH_accurate 0.378 0.069 5.514 0.000 0.378 0.376
.MH_useful ~~
.MH_expert 0.745 0.103 7.217 0.000 0.745 0.682
.MH_objective 0.385 0.086 4.494 0.000 0.385 0.302
.MH_accurate 0.586 0.097 6.050 0.000 0.586 0.530
.MH_expert ~~
.MH_objective 0.961 0.158 6.077 0.000 0.961 0.501
.MH_accurate 0.978 0.153 6.397 0.000 0.978 0.588
.MH_objective ~~
.MH_accurate 1.089 0.140 7.803 0.000 1.089 0.561
.credible ~~
.trust 0.254 0.045 5.638 0.000 0.254 0.510
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Lit_Pin_TK 1.818 0.159 11.410 0.000 1.818 1.000
Lit_Pin_SK 1.761 0.141 12.514 0.000 1.761 1.000
Lit_Ng_SE 1.354 0.155 8.730 0.000 1.354 1.000
Lit_Ng_KU 0.843 0.069 12.209 0.000 0.843 1.000
Lit_Ng_EC 1.529 0.139 10.991 0.000 1.529 1.000
.MH_efficient 0.599 0.088 6.793 0.000 0.599 0.931
.MH_useful 0.727 0.091 7.962 0.000 0.727 0.811
.MH_expert 1.644 0.186 8.828 0.000 1.644 0.851
.MH_objective 2.242 0.183 12.260 0.000 2.242 0.873
.MH_accurate 1.683 0.158 10.622 0.000 1.683 0.827
.credible 0.493 0.055 8.951 0.000 0.493 0.337
.trust 0.503 0.052 9.745 0.000 0.503 0.420
.factcheck_A 1.396 0.124 11.301 0.000 1.396 0.842
R-Square:
Estimate
MH_efficient 0.069
MH_useful 0.189
MH_expert 0.149
MH_objective 0.127
MH_accurate 0.173
credible 0.663
trust 0.580
factcheck_A 0.158
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
SE_exprt_crdbl -0.029 0.018 -1.646 0.100 -0.029 -0.026
SE_obj_credibl -0.009 0.008 -1.110 0.267 -0.009 -0.008
SE_acc_credibl -0.033 0.020 -1.686 0.092 -0.033 -0.030
EC_exprt_crdbl -0.051 0.025 -2.063 0.039 -0.051 -0.049
EC_obj_credibl -0.050 0.024 -2.133 0.033 -0.050 -0.042
EC_acc_credibl -0.056 0.024 -2.308 0.021 -0.056 -0.053
KU_exprt_crdbl 0.044 0.022 1.942 0.052 0.044 0.031
# Specify mediation model
model <-
'
#direct effect
factcheck_A ~ Lit_Pin_TK + Lit_Pin_SK + Lit_Ng_SE + Lit_Ng_KU + Lit_Ng_EC
#indirect effects a-> b
MH_efficient ~ a1*Lit_Pin_TK + a2*Lit_Pin_SK + a3*Lit_Ng_SE + a4*Lit_Ng_KU + a5*Lit_Ng_EC
MH_useful ~ a6*Lit_Pin_TK + a7*Lit_Pin_SK + a8*Lit_Ng_SE + a9*Lit_Ng_KU + a10*Lit_Ng_EC
MH_expert ~ a11*Lit_Pin_TK + a12*Lit_Pin_SK + a13*Lit_Ng_SE + a14*Lit_Ng_KU + a15*Lit_Ng_EC
MH_objective ~ a16*Lit_Pin_TK + Lit_Pin_SK + Lit_Ng_SE + Lit_Ng_KU + Lit_Ng_EC
MH_accurate ~ a21*Lit_Pin_TK + Lit_Pin_SK + Lit_Ng_SE + Lit_Ng_KU + Lit_Ng_EC
# indirect effects a -> c
credible ~ Lit_Pin_TK + Lit_Pin_SK + Lit_Ng_SE + Lit_Ng_KU + Lit_Ng_EC
trust ~ Lit_Pin_TK + Lit_Pin_SK + Lit_Ng_SE + Lit_Ng_KU + Lit_Ng_EC
# indirect effects b -> c
credible ~ MH_efficient + MH_useful + MH_expert + MH_objective + MH_accurate
trust ~ MH_efficient + MH_useful + MH_expert + MH_objective + MH_accurate
# indirect effects c -> d
factcheck_A ~ credible + trust
#Estimating covariance and residuals
#Estimating variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_TK
Lit_Pin_SK~~Lit_Pin_SK
Lit_Ng_SE~~Lit_Ng_SE
Lit_Ng_KU~~Lit_Ng_KU
Lit_Ng_EC~~Lit_Ng_EC
#Estimating co-variances of exogenous variables (Xs)
Lit_Pin_TK~~Lit_Pin_SK
Lit_Pin_TK~~Lit_Ng_SE
Lit_Pin_TK~~Lit_Ng_KU
Lit_Pin_TK~~Lit_Ng_EC
Lit_Pin_SK~~Lit_Ng_SE
Lit_Pin_SK~~Lit_Ng_KU
Lit_Pin_SK~~Lit_Ng_EC
Lit_Ng_SE~~Lit_Ng_KU
Lit_Ng_SE~~Lit_Ng_EC
Lit_Ng_KU~~Lit_Ng_EC
#Estimating the residual variances (e1,…) for endogenous variables (Ms and Ys)
MH_efficient~~MH_efficient
MH_useful~~MH_useful
MH_expert~~MH_expert
MH_objective~~MH_objective
MH_accurate~~MH_accurate
credible~~credible
trust~~trust
factcheck_A~~factcheck_A
#Estimating the covariances of residuals for Ms
MH_efficient~~MH_useful
MH_efficient~~MH_expert
MH_efficient~~MH_objective
MH_efficient~~MH_accurate
MH_useful~~MH_expert
MH_useful~~MH_objective
MH_useful~~MH_accurate
MH_expert~~MH_objective
MH_expert~~MH_accurate
MH_objective~~MH_accurate
credible~~trust'
result.model <- lavaan(model, data=data)
result.model
summary (result.model, fit.measure=TRUE, standardized = TRUE, rsquare = TRUE, modindices = TRUE)
colnames(data)
library(psych)
tbl_df(data)
data %>%
dplyr::select(Expectancyviolation_1:Expectancyviolation_4) %>%
psych::alpha(,title = "EV")