library(haven)
library(tidyverse)
library(psych)
library(lavaan)
library(semTools)
library(EGAnet)
options(scipen=999) #turns off scientific notation
options(digits=3) #reports decimals to 3 digits
Mydata <- read_sav("/Users/niurongting/Desktop/JPPR/Crisis Emotion - Main Study-Final.sav")
head(Mydata)
## # A tibble: 6 × 201
## StartDate EndDate Status IPAddress Progress
## <dttm> <dttm> <dbl+lbl> <chr> <dbl>
## 1 2025-03-03 09:50:07 2025-03-03 09:54:14 0 [IP Address] 100.12.196.35 100
## 2 2025-03-03 09:50:10 2025-03-03 09:55:02 0 [IP Address] 72.0.134.210 100
## 3 2025-03-03 09:50:05 2025-03-03 09:55:41 0 [IP Address] 73.188.88.156 100
## 4 2025-03-03 09:50:03 2025-03-03 09:55:46 0 [IP Address] 47.39.239.232 100
## 5 2025-03-03 09:50:10 2025-03-03 09:55:53 0 [IP Address] 173.91.121.220 100
## 6 2025-03-03 09:50:07 2025-03-03 09:55:57 0 [IP Address] 73.85.98.93 100
## # ℹ 196 more variables: Duration__in_seconds_ <dbl>, Finished <dbl+lbl>,
## # RecordedDate <dttm>, ResponseId <chr>, RecipientLastName <chr>,
## # RecipientFirstName <chr>, RecipientEmail <chr>, ExternalReference <chr>,
## # LocationLatitude <chr>, LocationLongitude <chr>, DistributionChannel <chr>,
## # UserLanguage <chr>, S0Q1 <dbl+lbl>, Q79_First_Click <dbl>,
## # Q79_Last_Click <dbl>, Q79_Page_Submit <dbl>, Q79_Click_Count <dbl>,
## # Q80_First_Click <dbl>, Q80_Last_Click <dbl>, Q80_Page_Submit <dbl>, …
Mydata_two <- Mydata %>%
select(EmpatheticAnger__1:EmpatheticAnger__6,
Moraloutrage__1:Moraloutrage__6)
Always start by looking at your data
multi.hist(Mydata_two)
describe(Mydata_two)
## vars n mean sd median trimmed mad min max range skew
## EmpatheticAnger__1 1 482 5.06 1.50 5 5.22 1.48 1 7 6 -0.82
## EmpatheticAnger__2 2 482 5.09 1.48 5 5.26 1.48 1 7 6 -0.91
## EmpatheticAnger__3 3 482 5.25 1.48 5 5.44 1.48 1 7 6 -1.01
## EmpatheticAnger__4 4 482 4.94 1.59 5 5.11 1.48 1 7 6 -0.80
## EmpatheticAnger__5 5 482 5.22 1.51 5 5.42 1.48 1 7 6 -1.02
## EmpatheticAnger__6 6 482 5.07 1.56 5 5.26 1.48 1 7 6 -0.93
## Moraloutrage__1 7 482 4.32 1.91 4 4.40 2.97 1 7 6 -0.24
## Moraloutrage__2 8 482 3.72 2.07 4 3.66 2.97 1 7 6 0.10
## Moraloutrage__3 9 482 4.03 2.02 4 4.04 2.97 1 7 6 -0.14
## Moraloutrage__4 10 482 4.18 1.97 4 4.22 2.97 1 7 6 -0.19
## Moraloutrage__5 11 482 4.18 1.91 4 4.22 2.97 1 7 6 -0.15
## Moraloutrage__6 12 482 3.77 1.97 4 3.72 2.97 1 7 6 0.05
## kurtosis se
## EmpatheticAnger__1 0.22 0.07
## EmpatheticAnger__2 0.52 0.07
## EmpatheticAnger__3 0.82 0.07
## EmpatheticAnger__4 0.12 0.07
## EmpatheticAnger__5 0.77 0.07
## EmpatheticAnger__6 0.40 0.07
## Moraloutrage__1 -1.06 0.09
## Moraloutrage__2 -1.31 0.09
## Moraloutrage__3 -1.23 0.09
## Moraloutrage__4 -1.14 0.09
## Moraloutrage__5 -1.07 0.09
## Moraloutrage__6 -1.16 0.09
pairs.panels(Mydata_two,
method = "pearson",
density = TRUE,
gap=0) # show density plots
corPlot(Mydata_two,scale=F)
UVA(Mydata_two)
## Variable pairs with wTO > 0.30 (large-to-very large redundancy)
##
## ----
##
## Variable pairs with wTO > 0.25 (moderate-to-large redundancy)
##
## node_i node_j wto
## Moraloutrage__1 Moraloutrage__4 0.267
## Moraloutrage__3 Moraloutrage__4 0.255
##
## ----
##
## Variable pairs with wTO > 0.20 (small-to-moderate redundancy)
##
## node_i node_j wto
## Moraloutrage__1 Moraloutrage__3 0.243
## Moraloutrage__5 Moraloutrage__6 0.233
## EmpatheticAnger__2 EmpatheticAnger__6 0.216
## EmpatheticAnger__5 EmpatheticAnger__6 0.212
## EmpatheticAnger__1 EmpatheticAnger__2 0.210
## Moraloutrage__2 Moraloutrage__3 0.210
## EmpatheticAnger__3 EmpatheticAnger__5 0.206
Always check to make sure you did things right
Mydata_two_r <- Mydata %>%
select(
EmpatheticAnger__1:EmpatheticAnger__6,
Moraloutrage__2, Moraloutrage__3, Moraloutrage__5, Moraloutrage__6
) %>%
mutate(across(everything(), ~as.numeric(as.character(.))))
head(Mydata_two_r)
## # A tibble: 6 × 10
## EmpatheticAnger__1 EmpatheticAnger__2 EmpatheticAnger__3 EmpatheticAnger__4
## <dbl> <dbl> <dbl> <dbl>
## 1 6 7 7 6
## 2 5 5 5 5
## 3 5 5 5 5
## 4 7 7 7 7
## 5 7 7 7 7
## 6 6 6 6 6
## # ℹ 6 more variables: EmpatheticAnger__5 <dbl>, EmpatheticAnger__6 <dbl>,
## # Moraloutrage__2 <dbl>, Moraloutrage__3 <dbl>, Moraloutrage__5 <dbl>,
## # Moraloutrage__6 <dbl>
multi.hist(Mydata_two_r)
describe(Mydata_two_r)
## vars n mean sd median trimmed mad min max range skew
## EmpatheticAnger__1 1 482 5.06 1.50 5 5.22 1.48 1 7 6 -0.82
## EmpatheticAnger__2 2 482 5.09 1.48 5 5.26 1.48 1 7 6 -0.91
## EmpatheticAnger__3 3 482 5.25 1.48 5 5.44 1.48 1 7 6 -1.01
## EmpatheticAnger__4 4 482 4.94 1.59 5 5.11 1.48 1 7 6 -0.80
## EmpatheticAnger__5 5 482 5.22 1.51 5 5.42 1.48 1 7 6 -1.02
## EmpatheticAnger__6 6 482 5.07 1.56 5 5.26 1.48 1 7 6 -0.93
## Moraloutrage__2 7 482 3.72 2.07 4 3.66 2.97 1 7 6 0.10
## Moraloutrage__3 8 482 4.03 2.02 4 4.04 2.97 1 7 6 -0.14
## Moraloutrage__5 9 482 4.18 1.91 4 4.22 2.97 1 7 6 -0.15
## Moraloutrage__6 10 482 3.77 1.97 4 3.72 2.97 1 7 6 0.05
## kurtosis se
## EmpatheticAnger__1 0.22 0.07
## EmpatheticAnger__2 0.52 0.07
## EmpatheticAnger__3 0.82 0.07
## EmpatheticAnger__4 0.12 0.07
## EmpatheticAnger__5 0.77 0.07
## EmpatheticAnger__6 0.40 0.07
## Moraloutrage__2 -1.31 0.09
## Moraloutrage__3 -1.23 0.09
## Moraloutrage__5 -1.07 0.09
## Moraloutrage__6 -1.16 0.09
pairs.panels(Mydata_two,
method = "pearson",
density = TRUE,
gap=0) # show density plots
corPlot(Mydata_two_r,scale=F)
## Alpha
emp_items <- Mydata_two_r %>%
select(EmpatheticAnger__1:EmpatheticAnger__6)
mor_items <- Mydata_two_r %>%
select(Moraloutrage__2, Moraloutrage__3, Moraloutrage__5, Moraloutrage__6)
polycor <- lavaan::lavCor(Mydata_two_r,ordered=names(Mydata_two_r),cor.smooth=T) #creating polychoric correlation matrix for ordinal data
psych::alpha(polycor)
##
## Reliability analysis
## Call: psych::alpha(x = polycor)
##
## raw_alpha std.alpha G6(smc) average_r S/N median_r
## 0.96 0.96 0.97 0.71 24 0.68
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.91 0.96 0.99
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N var.r med.r
## EmpatheticAnger__1 0.96 0.96 0.97 0.70 21 0.014 0.67
## EmpatheticAnger__2 0.96 0.96 0.97 0.71 22 0.014 0.68
## EmpatheticAnger__3 0.95 0.95 0.97 0.70 21 0.014 0.66
## EmpatheticAnger__4 0.96 0.96 0.97 0.71 22 0.015 0.68
## EmpatheticAnger__5 0.95 0.95 0.97 0.70 21 0.014 0.66
## EmpatheticAnger__6 0.96 0.96 0.97 0.70 21 0.013 0.68
## Moraloutrage__2 0.96 0.96 0.97 0.72 23 0.014 0.73
## Moraloutrage__3 0.96 0.96 0.97 0.70 21 0.015 0.69
## Moraloutrage__5 0.96 0.96 0.97 0.72 23 0.013 0.73
## Moraloutrage__6 0.96 0.96 0.97 0.72 23 0.014 0.73
##
## Item statistics
## r r.cor r.drop
## EmpatheticAnger__1 0.88 0.86 0.85
## EmpatheticAnger__2 0.87 0.86 0.84
## EmpatheticAnger__3 0.90 0.90 0.87
## EmpatheticAnger__4 0.85 0.82 0.81
## EmpatheticAnger__5 0.89 0.89 0.87
## EmpatheticAnger__6 0.88 0.88 0.85
## Moraloutrage__2 0.81 0.80 0.77
## Moraloutrage__3 0.88 0.88 0.85
## Moraloutrage__5 0.80 0.78 0.75
## Moraloutrage__6 0.82 0.81 0.78
polycor1 <- lavaan::lavCor(emp_items,ordered=names(emp_items),cor.smooth=T) #creating polychoric correlation matrix for ordinal data
psych::alpha(polycor1) #running alpha on the polychoric correlation matrix
##
## Reliability analysis
## Call: psych::alpha(x = polycor1)
##
## raw_alpha std.alpha G6(smc) average_r S/N median_r
## 0.97 0.97 0.96 0.82 28 0.81
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.89 0.97 0.99
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N var.r med.r
## EmpatheticAnger__1 0.96 0.96 0.95 0.83 24 0.00167 0.81
## EmpatheticAnger__2 0.96 0.96 0.95 0.83 24 0.00165 0.82
## EmpatheticAnger__3 0.96 0.96 0.95 0.82 22 0.00146 0.81
## EmpatheticAnger__4 0.96 0.96 0.96 0.84 27 0.00078 0.84
## EmpatheticAnger__5 0.96 0.96 0.95 0.82 23 0.00146 0.82
## EmpatheticAnger__6 0.96 0.96 0.95 0.81 22 0.00120 0.81
##
## Item statistics
## r r.cor r.drop
## EmpatheticAnger__1 0.92 0.90 0.88
## EmpatheticAnger__2 0.92 0.90 0.88
## EmpatheticAnger__3 0.94 0.93 0.91
## EmpatheticAnger__4 0.89 0.85 0.84
## EmpatheticAnger__5 0.93 0.92 0.90
## EmpatheticAnger__6 0.94 0.94 0.92
polycor2 <- lavaan::lavCor(mor_items,ordered=names(mor_items),cor.smooth=T) #creating polychoric correlation matrix for ordinal data
psych::alpha(polycor2) #running alpha on the polychoric correlation matrix
##
## Reliability analysis
## Call: psych::alpha(x = polycor2)
##
## raw_alpha std.alpha G6(smc) average_r S/N median_r
## 0.95 0.95 0.94 0.83 19 0.83
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.75 0.95 1
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N var.r med.r
## Moraloutrage__2 0.94 0.94 0.91 0.84 16 0.00026 0.83
## Moraloutrage__3 0.93 0.93 0.90 0.81 13 0.00070 0.81
## Moraloutrage__5 0.94 0.94 0.92 0.84 16 0.00096 0.86
## Moraloutrage__6 0.93 0.93 0.91 0.83 14 0.00181 0.83
##
## Item statistics
## r r.cor r.drop
## Moraloutrage__2 0.92 0.89 0.87
## Moraloutrage__3 0.95 0.94 0.91
## Moraloutrage__5 0.92 0.88 0.86
## Moraloutrage__6 0.94 0.91 0.89
The one-factor model is not a good fit to these data. What about a two-factor model?
cfa_2f <- ' EmpAnger =~ EmpatheticAnger__1 + EmpatheticAnger__2 + EmpatheticAnger__3 + EmpatheticAnger__4 + EmpatheticAnger__5 +EmpatheticAnger__6
MoralOutrage =~ Moraloutrage__2 + Moraloutrage__3 + Moraloutrage__5 + Moraloutrage__6'
cfa2f_fit <- cfa(data = Mydata_two_r,model=cfa_2f,std.lv=T,estimator="MLR")
summary(cfa2f_fit,std=T,fit.measures=T,rsquare=T)
## lavaan 0.6-19 ended normally after 22 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 21
##
## Number of observations 482
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 90.142 50.157
## Degrees of freedom 34 34
## P-value (Chi-square) 0.000 0.037
## Scaling correction factor 1.797
## Yuan-Bentler correction (Mplus variant)
##
## Model Test Baseline Model:
##
## Test statistic 5032.939 2344.732
## Degrees of freedom 45 45
## P-value 0.000 0.000
## Scaling correction factor 2.146
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.989 0.993
## Tucker-Lewis Index (TLI) 0.985 0.991
##
## Robust Comparative Fit Index (CFI) 0.994
## Robust Tucker-Lewis Index (TLI) 0.992
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -6899.620 -6899.620
## Scaling correction factor 2.123
## for the MLR correction
## Loglikelihood unrestricted model (H1) -6854.549 -6854.549
## Scaling correction factor 1.922
## for the MLR correction
##
## Akaike (AIC) 13841.240 13841.240
## Bayesian (BIC) 13928.977 13928.977
## Sample-size adjusted Bayesian (SABIC) 13862.324 13862.324
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.059 0.031
## 90 Percent confidence interval - lower 0.044 0.016
## 90 Percent confidence interval - upper 0.073 0.045
## P-value H_0: RMSEA <= 0.050 0.159 0.992
## P-value H_0: RMSEA >= 0.080 0.008 0.000
##
## Robust RMSEA 0.042
## 90 Percent confidence interval - lower 0.011
## 90 Percent confidence interval - upper 0.066
## P-value H_0: Robust RMSEA <= 0.050 0.683
## P-value H_0: Robust RMSEA >= 0.080 0.003
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.019 0.019
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EmpAnger =~
## EmpthtcAngr__1 1.310 0.060 21.798 0.000 1.310 0.872
## EmpthtcAngr__2 1.288 0.063 20.552 0.000 1.288 0.869
## EmpthtcAngr__3 1.342 0.064 21.008 0.000 1.342 0.911
## EmpthtcAngr__4 1.333 0.064 20.961 0.000 1.333 0.839
## EmpthtcAngr__5 1.367 0.063 21.716 0.000 1.367 0.909
## EmpthtcAngr__6 1.421 0.060 23.714 0.000 1.421 0.914
## MoralOutrage =~
## Moraloutrag__2 1.797 0.061 29.338 0.000 1.797 0.867
## Moraloutrag__3 1.893 0.046 40.894 0.000 1.893 0.939
## Moraloutrag__5 1.627 0.058 28.065 0.000 1.627 0.854
## Moraloutrag__6 1.748 0.055 31.606 0.000 1.748 0.889
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EmpAnger ~~
## MoralOutrage 0.692 0.025 27.238 0.000 0.692 0.692
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .EmpthtcAngr__1 0.542 0.073 7.418 0.000 0.542 0.240
## .EmpthtcAngr__2 0.539 0.097 5.545 0.000 0.539 0.245
## .EmpthtcAngr__3 0.371 0.055 6.765 0.000 0.371 0.171
## .EmpthtcAngr__4 0.746 0.111 6.748 0.000 0.746 0.296
## .EmpthtcAngr__5 0.395 0.054 7.349 0.000 0.395 0.174
## .EmpthtcAngr__6 0.398 0.080 4.980 0.000 0.398 0.165
## .Moraloutrag__2 1.067 0.159 6.707 0.000 1.067 0.248
## .Moraloutrag__3 0.481 0.062 7.757 0.000 0.481 0.118
## .Moraloutrag__5 0.980 0.103 9.501 0.000 0.980 0.270
## .Moraloutrag__6 0.814 0.117 6.980 0.000 0.814 0.210
## EmpAnger 1.000 1.000 1.000
## MoralOutrage 1.000 1.000 1.000
##
## R-Square:
## Estimate
## EmpthtcAngr__1 0.760
## EmpthtcAngr__2 0.755
## EmpthtcAngr__3 0.829
## EmpthtcAngr__4 0.704
## EmpthtcAngr__5 0.826
## EmpthtcAngr__6 0.835
## Moraloutrag__2 0.752
## Moraloutrag__3 0.882
## Moraloutrag__5 0.730
## Moraloutrag__6 0.790
CFA_bifactor <- ' EmpAnger =~ EmpatheticAnger__1 + EmpatheticAnger__2 + EmpatheticAnger__3 +
EmpatheticAnger__4 + EmpatheticAnger__5 + EmpatheticAnger__6
MoralOutrage =~ Moraloutrage__2 + Moraloutrage__3 + Moraloutrage__5 + Moraloutrage__6
g =~ EmpatheticAnger__1 + EmpatheticAnger__2 + EmpatheticAnger__3 +
EmpatheticAnger__4 + EmpatheticAnger__5 + EmpatheticAnger__6 + Moraloutrage__2 + Moraloutrage__3 + Moraloutrage__5 + Moraloutrage__6'
CFA_bifactor_fit <- cfa(data = Mydata_two_r,CFA_bifactor,std.lv=T, orthogonal=T, estimator="MLR")
## Warning: lavaan->lav_object_post_check():
## some estimated ov variances are negative
summary(CFA_bifactor_fit,std=T,fit.measures=T,rsquare=T)
## lavaan 0.6-19 ended normally after 71 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 30
##
## Number of observations 482
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 52.843 26.662
## Degrees of freedom 25 25
## P-value (Chi-square) 0.001 0.373
## Scaling correction factor 1.982
## Yuan-Bentler correction (Mplus variant)
##
## Model Test Baseline Model:
##
## Test statistic 5032.939 2344.732
## Degrees of freedom 45 45
## P-value 0.000 0.000
## Scaling correction factor 2.146
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.994 0.999
## Tucker-Lewis Index (TLI) 0.990 0.999
##
## Robust Comparative Fit Index (CFI) 0.999
## Robust Tucker-Lewis Index (TLI) 0.999
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -6880.970 -6880.970
## Scaling correction factor 1.871
## for the MLR correction
## Loglikelihood unrestricted model (H1) -6854.549 -6854.549
## Scaling correction factor 1.922
## for the MLR correction
##
## Akaike (AIC) 13821.940 13821.940
## Bayesian (BIC) 13947.279 13947.279
## Sample-size adjusted Bayesian (SABIC) 13852.061 13852.061
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.048 0.012
## 90 Percent confidence interval - lower 0.030 0.000
## 90 Percent confidence interval - upper 0.066 0.032
## P-value H_0: RMSEA <= 0.050 0.543 1.000
## P-value H_0: RMSEA >= 0.080 0.001 0.000
##
## Robust RMSEA 0.017
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.055
## P-value H_0: Robust RMSEA <= 0.050 0.914
## P-value H_0: Robust RMSEA >= 0.080 0.001
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.011 0.011
##
## Parameter Estimates:
##
## Standard errors Sandwich
## Information bread Observed
## Observed information based on Hessian
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EmpAnger =~
## EmpthtcAngr__1 0.938 0.053 17.758 0.000 0.938 0.624
## EmpthtcAngr__2 0.955 0.056 17.107 0.000 0.955 0.644
## EmpthtcAngr__3 0.960 0.054 17.865 0.000 0.960 0.651
## EmpthtcAngr__4 0.978 0.063 15.561 0.000 0.978 0.616
## EmpthtcAngr__5 1.015 0.055 18.552 0.000 1.015 0.675
## EmpthtcAngr__6 1.116 0.050 22.437 0.000 1.116 0.718
## MoralOutrage =~
## Moraloutrag__2 0.110 0.131 0.841 0.401 0.110 0.053
## Moraloutrag__3 -0.819 1.213 -0.675 0.500 -0.819 -0.406
## Moraloutrag__5 0.323 0.298 1.086 0.277 0.323 0.170
## Moraloutrag__6 0.335 0.325 1.032 0.302 0.335 0.170
## g =~
## EmpthtcAngr__1 0.913 0.069 13.203 0.000 0.913 0.608
## EmpthtcAngr__2 0.865 0.072 12.063 0.000 0.865 0.583
## EmpthtcAngr__3 0.936 0.065 14.376 0.000 0.936 0.635
## EmpthtcAngr__4 0.903 0.075 11.983 0.000 0.903 0.569
## EmpthtcAngr__5 0.916 0.070 13.056 0.000 0.916 0.608
## EmpthtcAngr__6 0.894 0.075 11.908 0.000 0.894 0.575
## Moraloutrag__2 1.749 0.064 27.420 0.000 1.749 0.844
## Moraloutrag__3 2.024 0.064 31.722 0.000 2.024 1.004
## Moraloutrag__5 1.630 0.082 19.927 0.000 1.630 0.856
## Moraloutrag__6 1.755 0.074 23.655 0.000 1.755 0.892
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EmpAnger ~~
## MoralOutrage 0.000 0.000 0.000
## g 0.000 0.000 0.000
## MoralOutrage ~~
## g 0.000 0.000 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .EmpthtcAngr__1 0.545 0.073 7.512 0.000 0.545 0.241
## .EmpthtcAngr__2 0.539 0.097 5.553 0.000 0.539 0.245
## .EmpthtcAngr__3 0.375 0.055 6.802 0.000 0.375 0.173
## .EmpthtcAngr__4 0.751 0.111 6.792 0.000 0.751 0.298
## .EmpthtcAngr__5 0.396 0.055 7.227 0.000 0.396 0.175
## .EmpthtcAngr__6 0.371 0.076 4.913 0.000 0.371 0.154
## .Moraloutrag__2 1.223 0.180 6.795 0.000 1.223 0.285
## .Moraloutrag__3 -0.703 2.138 -0.329 0.742 -0.703 -0.173
## .Moraloutrag__5 0.864 0.108 7.973 0.000 0.864 0.238
## .Moraloutrag__6 0.677 0.143 4.743 0.000 0.677 0.175
## EmpAnger 1.000 1.000 1.000
## MoralOutrage 1.000 1.000 1.000
## g 1.000 1.000 1.000
##
## R-Square:
## Estimate
## EmpthtcAngr__1 0.759
## EmpthtcAngr__2 0.755
## EmpthtcAngr__3 0.827
## EmpthtcAngr__4 0.702
## EmpthtcAngr__5 0.825
## EmpthtcAngr__6 0.846
## Moraloutrag__2 0.715
## Moraloutrag__3 NA
## Moraloutrag__5 0.762
## Moraloutrag__6 0.825
Omega is a better alternative to alpha. The default omega function in the psych package first conducts a hierarchical factor analysis with a single general factor and oblique factor rotation, then does a Schmid-Leiman (SL) transformation so the factors are orthogonal and calculates omega based on the SL transformed solution.
psych::omega(Mydata_two_r,poly=T,nfactors = 2) #for ordinal data
## Loading required namespace: GPArotation
##
## Three factors are required for identification -- general factor loadings set to be equal.
## Proceed with caution.
## Think about redoing the analysis with alternative values of the 'option' setting.
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.96
## G.6: 0.97
## Omega Hierarchical: 0.82
## Omega H asymptotic: 0.84
## Omega Total 0.98
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* F2* h2 h2 u2 p2 com
## EmpatheticAnger__1 0.77 0.46 0.81 0.81 0.19 0.74 1.63
## EmpatheticAnger__2 0.76 0.47 0.80 0.80 0.20 0.72 1.67
## EmpatheticAnger__3 0.80 0.47 0.86 0.86 0.14 0.74 1.62
## EmpatheticAnger__4 0.74 0.43 0.74 0.74 0.26 0.74 1.62
## EmpatheticAnger__5 0.79 0.47 0.84 0.84 0.16 0.74 1.63
## EmpatheticAnger__6 0.78 0.52 0.87 0.87 0.13 0.69 1.74
## Moraloutrage__2 0.76 0.47 0.79 0.79 0.21 0.72 1.67
## Moraloutrage__3 0.83 0.46 0.90 0.90 0.10 0.76 1.57
## Moraloutrage__5 0.75 0.48 0.79 0.79 0.21 0.71 1.70
## Moraloutrage__6 0.78 0.49 0.84 0.84 0.16 0.72 1.69
##
## With Sums of squares of:
## g F1* F2* h2
## 6.0 1.3 0.9 6.8
##
## general/max 0.88 max/min = 7.58
## mean percent general = 0.73 with sd = 0.02 and cv of 0.03
## Explained Common Variance of the general factor = 0.73
##
## The degrees of freedom are 26 and the fit is 0.23
## The number of observations was 482 with Chi Square = 108 with prob < 0.0000000000063
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
## RMSEA index = 0.081 and the 90 % confidence intervals are 0.065 0.097
## BIC = -52.9
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 35 and the fit is 3.46
## The number of observations was 482 with Chi Square = 1648 with prob < 0
## The root mean square of the residuals is 0.15
## The df corrected root mean square of the residuals is 0.17
##
## RMSEA index = 0.309 and the 90 % confidence intervals are 0.297 0.322
## BIC = 1432
##
## Measures of factor score adequacy
## g F1* F2*
## Correlation of scores with factors 0.91 0.72 0.71
## Multiple R square of scores with factors 0.82 0.52 0.51
## Minimum correlation of factor score estimates 0.65 0.03 0.02
##
## Total, General and Subset omega for each subset
## g F1* F2*
## Omega total for total scores and subscales 0.98 0.96 0.95
## Omega general for total scores and subscales 0.82 0.70 0.69
## Omega group for total scores and subscales 0.16 0.26 0.26
psych::omega(emp_items,poly=T,nfactors = 1) #for ordinal data
## Omega_h for 1 factor is not meaningful, just omega_t
## Warning in schmid(m, nfactors, fm, digits, rotate = rotate, n.obs = n.obs, :
## Omega_h and Omega_asymptotic are not meaningful with one factor
## Warning in cov2cor(t(w) %*% r %*% w): diag(V) had non-positive or NA entries;
## the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.96
## G.6: 0.96
## Omega Hierarchical: 0.96
## Omega H asymptotic: 1
## Omega Total 0.96
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* h2 h2 u2 p2 com
## EmpatheticAnger__1 0.90 0.81 0.81 0.19 1 1
## EmpatheticAnger__2 0.90 0.80 0.80 0.20 1 1
## EmpatheticAnger__3 0.93 0.86 0.86 0.14 1 1
## EmpatheticAnger__4 0.86 0.74 0.74 0.26 1 1
## EmpatheticAnger__5 0.92 0.84 0.84 0.16 1 1
## EmpatheticAnger__6 0.93 0.87 0.87 0.13 1 1
##
## With Sums of squares of:
## g F1* h2
## 4.9 0.0 4.0
##
## general/max 1.22 max/min = Inf
## mean percent general = 1 with sd = 0 and cv of 0
## Explained Common Variance of the general factor = 1
##
## The degrees of freedom are 9 and the fit is 0.08
## The number of observations was 482 with Chi Square = 36.5 with prob < 0.000032
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
## RMSEA index = 0.08 and the 90 % confidence intervals are 0.054 0.107
## BIC = -19.1
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 9 and the fit is 0.08
## The number of observations was 482 with Chi Square = 36.5 with prob < 0.000032
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
##
## RMSEA index = 0.08 and the 90 % confidence intervals are 0.054 0.107
## BIC = -19.1
##
## Measures of factor score adequacy
## g F1*
## Correlation of scores with factors 0.98 0
## Multiple R square of scores with factors 0.97 0
## Minimum correlation of factor score estimates 0.93 -1
##
## Total, General and Subset omega for each subset
## g F1*
## Omega total for total scores and subscales 0.96 0.96
## Omega general for total scores and subscales 0.96 0.96
## Omega group for total scores and subscales 0.00 0.00
psych::omega(mor_items ,poly=T,nfactors = 1) #for ordinal data
## Omega_h for 1 factor is not meaningful, just omega_t
## Warning in schmid(m, nfactors, fm, digits, rotate = rotate, n.obs = n.obs, :
## Omega_h and Omega_asymptotic are not meaningful with one factor
## Warning in schmid(m, nfactors, fm, digits, rotate = rotate, n.obs = n.obs, :
## diag(V) had non-positive or NA entries; the non-finite result may be dubious
## Omega
## Call: omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,
## digits = digits, title = title, sl = sl, labels = labels,
## plot = plot, n.obs = n.obs, rotate = rotate, Phi = Phi, option = option,
## covar = covar)
## Alpha: 0.95
## G.6: 0.94
## Omega Hierarchical: 0.95
## Omega H asymptotic: 1
## Omega Total 0.95
##
## Schmid Leiman Factor loadings greater than 0.2
## g F1* h2 h2 u2 p2 com
## Moraloutrage__2 0.89 0.80 0.80 0.20 1 1
## Moraloutrage__3 0.95 0.90 0.90 0.10 1 1
## Moraloutrage__5 0.89 0.79 0.79 0.21 1 1
## Moraloutrage__6 0.92 0.84 0.84 0.16 1 1
##
## With Sums of squares of:
## g F1* h2
## 3.3 0.0 2.8
##
## general/max 1.2 max/min = Inf
## mean percent general = 1 with sd = 0 and cv of 0
## Explained Common Variance of the general factor = 1
##
## The degrees of freedom are 2 and the fit is 0.04
## The number of observations was 482 with Chi Square = 20.4 with prob < 0.000037
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
## RMSEA index = 0.138 and the 90 % confidence intervals are 0.088 0.196
## BIC = 8.03
##
## Compare this with the adequacy of just a general factor and no group factors
## The degrees of freedom for just the general factor are 2 and the fit is 0.04
## The number of observations was 482 with Chi Square = 20.4 with prob < 0.000037
## The root mean square of the residuals is 0.01
## The df corrected root mean square of the residuals is 0.02
##
## RMSEA index = 0.138 and the 90 % confidence intervals are 0.088 0.196
## BIC = 8.03
##
## Measures of factor score adequacy
## g F1*
## Correlation of scores with factors 0.98 0
## Multiple R square of scores with factors 0.96 0
## Minimum correlation of factor score estimates 0.91 -1
##
## Total, General and Subset omega for each subset
## g F1*
## Omega total for total scores and subscales 0.95 0.95
## Omega general for total scores and subscales 0.95 0.95
## Omega group for total scores and subscales 0.00 0.00
semTools::compRelSEM(cfa2f_fit)
## EmpAnger MoralOutrage
## 0.956 0.936