library(tidyverse)
library(summarytools)
library(psych)
library(lavaan)
library(semTools)
library(MVN)     
library(EFAtools)
library(EGAnet)
library(haven)
library(lavaan.mi)
options(scipen=999)
options(digits=3)
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_ea <- select(Mydata, EmpatheticAnger__1:EmpatheticAnger__6)
Mydata_mo <- select(Mydata, Moraloutrage__1:Moraloutrage__6)

head(Mydata_ea)
## # A tibble: 6 × 6
##   EmpatheticAnger__1 EmpatheticAnger__2 EmpatheticAnger__3 EmpatheticAnger__4
##   <dbl+lbl>          <dbl+lbl>          <dbl+lbl>          <dbl+lbl>         
## 1 6 [Agree]          7 [Strongly agree] 7 [Strongly agree] 6 [Agree]         
## 2 5 [Somewhat Agree] 5 [Somewhat Agree] 5 [Somewhat Agree] 5 [Somewhat Agree]
## 3 5 [Somewhat Agree] 5 [Somewhat Agree] 5 [Somewhat Agree] 5 [Somewhat Agree]
## 4 7 [Strongly agree] 7 [Strongly agree] 7 [Strongly agree] 7 [Strongly agree]
## 5 7 [Strongly agree] 7 [Strongly agree] 7 [Strongly agree] 7 [Strongly agree]
## 6 6 [Agree]          6 [Agree]          6 [Agree]          6 [Agree]         
## # ℹ 2 more variables: EmpatheticAnger__5 <dbl+lbl>,
## #   EmpatheticAnger__6 <dbl+lbl>
head(Mydata_mo)
## # A tibble: 6 × 6
##   Moraloutrage__1 Moraloutrage__2 Moraloutrage__3 Moraloutrage__4
##   <dbl+lbl>       <dbl+lbl>       <dbl+lbl>       <dbl+lbl>      
## 1 4 [Moderately]  4 [Moderately]  3 [Somewhat]    4 [Moderately] 
## 2 4 [Moderately]  4 [Moderately]  4 [Moderately]  4 [Moderately] 
## 3 4 [Moderately]  3 [Somewhat]    4 [Moderately]  4 [Moderately] 
## 4 1 [Not at all]  1 [Not at all]  1 [Not at all]  1 [Not at all] 
## 5 7 [Extremely]   7 [Extremely]   7 [Extremely]   7 [Extremely]  
## 6 4 [Moderately]  1 [Not at all]  3 [Somewhat]    4 [Moderately] 
## # ℹ 2 more variables: Moraloutrage__5 <dbl+lbl>, Moraloutrage__6 <dbl+lbl>
Mydata_two <- Mydata %>%
  select(
    EmpatheticAnger__1:EmpatheticAnger__6,
    Moraloutrage__2, Moraloutrage__3, Moraloutrage__5, Moraloutrage__6
  ) %>%
  mutate(across(everything(), ~as.numeric(as.character(.))))

head(Mydata_two)
## # 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>

We always need to look at our data before running any analyses. We are looking for 1) any out of range values (coding errors), 2) non-normal univariate distributions, 3) high skewness and kurtosis values, 4) nonlinear relations between variables, 5) very high item intercorrelations, 6) item redundancy.

multi.hist(Mydata_ea,freq=F)

describe(Mydata_ea)
##                    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
##                    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
pairs.panels(Mydata_two, 
             method = "pearson",
             density = TRUE,
             gap=0) # show density plots

corPlot(Mydata_ea,scale=F)

uva <- UVA(Mydata_ea)
uva
## Variable pairs with wTO > 0.30 (large-to-very large redundancy)
## 
## ----
## 
## Variable pairs with wTO > 0.25 (moderate-to-large redundancy)
## 
## ----
## 
## Variable pairs with wTO > 0.20 (small-to-moderate redundancy)
## 
##              node_i             node_j   wto
##  EmpatheticAnger__3 EmpatheticAnger__5 0.245
##  EmpatheticAnger__1 EmpatheticAnger__2 0.228
##  EmpatheticAnger__5 EmpatheticAnger__6 0.228
##  EmpatheticAnger__2 EmpatheticAnger__6 0.226
##  EmpatheticAnger__3 EmpatheticAnger__4 0.214
##  EmpatheticAnger__3 EmpatheticAnger__6 0.214
##  EmpatheticAnger__1 EmpatheticAnger__6 0.205
uva$keep_remove
## NULL
multi.hist(Mydata_mo,freq=F)

describe(Mydata_mo)
##                 vars   n mean   sd median trimmed  mad min max range  skew
## Moraloutrage__1    1 482 4.32 1.91      4    4.40 2.97   1   7     6 -0.24
## Moraloutrage__2    2 482 3.72 2.07      4    3.66 2.97   1   7     6  0.10
## Moraloutrage__3    3 482 4.03 2.02      4    4.04 2.97   1   7     6 -0.14
## Moraloutrage__4    4 482 4.18 1.97      4    4.22 2.97   1   7     6 -0.19
## Moraloutrage__5    5 482 4.18 1.91      4    4.22 2.97   1   7     6 -0.15
## Moraloutrage__6    6 482 3.77 1.97      4    3.72 2.97   1   7     6  0.05
##                 kurtosis   se
## 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_mo, 
             method = "pearson",
             density = TRUE,
             gap=0) # show density plots

corPlot(Mydata_mo,scale=F)

uva <- UVA(Mydata_mo)
uva
## Variable pairs with wTO > 0.30 (large-to-very large redundancy)
## 
##           node_i          node_j  wto
##  Moraloutrage__1 Moraloutrage__4 0.31
## 
## ----
## 
## Variable pairs with wTO > 0.25 (moderate-to-large redundancy)
## 
##           node_i          node_j   wto
##  Moraloutrage__3 Moraloutrage__4 0.292
##  Moraloutrage__1 Moraloutrage__3 0.277
## 
## ----
## 
## Variable pairs with wTO > 0.20 (small-to-moderate redundancy)
## 
##           node_i          node_j   wto
##  Moraloutrage__5 Moraloutrage__6 0.234
##  Moraloutrage__2 Moraloutrage__3 0.225
uva$keep_remove
## $keep
## [1] "Moraloutrage__3" "Moraloutrage__4"
## 
## $remove
## [1] "Moraloutrage__1" "Moraloutrage__1" "Moraloutrage__3"
multi.hist(Mydata_two,freq=F)

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__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,scale=F)

uva <- UVA(Mydata_two)
uva
## Variable pairs with wTO > 0.30 (large-to-very large redundancy)
## 
##           node_i          node_j   wto
##  Moraloutrage__2 Moraloutrage__3 0.335
##  Moraloutrage__5 Moraloutrage__6 0.310
## 
## ----
## 
## Variable pairs with wTO > 0.25 (moderate-to-large redundancy)
## 
##           node_i          node_j   wto
##  Moraloutrage__3 Moraloutrage__6 0.283
##  Moraloutrage__3 Moraloutrage__5 0.262
## 
## ----
## 
## Variable pairs with wTO > 0.20 (small-to-moderate redundancy)
## 
##              node_i             node_j   wto
##     Moraloutrage__2    Moraloutrage__6 0.233
##  EmpatheticAnger__2 EmpatheticAnger__6 0.217
##  EmpatheticAnger__3 EmpatheticAnger__5 0.215
##  EmpatheticAnger__5 EmpatheticAnger__6 0.214
##  EmpatheticAnger__1 EmpatheticAnger__2 0.212
##     Moraloutrage__2    Moraloutrage__5 0.203
##  EmpatheticAnger__3 EmpatheticAnger__6 0.201
uva$keep_remove
## $keep
## [1] "Moraloutrage__3" "Moraloutrage__5"
## 
## $remove
## [1] "Moraloutrage__2" "Moraloutrage__5" "Moraloutrage__6" "Moraloutrage__6"

Assumption Checking

Let’s check to see if the covariance matrix for ragland_r2 is positive definite. Note that if you are transforming your input matrix in some way (e.g., polychoric, tetrachoric, missing data), you should use that input matrix here.

factor_mat <- as.matrix(cov(Mydata_two))
det(factor_mat) #determinant is non-zero
## [1] 1.09
eigen(factor_mat) #all the eigenvalues are positive
## eigen() decomposition
## $values
##  [1] 20.446  4.326  1.146  0.790  0.738  0.613  0.533  0.456  0.365  0.338
## 
## $vectors
##         [,1]   [,2]     [,3]     [,4]    [,5]     [,6]     [,7]    [,8]    [,9]
##  [1,] -0.268 -0.281 -0.00352 -0.08708  0.4371  0.04152 -0.43743 -0.6428 -0.1299
##  [2,] -0.260 -0.297 -0.05556  0.21257  0.3504  0.05342 -0.36944  0.7024 -0.1583
##  [3,] -0.270 -0.284  0.12615 -0.03546 -0.0706 -0.19029  0.30163 -0.1812 -0.2229
##  [4,] -0.273 -0.312 -0.15287 -0.01409 -0.8002 -0.00641 -0.38907 -0.0151  0.0614
##  [5,] -0.273 -0.303  0.06935  0.00379 -0.0445  0.01828  0.55060  0.0766 -0.4724
##  [6,] -0.277 -0.349  0.01673 -0.02648  0.1425  0.21180  0.30845  0.0231  0.7985
##  [7,] -0.382  0.375 -0.72604  0.18691  0.0286  0.31879  0.14602 -0.0965 -0.0839
##  [8,] -0.401  0.276 -0.09458 -0.14974  0.0892 -0.81572 -0.00925  0.0842  0.1717
##  [9,] -0.346  0.331  0.55240  0.65463 -0.0930  0.09341 -0.05309 -0.1138  0.0482
## [10,] -0.369  0.339  0.33362 -0.67762 -0.0334  0.37178 -0.08533  0.1571 -0.0709
##         [,10]
##  [1,] -0.1653
##  [2,]  0.1256
##  [3,]  0.7839
##  [4,] -0.0932
##  [5,] -0.5428
##  [6,] -0.0477
##  [7,]  0.1071
##  [8,] -0.1477
##  [9,] -0.0367
## [10,]  0.0471
multiv <- mvn(Mydata_two,mvnTest = "mardia",multivariatePlot = "qq",multivariateOutlierMethod="none")

The Q-Q plot plots the observed squared Mahalanobis distance (x-axis) against the theoretical quantiles for a multivariate normal distribution (y-axis). Departures from the line indicate departures from multivarite normality.

The other Q-Q plot shows multivariate outliers based on the robust squared Mahalanobis distance. These indicate how far each case is from the center of the joint distribution.

multiv$multivariateNormality
##              Test        Statistic
## 1 Mardia Skewness 2182.27740785489
## 2 Mardia Kurtosis 71.8296867199904
## 3             MVN             <NA>
##                                                                                                                                                                                                                                                                                                                                           p value
## 1 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000137888781097833
## 2                                                                                                                                                                                                                                                                                                                                               0
## 3                                                                                                                                                                                                                                                                                                                                            <NA>
##   Result
## 1     NO
## 2     NO
## 3     NO

CFA 2 Factor

CFA <- ' EmpAnger =~ EmpatheticAnger__1 + EmpatheticAnger__2 + EmpatheticAnger__3 + EmpatheticAnger__4 + EmpatheticAnger__5 +EmpatheticAnger__6
MoralOutrage =~ Moraloutrage__2 + Moraloutrage__3 +  Moraloutrage__5 + Moraloutrage__6' 
cfa_fit <- cfa(data = Mydata,CFA,std.lv=T,estimator="MLR")
summary(cfa_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)             NA          NA
##   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
# lavInspect(cfa_fit)

Inspecting residuals

stdlv <- ' EmpAnger =~ EmpatheticAnger__1 + EmpatheticAnger__2 + EmpatheticAnger__3 + 
    EmpatheticAnger__4 + EmpatheticAnger__5 + EmpatheticAnger__6
  MoralOutrage =~ Moraloutrage__2 + Moraloutrage__3 +  Moraloutrage__5 + Moraloutrage__6'  
stdlv_fit <- cfa(data = Mydata, stdlv, std.lv=T, estimator="MLR")
summary(stdlv_fit,std=T,fit.measures=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)             NA          NA
##   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
lavInspect(stdlv_fit,what="implied")
## $cov
##                    EmA__1 EmA__2 EmA__3 EmA__4 EmA__5 EmA__6 Mrl__2 Mrl__3
## EmpatheticAnger__1   2.26                                                 
## EmpatheticAnger__2   1.69   2.20                                          
## EmpatheticAnger__3   1.76   1.73   2.17                                   
## EmpatheticAnger__4   1.75   1.72   1.79   2.52                            
## EmpatheticAnger__5   1.79   1.76   1.84   1.82   2.27                     
## EmpatheticAnger__6   1.86   1.83   1.91   1.89   1.94   2.42              
## Moraloutrage__2      1.63   1.60   1.67   1.66   1.70   1.77   4.29       
## Moraloutrage__3      1.72   1.69   1.76   1.75   1.79   1.86   3.40   4.07
## Moraloutrage__5      1.48   1.45   1.51   1.50   1.54   1.60   2.92   3.08
## Moraloutrage__6      1.58   1.56   1.62   1.61   1.65   1.72   3.14   3.31
##                    Mrl__5 Mrl__6
## EmpatheticAnger__1              
## EmpatheticAnger__2              
## EmpatheticAnger__3              
## EmpatheticAnger__4              
## EmpatheticAnger__5              
## EmpatheticAnger__6              
## Moraloutrage__2                 
## Moraloutrage__3                 
## Moraloutrage__5      3.63       
## Moraloutrage__6      2.84   3.87
lavInspect(stdlv_fit,what="sampstat")
## $cov
##                    EmA__1 EmA__2 EmA__3 EmA__4 EmA__5 EmA__6 Mrl__2 Mrl__3
## EmpatheticAnger__1   2.26                                                 
## EmpatheticAnger__2   1.76   2.20                                          
## EmpatheticAnger__3   1.75   1.69   2.17                                   
## EmpatheticAnger__4   1.71   1.71   1.82   2.52                            
## EmpatheticAnger__5   1.75   1.74   1.86   1.83   2.27                     
## EmpatheticAnger__6   1.88   1.85   1.90   1.88   1.96   2.42              
## Moraloutrage__2      1.63   1.59   1.56   1.69   1.61   1.61   4.29       
## Moraloutrage__3      1.85   1.76   1.89   1.84   1.84   1.80   3.45   4.07
## Moraloutrage__5      1.46   1.43   1.55   1.45   1.52   1.46   2.88   3.04
## Moraloutrage__6      1.62   1.47   1.64   1.58   1.63   1.61   3.11   3.28
##                    Mrl__5 Mrl__6
## EmpatheticAnger__1              
## EmpatheticAnger__2              
## EmpatheticAnger__3              
## EmpatheticAnger__4              
## EmpatheticAnger__5              
## EmpatheticAnger__6              
## Moraloutrage__2                 
## Moraloutrage__3                 
## Moraloutrage__5      3.63       
## Moraloutrage__6      2.97   3.87
#Residual = observed - implied

res <- residuals(stdlv_fit,type="raw")
res
## $type
## [1] "raw"
## 
## $cov
##                    EmA__1 EmA__2 EmA__3 EmA__4 EmA__5 EmA__6 Mrl__2 Mrl__3
## EmpatheticAnger__1  0.000                                                 
## EmpatheticAnger__2  0.072  0.000                                          
## EmpatheticAnger__3 -0.012 -0.043  0.000                                   
## EmpatheticAnger__4 -0.035 -0.007  0.028  0.000                            
## EmpatheticAnger__5 -0.046 -0.023  0.027  0.010  0.000                     
## EmpatheticAnger__6  0.015  0.020 -0.011 -0.014  0.015  0.000              
## Moraloutrage__2     0.001 -0.015 -0.105  0.034 -0.087 -0.152  0.000       
## Moraloutrage__3     0.133  0.071  0.132  0.090  0.054 -0.058  0.049  0.000
## Moraloutrage__5    -0.015 -0.016  0.036 -0.055 -0.017 -0.138 -0.039 -0.044
## Moraloutrage__6     0.040 -0.093  0.015 -0.032 -0.028 -0.111 -0.031 -0.032
##                    Mrl__5 Mrl__6
## EmpatheticAnger__1              
## EmpatheticAnger__2              
## EmpatheticAnger__3              
## EmpatheticAnger__4              
## EmpatheticAnger__5              
## EmpatheticAnger__6              
## Moraloutrage__2                 
## Moraloutrage__3                 
## Moraloutrage__5     0.000       
## Moraloutrage__6     0.126  0.000
res_cov <- residuals(stdlv_fit,type="cor.bentler")$cov
res_cov #note that the residuals are already standardized because we standardized the factor in estimation
##                    EmA__1 EmA__2 EmA__3 EmA__4 EmA__5 EmA__6 Mrl__2 Mrl__3
## EmpatheticAnger__1  0.000                                                 
## EmpatheticAnger__2  0.032  0.000                                          
## EmpatheticAnger__3 -0.006 -0.020  0.000                                   
## EmpatheticAnger__4 -0.015 -0.003  0.012  0.000                            
## EmpatheticAnger__5 -0.020 -0.010  0.012  0.004  0.000                     
## EmpatheticAnger__6  0.006  0.009 -0.005 -0.006  0.006  0.000              
## Moraloutrage__2     0.000 -0.005 -0.034  0.010 -0.028 -0.047  0.000       
## Moraloutrage__3     0.044  0.024  0.044  0.028  0.018 -0.019  0.012  0.000
## Moraloutrage__5    -0.005 -0.006  0.013 -0.018 -0.006 -0.047 -0.010 -0.012
## Moraloutrage__6     0.014 -0.032  0.005 -0.010 -0.009 -0.036 -0.008 -0.008
##                    Mrl__5 Mrl__6
## EmpatheticAnger__1              
## EmpatheticAnger__2              
## EmpatheticAnger__3              
## EmpatheticAnger__4              
## EmpatheticAnger__5              
## EmpatheticAnger__6              
## Moraloutrage__2                 
## Moraloutrage__3                 
## Moraloutrage__5     0.000       
## Moraloutrage__6     0.034  0.000
print(modindices(stdlv_fit,standardized=T))
##                   lhs op                rhs     mi    epc sepc.lv sepc.all
## 24           EmpAnger =~    Moraloutrage__2  2.812 -0.131  -0.131   -0.063
## 25           EmpAnger =~    Moraloutrage__3  8.331  0.190   0.190    0.094
## 26           EmpAnger =~    Moraloutrage__5  0.737 -0.063  -0.063   -0.033
## 27           EmpAnger =~    Moraloutrage__6  1.069 -0.073  -0.073   -0.037
## 28       MoralOutrage =~ EmpatheticAnger__1  2.225  0.081   0.081    0.054
## 29       MoralOutrage =~ EmpatheticAnger__2  0.004  0.003   0.003    0.002
## 30       MoralOutrage =~ EmpatheticAnger__3  1.955  0.066   0.066    0.044
## 31       MoralOutrage =~ EmpatheticAnger__4  0.282  0.033   0.033    0.021
## 32       MoralOutrage =~ EmpatheticAnger__5  0.005 -0.003  -0.003   -0.002
## 33       MoralOutrage =~ EmpatheticAnger__6  9.006 -0.147  -0.147   -0.094
## 34 EmpatheticAnger__1 ~~ EmpatheticAnger__2 12.329  0.103   0.103    0.191
## 35 EmpatheticAnger__1 ~~ EmpatheticAnger__3  0.616 -0.021  -0.021   -0.046
## 36 EmpatheticAnger__1 ~~ EmpatheticAnger__4  1.980 -0.047  -0.047   -0.075
## 37 EmpatheticAnger__1 ~~ EmpatheticAnger__5  7.728 -0.075  -0.075   -0.162
## 38 EmpatheticAnger__1 ~~ EmpatheticAnger__6  0.799  0.025   0.025    0.053
## 39 EmpatheticAnger__1 ~~    Moraloutrage__2  0.057  0.010   0.010    0.013
## 40 EmpatheticAnger__1 ~~    Moraloutrage__3  0.970  0.032   0.032    0.062
## 41 EmpatheticAnger__1 ~~    Moraloutrage__5  1.413 -0.046  -0.046   -0.063
## 42 EmpatheticAnger__1 ~~    Moraloutrage__6  0.517  0.026   0.026    0.039
## 43 EmpatheticAnger__2 ~~ EmpatheticAnger__3  7.341 -0.071  -0.071   -0.158
## 44 EmpatheticAnger__2 ~~ EmpatheticAnger__4  0.078 -0.009  -0.009   -0.015
## 45 EmpatheticAnger__2 ~~ EmpatheticAnger__5  1.960 -0.038  -0.038   -0.081
## 46 EmpatheticAnger__2 ~~ EmpatheticAnger__6  1.514  0.034   0.034    0.073
## 47 EmpatheticAnger__2 ~~    Moraloutrage__2  2.227  0.060   0.060    0.079
## 48 EmpatheticAnger__2 ~~    Moraloutrage__3  0.473  0.022   0.022    0.043
## 49 EmpatheticAnger__2 ~~    Moraloutrage__5  0.172  0.016   0.016    0.022
## 50 EmpatheticAnger__2 ~~    Moraloutrage__6  6.404 -0.091  -0.091   -0.138
## 51 EmpatheticAnger__3 ~~ EmpatheticAnger__4  2.135  0.043   0.043    0.083
## 52 EmpatheticAnger__3 ~~ EmpatheticAnger__5  4.631  0.052   0.052    0.137
## 53 EmpatheticAnger__3 ~~ EmpatheticAnger__6  0.868 -0.023  -0.023   -0.060
## 54 EmpatheticAnger__3 ~~    Moraloutrage__2 12.370 -0.123  -0.123   -0.195
## 55 EmpatheticAnger__3 ~~    Moraloutrage__3  4.822  0.061   0.061    0.144
## 56 EmpatheticAnger__3 ~~    Moraloutrage__5  1.729  0.043   0.043    0.072
## 57 EmpatheticAnger__3 ~~    Moraloutrage__6  0.175  0.013   0.013    0.024
## 58 EmpatheticAnger__4 ~~ EmpatheticAnger__5  0.226  0.015   0.015    0.027
## 59 EmpatheticAnger__4 ~~ EmpatheticAnger__6  0.530 -0.023  -0.023   -0.041
## 60 EmpatheticAnger__4 ~~    Moraloutrage__2  4.300  0.097   0.097    0.108
## 61 EmpatheticAnger__4 ~~    Moraloutrage__3  0.094  0.011   0.011    0.019
## 62 EmpatheticAnger__4 ~~    Moraloutrage__5  1.714 -0.058  -0.058   -0.068
## 63 EmpatheticAnger__4 ~~    Moraloutrage__6  0.548 -0.031  -0.031   -0.040
## 64 EmpatheticAnger__5 ~~ EmpatheticAnger__6  1.354  0.030   0.030    0.075
## 65 EmpatheticAnger__5 ~~    Moraloutrage__2  0.645 -0.029  -0.029   -0.044
## 66 EmpatheticAnger__5 ~~    Moraloutrage__3  0.075 -0.008  -0.008   -0.018
## 67 EmpatheticAnger__5 ~~    Moraloutrage__5  0.547  0.025   0.025    0.040
## 68 EmpatheticAnger__5 ~~    Moraloutrage__6  0.140  0.012   0.012    0.021
## 69 EmpatheticAnger__6 ~~    Moraloutrage__2  0.068  0.010   0.010    0.015
## 70 EmpatheticAnger__6 ~~    Moraloutrage__3  3.203 -0.052  -0.052   -0.118
## 71 EmpatheticAnger__6 ~~    Moraloutrage__5  0.912 -0.033  -0.033   -0.053
## 72 EmpatheticAnger__6 ~~    Moraloutrage__6  0.355  0.019   0.019    0.034
## 73    Moraloutrage__2 ~~    Moraloutrage__3  8.980  0.194   0.194    0.270
## 74    Moraloutrage__2 ~~    Moraloutrage__5  1.193 -0.067  -0.067   -0.066
## 75    Moraloutrage__2 ~~    Moraloutrage__6  1.157 -0.067  -0.067   -0.071
## 76    Moraloutrage__3 ~~    Moraloutrage__5  7.109 -0.157  -0.157   -0.228
## 77    Moraloutrage__3 ~~    Moraloutrage__6  5.965 -0.154  -0.154   -0.246
## 78    Moraloutrage__5 ~~    Moraloutrage__6 19.024  0.250   0.250    0.279
##    sepc.nox
## 24   -0.063
## 25    0.094
## 26   -0.033
## 27   -0.037
## 28    0.054
## 29    0.002
## 30    0.044
## 31    0.021
## 32   -0.002
## 33   -0.094
## 34    0.191
## 35   -0.046
## 36   -0.075
## 37   -0.162
## 38    0.053
## 39    0.013
## 40    0.062
## 41   -0.063
## 42    0.039
## 43   -0.158
## 44   -0.015
## 45   -0.081
## 46    0.073
## 47    0.079
## 48    0.043
## 49    0.022
## 50   -0.138
## 51    0.083
## 52    0.137
## 53   -0.060
## 54   -0.195
## 55    0.144
## 56    0.072
## 57    0.024
## 58    0.027
## 59   -0.041
## 60    0.108
## 61    0.019
## 62   -0.068
## 63   -0.040
## 64    0.075
## 65   -0.044
## 66   -0.018
## 67    0.040
## 68    0.021
## 69    0.015
## 70   -0.118
## 71   -0.053
## 72    0.034
## 73    0.270
## 74   -0.066
## 75   -0.071
## 76   -0.228
## 77   -0.246
## 78    0.279

Bifactor Model

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,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)             NA          NA
##   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

Standardized loadings on the g factor indicate the semi-partial correlation between the item and a general factor underlying all the items.

Standardized loadings on the specific factors indicate the semi-partial correlation between the item and the specific factors underlying the subset of items.

Model Comparison

factorcomp_nested <- compareFit(cfa_fit, CFA_bifactor_fit, nested = TRUE)
summary(factorcomp_nested)
## ################### Nested Model Comparison #########################
## 
## Scaled Chi-Squared Difference Test (method = "satorra.bentler.2001")
## 
## lavaan->unknown():  
##    lavaan NOTE: The "Chisq" column contains standard test statistics, not the 
##    robust test that should be reported per model. A robust difference test is 
##    a function of two standard (not robust) statistics.
##                  Df   AIC   BIC Chisq Chisq diff Df diff Pr(>Chisq)    
## CFA_bifactor_fit 25 13822 13947  52.8                                  
## cfa_fit          34 13841 13929  90.1         29       9    0.00064 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## ####################### Model Fit Indices ###########################
##                  chisq.scaled df.scaled pvalue.scaled rmsea.robust cfi.robust
## CFA_bifactor_fit      26.662†        25          .373        .017†     0.999†
## cfa_fit               50.157         34          .037        .042       .994 
##                  tli.robust  srmr        aic        bic
## CFA_bifactor_fit     0.999† .011† 13821.940† 13947.279 
## cfa_fit               .992  .019  13841.240  13928.977†
## 
## ################## Differences in Fit Indices #######################
##                            df.scaled rmsea.robust cfi.robust tli.robust  srmr
## cfa_fit - CFA_bifactor_fit         9        0.026     -0.005     -0.007 0.008
##                             aic   bic
## cfa_fit - CFA_bifactor_fit 19.3 -18.3