if (!require(lavaan)) install.packages("lavaan")
Loading required package: lavaan
This is lavaan 0.5-23.1097
lavaan is BETA software! Please report any bugs.
library(lavaan)

Multiple Group CFA Invariance Example (data from Brown Chapter 7) using MLR and lavaan: Major Depression Criteria across Men and Women (n = 345 each)

9 items rated by clinicians on a scale of 0 to 8 (0 = none, 8 = very severely disturbing/disabling)

  1. Depressed mood
  2. Loss of interest in usual activities
  3. Weight/appetite change
  4. Sleep disturbance
  5. Psychomotor agitation/retardation
  6. Fatigue/loss of energy
  7. Feelings of worthless/guilt
  8. Concentration difficulties
  9. Thoughts of death/suicidality

Note: lavaan and the semTools package has a simplified set of syntax commands to assess invariance. However, I will teach you the manual version so that you learn what you are doing first (then you can take their shortcuts on your own).

mddAll = read.table(file = "MDDALL.dat", header = FALSE, quote = "", na.strings = "99999")
#adding names to variables
names(mddAll) = c("sex", paste0("item",1:9))
#recoding sex to specify each group name
mddAll$sex[which(mddAll$sex==0)] = "Female"
mddAll$sex[which(mddAll$sex==1)] = "Male"  

In each case, the model for the female reference group is the same and what changes is how the male are allowed to differ.

Configural Invariance Model (Everything separate across groups)

configuralSyntax = "
#===================================================================================================
#Factor loadings all freely estimated in both groups with label for each group
depress =~ c(L1F, L1M)*item1 + c(L2F, L2M)*item2 + c(L3F, L3M)*item3 + 
           c(L4F, L4M)*item4 + c(L5F, L5M)*item5 + c(L6F, L6M)*item6 + 
           c(L7F, L7M)*item7 + c(L8F, L8M)*item8 + c(L9F, L9M)*item9
#===================================================================================================
#Item intercepts all freely estimated in both groups with label for each group
item1 ~ c(I1F, I1M)*1; item2 ~ c(I2F, I2M)*1; item3 ~ c(I3F, I3M)*1; 
item4 ~ c(I4F, I4M)*1; item5 ~ c(I5F, I5M)*1; item6 ~ c(I6F, I6M)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8F, I8M)*1; item9 ~ c(I9F, I9M)*1;
#===================================================================================================
#Redidual variances all freely estimated with label for each group
item1 ~~ c(E1F, E1M)*item1; item2 ~~ c(E2F, E2M)*item2; item3 ~~ c(E3F, E3M)*item3; 
item4 ~~ c(E4F, E4M)*item4; item5 ~~ c(E5F, E5M)*item5; item6 ~~ c(E6F, E6M)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8F, E8M)*item8; item9 ~~ c(E9F, E9M)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in each group
depress ~~ c(1,1)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in each group
depress ~ c(0,0)*0
#===================================================================================================
"
configuralEstimates = lavaan(model = configuralSyntax, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")

The configural model is the first model which allows separate estimation of the factor for each group. As the items are not linked, the factor is not directly comparable.

Metric Invariance Model (loadings held equal across groups)

metricSyntax = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical *********
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts all freely estimated in both groups with label for each group
item1 ~ c(I1F, I1M)*1; item2 ~ c(I2F, I2M)*1; item3 ~ c(I3F, I3M)*1; 
item4 ~ c(I4F, I4M)*1; item5 ~ c(I5F, I5M)*1; item6 ~ c(I6F, I6M)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8F, I8M)*1; item9 ~ c(I9F, I9M)*1;
#===================================================================================================
#Redidual variances all freely estimated with label for each group
item1 ~~ c(E1F, E1M)*item1; item2 ~~ c(E2F, E2M)*item2; item3 ~~ c(E3F, E3M)*item3; 
item4 ~~ c(E4F, E4M)*item4; item5 ~~ c(E5F, E5M)*item5; item6 ~~ c(E6F, E6M)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8F, E8M)*item8; item9 ~~ c(E9F, E9M)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in male group *****
depress ~~ c(1,NA)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in each group
depress ~ c(0,0)*0
#===================================================================================================
"
metricEstimates = lavaan(model = metricSyntax, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
summary(metricEstimates, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
lavaan (0.5-23.1097) converged normally after  48 iterations

  Number of observations per group         
  Female                                           375
  Male                                             375

  Number of missing patterns per group     
  Female                                             1
  Male                                               1

  Estimator                                         ML      Robust
  Minimum Function Test Statistic              102.839      99.532
  Degrees of freedom                                60          60
  P-value (Chi-square)                           0.000       0.001
  Scaling correction factor                                  1.033
    for the Yuan-Bentler correction (Mplus variant)

Chi-square for each group:

  Female                                        54.745      52.985
  Male                                          48.094      46.547

Model test baseline model:

  Minimum Function Test Statistic             1343.575    1218.364
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.966       0.966
  Tucker-Lewis Index (TLI)                       0.960       0.959

  Robust Comparative Fit Index (CFI)                         0.968
  Robust Tucker-Lewis Index (TLI)                            0.961

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)             -13708.862  -13708.862
  Scaling correction factor                                  0.834
    for the MLR correction
  Loglikelihood unrestricted model (H1)     -13657.442  -13657.442
  Scaling correction factor                                  1.014
    for the MLR correction

  Number of free parameters                         48          48
  Akaike (AIC)                               27513.724   27513.724
  Bayesian (BIC)                             27735.488   27735.488
  Sample-size adjusted Bayesian (BIC)        27583.069   27583.069

Root Mean Square Error of Approximation:

  RMSEA                                          0.044       0.042
  90 Percent Confidence Interval          0.029  0.058       0.027  0.056
  P-value RMSEA <= 0.05                          0.758       0.818

  Robust RMSEA                                               0.043
  90 Percent Confidence Interval                             0.027  0.057

Standardized Root Mean Square Residual:

  SRMR                                           0.042       0.042

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Female]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.180    0.082   14.455    0.000    1.180    0.701
    item2     (L2)    1.386    0.088   15.667    0.000    1.386    0.687
    item3     (L3)    0.888    0.084   10.542    0.000    0.888    0.426
    item4     (L4)    1.202    0.091   13.153    0.000    1.202    0.538
    item5     (L5)    1.035    0.084   12.301    0.000    1.035    0.485
    item6     (L6)    1.191    0.084   14.198    0.000    1.191    0.591
    item7     (L7)    0.792    0.092    8.642    0.000    0.792    0.383
    item8     (L8)    1.186    0.094   12.595    0.000    1.186    0.555
    item9     (L9)    0.647    0.073    8.813    0.000    0.647    0.359

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.439    0.158    2.777    0.005    0.439    0.249

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (I1F)    4.184    0.089   47.258    0.000    4.184    2.484
   .item2    (I2F)    3.725    0.104   35.848    0.000    3.725    1.846
   .item3    (I3F)    1.952    0.108   18.058    0.000    1.952    0.936
   .item4    (I4F)    3.589    0.114   31.458    0.000    3.589    1.608
   .item5    (I5F)    2.256    0.110   20.522    0.000    2.256    1.058
   .item6    (I6F)    3.955    0.103   38.237    0.000    3.955    1.961
   .item7    (I7F)    3.869    0.106   36.382    0.000    3.869    1.869
   .item8    (I8F)    3.595    0.111   32.331    0.000    3.595    1.684
   .item9    (I9F)    1.205    0.092   13.053    0.000    1.205    0.669
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1F)    1.444    0.189    7.646    0.000    1.444    0.509
   .item2    (E2F)    2.151    0.220    9.794    0.000    2.151    0.528
   .item3    (E3F)    3.556    0.190   18.738    0.000    3.556    0.818
   .item4    (E4F)    3.540    0.261   13.543    0.000    3.540    0.710
   .item5    (E5F)    3.479    0.206   16.850    0.000    3.479    0.765
   .item6    (E6F)    2.648    0.261   10.140    0.000    2.648    0.651
   .item7    (E7F)    3.656    0.271   13.482    0.000    3.656    0.853
   .item8    (E8F)    3.153    0.275   11.465    0.000    3.153    0.692
   .item9    (E9F)    2.827    0.195   14.492    0.000    2.827    0.871
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.491
    item2             0.472
    item3             0.182
    item4             0.290
    item5             0.235
    item6             0.349
    item7             0.147
    item8             0.308
    item9             0.129


Group 2 [Male]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.180    0.082   14.455    0.000    1.097    0.675
    item2     (L2)    1.386    0.088   15.667    0.000    1.288    0.638
    item3     (L3)    0.888    0.084   10.542    0.000    0.825    0.393
    item4     (L4)    1.202    0.091   13.153    0.000    1.117    0.506
    item5     (L5)    1.035    0.084   12.301    0.000    0.961    0.458
    item6     (L6)    1.191    0.084   14.198    0.000    1.107    0.529
    item7     (L7)    0.792    0.092    8.642    0.000    0.736    0.324
    item8     (L8)    1.186    0.094   12.595    0.000    1.102    0.503
    item9     (L9)    0.647    0.073    8.813    0.000    0.601    0.339

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.862    0.187    4.610    0.000    0.862    0.463

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (I1M)    4.171    0.082   50.608    0.000    4.171    2.568
   .item2    (I2M)    3.685    0.104   35.414    0.000    3.685    1.827
   .item3    (I3M)    1.739    0.108   16.098    0.000    1.739    0.828
   .item4    (I4M)    3.357    0.115   29.160    0.000    3.357    1.522
   .item5    (I5M)    2.235    0.109   20.560    0.000    2.235    1.064
   .item6    (I6M)    3.661    0.109   33.598    0.000    3.661    1.748
   .item7    (I7M)    3.421    0.118   29.014    0.000    3.421    1.506
   .item8    (I8M)    3.517    0.112   31.372    0.000    3.517    1.605
   .item9    (I9M)    1.259    0.092   13.649    0.000    1.259    0.710
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1M)    1.436    0.203    7.060    0.000    1.436    0.544
   .item2    (E2M)    2.412    0.245    9.854    0.000    2.412    0.593
   .item3    (E3M)    3.731    0.196   19.064    0.000    3.731    0.846
   .item4    (E4M)    3.617    0.258   14.027    0.000    3.617    0.744
   .item5    (E5M)    3.488    0.216   16.176    0.000    3.488    0.790
   .item6    (E6M)    3.161    0.270   11.688    0.000    3.161    0.721
   .item7    (E7M)    4.619    0.260   17.798    0.000    4.619    0.895
   .item8    (E8M)    3.587    0.276   12.998    0.000    3.587    0.747
   .item9    (E9M)    2.781    0.208   13.395    0.000    2.781    0.885
    depress           0.863    0.112    7.728    0.000    1.000    1.000

R-Square:
                   Estimate
    item1             0.456
    item2             0.407
    item3             0.154
    item4             0.256
    item5             0.210
    item6             0.279
    item7             0.105
    item8             0.253
    item9             0.115

To test if the metric model fits as well as the configural model, we can use the ANOVA function:

anova(configuralEstimates, metricEstimates)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                    Df   AIC   BIC   Chisq Chisq diff Df diff Pr(>Chisq)
configuralEstimates 52 27526 27784  98.911                              
metricEstimates     60 27514 27736 102.839     4.2593       8      0.833

Here, the metric model is the null hypothesis (technically all loadings being equal) and the configural model is the alternative. As the p-value is rather large, the test indicates the null hypotheisis should not be rejected and therefore, the metric model holds (there is no difference in loadings between groups).

Scalar Invariance Model (all loadings and intercepts held equal across groups)

scalarSyntax1 = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical ****
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7, I7)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances all freely estimated with label for each group
item1 ~~ c(E1F, E1M)*item1; item2 ~~ c(E2F, E2M)*item2; item3 ~~ c(E3F, E3M)*item3; 
item4 ~~ c(E4F, E4M)*item4; item5 ~~ c(E5F, E5M)*item5; item6 ~~ c(E6F, E6M)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8F, E8M)*item8; item9 ~~ c(E9F, E9M)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in male group
depress ~~ c(1,NA)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in male group ****
depress ~ c(0,NA)*1
#===================================================================================================
"
scalarEstimates1 = lavaan(model = scalarSyntax1, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
summary(scalarEstimates1, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
lavaan (0.5-23.1097) converged normally after  53 iterations

  Number of observations per group         
  Female                                           375
  Male                                             375

  Number of missing patterns per group     
  Female                                             1
  Male                                               1

  Estimator                                         ML      Robust
  Minimum Function Test Statistic              115.309     111.951
  Degrees of freedom                                68          68
  P-value (Chi-square)                           0.000       0.001
  Scaling correction factor                                  1.030
    for the Yuan-Bentler correction (Mplus variant)

Chi-square for each group:

  Female                                        60.715      58.946
  Male                                          54.594      53.004

Model test baseline model:

  Minimum Function Test Statistic             1343.575    1218.364
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.963       0.962
  Tucker-Lewis Index (TLI)                       0.961       0.959

  Robust Comparative Fit Index (CFI)                         0.964
  Robust Tucker-Lewis Index (TLI)                            0.962

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)             -13715.097  -13715.097
  Scaling correction factor                                  0.681
    for the MLR correction
  Loglikelihood unrestricted model (H1)     -13657.442  -13657.442
  Scaling correction factor                                  1.014
    for the MLR correction

  Number of free parameters                         40          40
  Akaike (AIC)                               27510.194   27510.194
  Bayesian (BIC)                             27694.997   27694.997
  Sample-size adjusted Bayesian (BIC)        27567.981   27567.981

Root Mean Square Error of Approximation:

  RMSEA                                          0.043       0.042
  90 Percent Confidence Interval          0.029  0.056       0.027  0.055
  P-value RMSEA <= 0.05                          0.794       0.846

  Robust RMSEA                                               0.042
  90 Percent Confidence Interval                             0.028  0.056

Standardized Root Mean Square Residual:

  SRMR                                           0.046       0.046

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Female]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.171    0.081   14.385    0.000    1.171    0.696
    item2     (L2)    1.377    0.089   15.534    0.000    1.377    0.683
    item3     (L3)    0.894    0.084   10.621    0.000    0.894    0.429
    item4     (L4)    1.209    0.091   13.343    0.000    1.209    0.541
    item5     (L5)    1.033    0.084   12.275    0.000    1.033    0.485
    item6     (L6)    1.199    0.083   14.424    0.000    1.199    0.593
    item7     (L7)    0.803    0.091    8.853    0.000    0.803    0.386
    item8     (L8)    1.184    0.094   12.534    0.000    1.184    0.555
    item9     (L9)    0.640    0.074    8.604    0.000    0.640    0.356

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.454    0.159    2.852    0.004    0.454    0.255

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.240    0.077   54.984    0.000    4.240    2.520
   .item2     (I2)    3.773    0.092   41.111    0.000    3.773    1.872
   .item3     (I3)    1.897    0.087   21.735    0.000    1.897    0.909
   .item4     (I4)    3.541    0.096   37.066    0.000    3.541    1.584
   .item5     (I5)    2.303    0.090   25.622    0.000    2.303    1.080
   .item6     (I6)    3.882    0.091   42.556    0.000    3.882    1.921
   .item7     (I7)    3.711    0.087   42.428    0.000    3.711    1.784
   .item8     (I8)    3.620    0.094   38.567    0.000    3.620    1.696
   .item9     (I9)    1.268    0.072   17.592    0.000    1.268    0.704
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1F)    1.460    0.193    7.576    0.000    1.460    0.516
   .item2    (E2F)    2.166    0.223    9.726    0.000    2.166    0.533
   .item3    (E3F)    3.555    0.191   18.619    0.000    3.555    0.816
   .item4    (E4F)    3.535    0.261   13.520    0.000    3.535    0.708
   .item5    (E5F)    3.478    0.206   16.880    0.000    3.478    0.765
   .item6    (E6F)    2.648    0.260   10.183    0.000    2.648    0.648
   .item7    (E7F)    3.682    0.267   13.767    0.000    3.682    0.851
   .item8    (E8F)    3.155    0.277   11.376    0.000    3.155    0.692
   .item9    (E9F)    2.834    0.192   14.790    0.000    2.834    0.874
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.484
    item2             0.467
    item3             0.184
    item4             0.292
    item5             0.235
    item6             0.352
    item7             0.149
    item8             0.308
    item9             0.126


Group 2 [Male]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.171    0.081   14.385    0.000    1.089    0.671
    item2     (L2)    1.377    0.089   15.534    0.000    1.280    0.635
    item3     (L3)    0.894    0.084   10.621    0.000    0.831    0.395
    item4     (L4)    1.209    0.091   13.343    0.000    1.123    0.509
    item5     (L5)    1.033    0.084   12.275    0.000    0.960    0.457
    item6     (L6)    1.199    0.083   14.424    0.000    1.114    0.531
    item7     (L7)    0.803    0.091    8.853    0.000    0.746    0.327
    item8     (L8)    1.184    0.094   12.534    0.000    1.100    0.502
    item9     (L9)    0.640    0.074    8.604    0.000    0.595    0.336

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.879    0.185    4.754    0.000    0.879    0.468

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.240    0.077   54.984    0.000    4.240    2.612
   .item2     (I2)    3.773    0.092   41.111    0.000    3.773    1.870
   .item3     (I3)    1.897    0.087   21.735    0.000    1.897    0.902
   .item4     (I4)    3.541    0.096   37.066    0.000    3.541    1.604
   .item5     (I5)    2.303    0.090   25.622    0.000    2.303    1.097
   .item6     (I6)    3.882    0.091   42.556    0.000    3.882    1.850
   .item7     (I7)    3.711    0.087   42.428    0.000    3.711    1.625
   .item8     (I8)    3.620    0.094   38.567    0.000    3.620    1.653
   .item9     (I9)    1.268    0.072   17.592    0.000    1.268    0.715
    depress          -0.112    0.083   -1.345    0.179   -0.120   -0.120

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1M)    1.451    0.200    7.258    0.000    1.451    0.550
   .item2    (E2M)    2.431    0.240   10.124    0.000    2.431    0.597
   .item3    (E3M)    3.730    0.196   19.059    0.000    3.730    0.844
   .item4    (E4M)    3.611    0.258   13.975    0.000    3.611    0.741
   .item5    (E5M)    3.489    0.216   16.166    0.000    3.489    0.791
   .item6    (E6M)    3.161    0.276   11.468    0.000    3.161    0.718
   .item7    (E7M)    4.658    0.277   16.831    0.000    4.658    0.893
   .item8    (E8M)    3.588    0.274   13.119    0.000    3.588    0.748
   .item9    (E9M)    2.788    0.213   13.105    0.000    2.788    0.887
    depress           0.864    0.112    7.720    0.000    1.000    1.000

R-Square:
                   Estimate
    item1             0.450
    item2             0.403
    item3             0.156
    item4             0.259
    item5             0.209
    item6             0.282
    item7             0.107
    item8             0.252
    item9             0.113

We can check to see if the model fit was worse, which it was not. The p-value below indicates the scalar model fits as well as the metric model.

anova(metricEstimates, scalarEstimates)
Error in anova(metricEstimates, scalarEstimates) : 
  object 'scalarEstimates' not found

To demonstrate how to determine if a parameter may need freeing, and what happens if we free the parameter to be unequal across groups, we can return to our metric syntax and create a series of new parameters with intercept differences for each of the items.

#get all modification indices
scalarMI1 = modificationindices(scalarEstimates1, free.remove = FALSE, maximum.number = 10000)
#restrict to only means shown
scalarMI1[which(scalarMI1$op == "~1"),]
       lhs op rhs block    mi mi.scaled    epc sepc.lv sepc.all sepc.nox
10   item1 ~1         1 0.653     0.633 -0.052  -0.052   -0.031   -0.031
11   item2 ~1         1 0.193     0.187 -0.034  -0.034   -0.017   -0.017
12   item3 ~1         1 0.340     0.330  0.058   0.058    0.028    0.028
13   item4 ~1         1 0.268     0.260  0.053   0.053    0.024    0.024
14   item5 ~1         1 0.254     0.247 -0.050  -0.050   -0.024   -0.024
15   item6 ~1         1 0.846     0.821  0.082   0.082    0.041    0.041
16   item7 ~1         1 2.648     2.571  0.164   0.164    0.079    0.079
17   item8 ~1         1 0.086     0.084 -0.028  -0.028   -0.013   -0.013
18   item9 ~1         1 0.541     0.525 -0.065  -0.065   -0.036   -0.036
40   item1 ~1         2 0.524     0.508  0.042   0.042    0.026    0.026
41   item2 ~1         2 0.171     0.166  0.030   0.030    0.015    0.015
42   item3 ~1         2 0.357     0.346 -0.061  -0.061   -0.029   -0.029
43   item4 ~1         2 0.275     0.267 -0.054  -0.054   -0.024   -0.024
44   item5 ~1         2 0.256     0.249  0.051   0.051    0.024    0.024
45   item6 ~1         2 0.996     0.967 -0.097  -0.097   -0.046   -0.046
46   item7 ~1         2 3.329     3.232 -0.207  -0.207   -0.090   -0.090
47   item8 ~1         2 0.098     0.095  0.032   0.032    0.015    0.015
48   item9 ~1         2 0.534     0.518  0.064   0.064    0.036    0.036
60 depress ~1         2 0.000     0.000  0.000   0.000    0.000    0.000

For each item, the item intercepts section of the output will show a MI value, which is a Score test. Here, item seven has the largest MI, indicating the item intercepts may be different (but the p-value would be small). For purposes of this example, we will allow the intercept for item seven to vary across groups and re-estimate the model. If this were an actual analysis, we would have left item 7 invariant

scalarSyntax2 = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical ****
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances all freely estimated with label for each group
item1 ~~ c(E1F, E1M)*item1; item2 ~~ c(E2F, E2M)*item2; item3 ~~ c(E3F, E3M)*item3; 
item4 ~~ c(E4F, E4M)*item4; item5 ~~ c(E5F, E5M)*item5; item6 ~~ c(E6F, E6M)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8F, E8M)*item8; item9 ~~ c(E9F, E9M)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in male group
depress ~~ c(1,NA)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in male group
depress ~ c(0,NA)*1
#===================================================================================================
IntDiff7 := I7F-I7M
"
scalarEstimates2 = lavaan(model = scalarSyntax2, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
summary(scalarEstimates2, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
lavaan (0.5-23.1097) converged normally after  55 iterations

  Number of observations per group         
  Female                                           375
  Male                                             375

  Number of missing patterns per group     
  Female                                             1
  Male                                               1

  Estimator                                         ML      Robust
  Minimum Function Test Statistic              109.216     106.031
  Degrees of freedom                                67          67
  P-value (Chi-square)                           0.001       0.002
  Scaling correction factor                                  1.030
    for the Yuan-Bentler correction (Mplus variant)

Chi-square for each group:

  Female                                        57.897      56.209
  Male                                          51.318      49.822

Model test baseline model:

  Minimum Function Test Statistic             1343.575    1218.364
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.967       0.966
  Tucker-Lewis Index (TLI)                       0.964       0.963

  Robust Comparative Fit Index (CFI)                         0.968
  Robust Tucker-Lewis Index (TLI)                            0.966

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)             -13712.050  -13712.050
  Scaling correction factor                                  0.699
    for the MLR correction
  Loglikelihood unrestricted model (H1)     -13657.442  -13657.442
  Scaling correction factor                                  1.014
    for the MLR correction

  Number of free parameters                         41          41
  Akaike (AIC)                               27506.100   27506.100
  Bayesian (BIC)                             27695.523   27695.523
  Sample-size adjusted Bayesian (BIC)        27565.332   27565.332

Root Mean Square Error of Approximation:

  RMSEA                                          0.041       0.039
  90 Percent Confidence Interval          0.026  0.055       0.025  0.053
  P-value RMSEA <= 0.05                          0.855       0.896

  Robust RMSEA                                               0.040
  90 Percent Confidence Interval                             0.025  0.054

Standardized Root Mean Square Residual:

  SRMR                                           0.044       0.044

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Female]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.174    0.082   14.377    0.000    1.174    0.698
    item2     (L2)    1.381    0.089   15.564    0.000    1.381    0.685
    item3     (L3)    0.894    0.084   10.598    0.000    0.894    0.428
    item4     (L4)    1.208    0.091   13.309    0.000    1.208    0.540
    item5     (L5)    1.034    0.084   12.287    0.000    1.034    0.485
    item6     (L6)    1.198    0.083   14.364    0.000    1.198    0.592
    item7     (L7)    0.791    0.092    8.603    0.000    0.791    0.382
    item8     (L8)    1.185    0.094   12.561    0.000    1.185    0.555
    item9     (L9)    0.642    0.074    8.630    0.000    0.642    0.356

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.449    0.159    2.825    0.005    0.449    0.253

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.228    0.078   54.510    0.000    4.228    2.512
   .item2     (I2)    3.761    0.092   40.840    0.000    3.761    1.865
   .item3     (I3)    1.887    0.087   21.651    0.000    1.887    0.904
   .item4     (I4)    3.528    0.096   36.780    0.000    3.528    1.578
   .item5     (I5)    2.292    0.090   25.462    0.000    2.292    1.075
   .item6     (I6)    3.870    0.092   42.207    0.000    3.870    1.915
   .item7    (I7F)    3.869    0.106   36.382    0.000    3.869    1.869
   .item8     (I8)    3.609    0.094   38.382    0.000    3.609    1.690
   .item9     (I9)    1.261    0.072   17.570    0.000    1.261    0.700
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1F)    1.455    0.191    7.595    0.000    1.455    0.513
   .item2    (E2F)    2.160    0.222    9.738    0.000    2.160    0.531
   .item3    (E3F)    3.557    0.191   18.613    0.000    3.557    0.817
   .item4    (E4F)    3.539    0.261   13.545    0.000    3.539    0.708
   .item5    (E5F)    3.478    0.206   16.874    0.000    3.478    0.765
   .item6    (E6F)    2.651    0.260   10.205    0.000    2.651    0.649
   .item7    (E7F)    3.658    0.271   13.485    0.000    3.658    0.854
   .item8    (E8F)    3.154    0.277   11.404    0.000    3.154    0.692
   .item9    (E9F)    2.832    0.192   14.743    0.000    2.832    0.873
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.487
    item2             0.469
    item3             0.183
    item4             0.292
    item5             0.235
    item6             0.351
    item7             0.146
    item8             0.308
    item9             0.127


Group 2 [Male]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.174    0.082   14.377    0.000    1.091    0.672
    item2     (L2)    1.381    0.089   15.564    0.000    1.283    0.636
    item3     (L3)    0.894    0.084   10.598    0.000    0.830    0.395
    item4     (L4)    1.208    0.091   13.309    0.000    1.122    0.508
    item5     (L5)    1.034    0.084   12.287    0.000    0.961    0.457
    item6     (L6)    1.198    0.083   14.364    0.000    1.113    0.530
    item7     (L7)    0.791    0.092    8.603    0.000    0.735    0.324
    item8     (L8)    1.185    0.094   12.561    0.000    1.101    0.503
    item9     (L9)    0.642    0.074    8.630    0.000    0.597    0.337

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.872    0.186    4.696    0.000    0.872    0.466

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.228    0.078   54.510    0.000    4.228    2.604
   .item2     (I2)    3.761    0.092   40.840    0.000    3.761    1.864
   .item3     (I3)    1.887    0.087   21.651    0.000    1.887    0.897
   .item4     (I4)    3.528    0.096   36.780    0.000    3.528    1.598
   .item5     (I5)    2.292    0.090   25.462    0.000    2.292    1.091
   .item6     (I6)    3.870    0.092   42.207    0.000    3.870    1.844
   .item7    (I7M)    3.493    0.123   28.376    0.000    3.493    1.538
   .item8     (I8)    3.609    0.094   38.382    0.000    3.609    1.647
   .item9     (I9)    1.261    0.072   17.570    0.000    1.261    0.712
    depress          -0.090    0.083   -1.087    0.277   -0.097   -0.097

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1    (E1M)    1.445    0.201    7.186    0.000    1.445    0.548
   .item2    (E2M)    2.423    0.242   10.026    0.000    2.423    0.595
   .item3    (E3M)    3.733    0.196   19.086    0.000    3.733    0.844
   .item4    (E4M)    3.615    0.260   13.913    0.000    3.615    0.742
   .item5    (E5M)    3.488    0.216   16.160    0.000    3.488    0.791
   .item6    (E6M)    3.166    0.277   11.417    0.000    3.166    0.719
   .item7    (E7M)    4.620    0.259   17.804    0.000    4.620    0.895
   .item8    (E8M)    3.587    0.274   13.071    0.000    3.587    0.747
   .item9    (E9M)    2.787    0.212   13.148    0.000    2.787    0.887
    depress           0.864    0.112    7.725    0.000    1.000    1.000

R-Square:
                   Estimate
    item1             0.452
    item2             0.405
    item3             0.156
    item4             0.258
    item5             0.209
    item6             0.281
    item7             0.105
    item8             0.253
    item9             0.113

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    IntDiff7          0.377    0.153    2.463    0.014    0.377    0.332
anova(scalarEstimates2, scalarEstimates, metricEstimates)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                 Df   AIC   BIC  Chisq Chisq diff Df diff Pr(>Chisq)  
metricEstimates  60 27514 27736 102.84                                
scalarEstimates2 67 27506 27696 109.22     6.3594       7    0.49846  
scalarEstimates  68 27510 27695 115.31     5.9296       1    0.01489 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Here we see the model fist significantly better than the previous scalar model (p = 0.01489) when the intercept for this item is freed and yet still fits as well as the metric model, so we will leave this item intercept free and say there is partial metric invariance.

Residual Variance Invariance Model (error variances held equal for all except item 7 because it didn’t pass scalar)

To begin, we will first start with the residual variances, leaving the residual covariance free across groups.

residualSyntax1 = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances set to be equal in both groups so label for each group is identical
item1 ~~ c(E1, E1)*item1; item2 ~~ c(E2, E2)*item2; item3 ~~ c(E3, E3)*item3; 
item4 ~~ c(E4, E4)*item4; item5 ~~ c(E5, E5)*item5; item6 ~~ c(E6, E6)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8, E8)*item8; item9 ~~ c(E9, E9)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in male group
depress ~~ c(1,NA)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in male group
depress ~ c(0,NA)*1
#===================================================================================================
IntDiff7 := I7F-I7M
"
residualEstimates1 = lavaan(model = residualSyntax1, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
summary(residualEstimates1, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
lavaan (0.5-23.1097) converged normally after  52 iterations

  Number of observations per group         
  Female                                           375
  Male                                             375

  Number of missing patterns per group     
  Female                                             1
  Male                                               1

  Estimator                                         ML      Robust
  Minimum Function Test Statistic              114.059     112.019
  Degrees of freedom                                75          75
  P-value (Chi-square)                           0.002       0.004
  Scaling correction factor                                  1.018
    for the Yuan-Bentler correction (Mplus variant)

Chi-square for each group:

  Female                                        60.752      59.666
  Male                                          53.306      52.353

Model test baseline model:

  Minimum Function Test Statistic             1343.575    1218.364
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.969       0.968
  Tucker-Lewis Index (TLI)                       0.971       0.969

  Robust Comparative Fit Index (CFI)                         0.970
  Robust Tucker-Lewis Index (TLI)                            0.971

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)             -13714.472  -13714.472
  Scaling correction factor                                  0.572
    for the MLR correction
  Loglikelihood unrestricted model (H1)     -13657.442  -13657.442
  Scaling correction factor                                  1.014
    for the MLR correction

  Number of free parameters                         33          33
  Akaike (AIC)                               27494.944   27494.944
  Bayesian (BIC)                             27647.406   27647.406
  Sample-size adjusted Bayesian (BIC)        27542.618   27542.618

Root Mean Square Error of Approximation:

  RMSEA                                          0.037       0.036
  90 Percent Confidence Interval          0.022  0.051       0.021  0.050
  P-value RMSEA <= 0.05                          0.942       0.956

  Robust RMSEA                                               0.037
  90 Percent Confidence Interval                             0.021  0.050

Standardized Root Mean Square Residual:

  SRMR                                           0.048       0.048

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Female]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.167    0.082   14.180    0.000    1.167    0.696
    item2     (L2)    1.372    0.089   15.358    0.000    1.372    0.671
    item3     (L3)    0.888    0.083   10.655    0.000    0.888    0.422
    item4     (L4)    1.203    0.090   13.341    0.000    1.203    0.537
    item5     (L5)    1.031    0.084   12.316    0.000    1.031    0.484
    item6     (L6)    1.197    0.083   14.492    0.000    1.197    0.575
    item7     (L7)    0.787    0.092    8.593    0.000    0.787    0.381
    item8     (L8)    1.178    0.093   12.608    0.000    1.178    0.540
    item9     (L9)    0.639    0.074    8.602    0.000    0.639    0.356

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.484    0.160    3.030    0.002    0.484    0.266

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.229    0.078   53.943    0.000    4.229    2.522
   .item2     (I2)    3.763    0.093   40.533    0.000    3.763    1.840
   .item3     (I3)    1.886    0.087   21.609    0.000    1.886    0.895
   .item4     (I4)    3.528    0.096   36.880    0.000    3.528    1.574
   .item5     (I5)    2.292    0.090   25.455    0.000    2.292    1.076
   .item6     (I6)    3.862    0.091   42.539    0.000    3.862    1.855
   .item7    (I7F)    3.869    0.106   36.382    0.000    3.869    1.872
   .item8     (I8)    3.609    0.094   38.326    0.000    3.609    1.655
   .item9     (I9)    1.261    0.071   17.668    0.000    1.261    0.703
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (E1)    1.447    0.145    9.954    0.000    1.447    0.515
   .item2     (E2)    2.300    0.177   12.965    0.000    2.300    0.550
   .item3     (E3)    3.646    0.143   25.449    0.000    3.646    0.822
   .item4     (E4)    3.574    0.197   18.123    0.000    3.574    0.712
   .item5     (E5)    3.479    0.161   21.647    0.000    3.479    0.766
   .item6     (E6)    2.903    0.199   14.558    0.000    2.903    0.670
   .item7    (E7F)    3.653    0.271   13.462    0.000    3.653    0.855
   .item8     (E8)    3.367    0.207   16.293    0.000    3.367    0.708
   .item9     (E9)    2.809    0.143   19.650    0.000    2.809    0.873
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.485
    item2             0.450
    item3             0.178
    item4             0.288
    item5             0.234
    item6             0.330
    item7             0.145
    item8             0.292
    item9             0.127


Group 2 [Male]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.167    0.082   14.180    0.000    1.097    0.674
    item2     (L2)    1.372    0.089   15.358    0.000    1.289    0.648
    item3     (L3)    0.888    0.083   10.655    0.000    0.834    0.400
    item4     (L4)    1.203    0.090   13.341    0.000    1.130    0.513
    item5     (L5)    1.031    0.084   12.316    0.000    0.968    0.461
    item6     (L6)    1.197    0.083   14.492    0.000    1.124    0.551
    item7     (L7)    0.787    0.092    8.593    0.000    0.739    0.325
    item8     (L8)    1.178    0.093   12.608    0.000    1.107    0.516
    item9     (L9)    0.639    0.074    8.602    0.000    0.600    0.337

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.832    0.151    5.497    0.000    0.832    0.456

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.229    0.078   53.943    0.000    4.229    2.598
   .item2     (I2)    3.763    0.093   40.533    0.000    3.763    1.890
   .item3     (I3)    1.886    0.087   21.609    0.000    1.886    0.905
   .item4     (I4)    3.528    0.096   36.880    0.000    3.528    1.602
   .item5     (I5)    2.292    0.090   25.455    0.000    2.292    1.091
   .item6     (I6)    3.862    0.091   42.539    0.000    3.862    1.892
   .item7    (I7M)    3.493    0.123   28.381    0.000    3.493    1.535
   .item8     (I8)    3.609    0.094   38.326    0.000    3.609    1.684
   .item9     (I9)    1.261    0.071   17.668    0.000    1.261    0.708
    depress          -0.091    0.084   -1.084    0.278   -0.097   -0.097

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (E1)    1.447    0.145    9.954    0.000    1.447    0.546
   .item2     (E2)    2.300    0.177   12.965    0.000    2.300    0.581
   .item3     (E3)    3.646    0.143   25.449    0.000    3.646    0.840
   .item4     (E4)    3.574    0.197   18.123    0.000    3.574    0.737
   .item5     (E5)    3.479    0.161   21.647    0.000    3.479    0.788
   .item6     (E6)    2.903    0.199   14.558    0.000    2.903    0.697
   .item7    (E7M)    4.629    0.260   17.815    0.000    4.629    0.894
   .item8     (E8)    3.367    0.207   16.293    0.000    3.367    0.733
   .item9     (E9)    2.809    0.143   19.650    0.000    2.809    0.886
    depress           0.883    0.111    7.936    0.000    1.000    1.000

R-Square:
                   Estimate
    item1             0.454
    item2             0.419
    item3             0.160
    item4             0.263
    item5             0.212
    item6             0.303
    item7             0.106
    item8             0.267
    item9             0.114

Defined Parameters:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
    IntDiff7          0.377    0.153    2.463    0.014    0.377    0.337
anova(scalarEstimates2, residualEstimates1)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                   Df   AIC   BIC  Chisq Chisq diff Df diff Pr(>Chisq)
scalarEstimates2   67 27506 27696 109.22                              
residualEstimates1 75 27495 27647 114.06      5.269       8     0.7285

Here we see residual invariance holds as the p-value suggests this model fits as well as the last (partial) scalar invariance model.

Next, we will investigate the residual covariance:

residualSyntax2 = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances set to be equal in both groups so label for each group is identical
item1 ~~ c(E1, E1)*item1; item2 ~~ c(E2, E2)*item2; item3 ~~ c(E3, E3)*item3; 
item4 ~~ c(E4, E4)*item4; item5 ~~ c(E5, E5)*item5; item6 ~~ c(E6, E6)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8, E8)*item8; item9 ~~ c(E9, E9)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group ****
item1 ~~ c(EC12, EC12)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in male group
depress ~~ c(1,NA)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in male group
depress ~ c(0,NA)*1
#===================================================================================================
"
residualEstimates2 = lavaan(model = residualSyntax2, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
anova(residualEstimates1, residualEstimates2)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                   Df   AIC   BIC  Chisq Chisq diff Df diff Pr(>Chisq)  
residualEstimates1 75 27495 27647 114.06                                
residualEstimates2 76 27502 27650 123.35     4.1724       1    0.04109 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

The low p-value indicates holding the residual covariance between items 1 and 2 equal made the model fit worse. Therefore, we will leave it separate by group.

STRUCTURAL INVARIANCE TESTS

Factor Variance Invariance Model

structuralVariance = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances set to be equal in both groups so label for each group is identical
item1 ~~ c(E1, E1)*item1; item2 ~~ c(E2, E2)*item2; item3 ~~ c(E3, E3)*item3; 
item4 ~~ c(E4, E4)*item4; item5 ~~ c(E5, E5)*item5; item6 ~~ c(E6, E6)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8, E8)*item8; item9 ~~ c(E9, E9)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in Male group ****
depress ~~ c(1,1)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in Male group
depress ~ c(0,NA)*1
#===================================================================================================
"
structuralVariance = lavaan(model = structuralVariance, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
anova(residualEstimates1, structuralVariance)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                   Df   AIC   BIC  Chisq Chisq diff Df diff Pr(>Chisq)
residualEstimates1 75 27495 27647 114.06                              
structuralVariance 76 27494 27642 114.90     1.0095       1      0.315

This test reveals setting the factor variance equal does not make the model fit worse, so we can keep them equal.

Factor Mean Invariance Model

structuralMean = "
#===================================================================================================
#Factor loadings set to be equal in both groups so label for each group is identical 
depress =~ c(L1, L1)*item1 + c(L2, L2)*item2 + c(L3, L3)*item3 + 
           c(L4, L4)*item4 + c(L5, L5)*item5 + c(L6, L6)*item6 + 
           c(L7, L7)*item7 + c(L8, L8)*item8 + c(L9, L9)*item9
#===================================================================================================
#Item intercepts set to be equal in both groups so label for each group is identical
item1 ~ c(I1, I1)*1; item2 ~ c(I2, I2)*1; item3 ~ c(I3, I3)*1; 
item4 ~ c(I4, I4)*1; item5 ~ c(I5, I5)*1; item6 ~ c(I6, I6)*1; 
item7 ~ c(I7F, I7M)*1; item8 ~ c(I8, I8)*1; item9 ~ c(I9, I9)*1;
#===================================================================================================
#Redidual variances set to be equal in both groups so label for each group is identical
item1 ~~ c(E1, E1)*item1; item2 ~~ c(E2, E2)*item2; item3 ~~ c(E3, E3)*item3; 
item4 ~~ c(E4, E4)*item4; item5 ~~ c(E5, E5)*item5; item6 ~~ c(E6, E6)*item6; 
item7 ~~ c(E7F, E7M)*item7; item8 ~~ c(E8, E8)*item8; item9 ~~ c(E9, E9)*item9;
#===================================================================================================
#Residual covariance freely estimated in both groups with label for each group
item1 ~~ c(EC12F, EC12M)*item2
#===================================================================================================
#Factor variance fixed to 1 for identification in Female group but estimated in Male group ****
depress ~~ c(1,1)*depress
#===================================================================================================
#Factor mean fixed to zero for identification in Female group but estimated in Male group
depress ~ c(0,0)*0
#===================================================================================================
"
structuralMean = lavaan(model = structuralMean, data = mddAll, estimator = "MLR", mimic = "mplus", group="sex")
summary(structuralMean, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
lavaan (0.5-23.1097) converged normally after  52 iterations

  Number of observations per group         
  Female                                           375
  Male                                             375

  Number of missing patterns per group     
  Female                                             1
  Male                                               1

  Estimator                                         ML      Robust
  Minimum Function Test Statistic              116.143     114.340
  Degrees of freedom                                77          77
  P-value (Chi-square)                           0.003       0.004
  Scaling correction factor                                  1.016
    for the Yuan-Bentler correction (Mplus variant)

Chi-square for each group:

  Female                                        61.790      60.831
  Male                                          54.353      53.509

Model test baseline model:

  Minimum Function Test Statistic             1343.575    1218.364
  Degrees of freedom                                72          72
  P-value                                        0.000       0.000

User model versus baseline model:

  Comparative Fit Index (CFI)                    0.969       0.967
  Tucker-Lewis Index (TLI)                       0.971       0.970

  Robust Comparative Fit Index (CFI)                         0.970
  Robust Tucker-Lewis Index (TLI)                            0.972

Loglikelihood and Information Criteria:

  Loglikelihood user model (H0)             -13715.514  -13715.514
  Scaling correction factor                                  0.559
    for the MLR correction
  Loglikelihood unrestricted model (H1)     -13657.442  -13657.442
  Scaling correction factor                                  1.014
    for the MLR correction

  Number of free parameters                         31          31
  Akaike (AIC)                               27493.027   27493.027
  Bayesian (BIC)                             27636.250   27636.250
  Sample-size adjusted Bayesian (BIC)        27537.813   27537.813

Root Mean Square Error of Approximation:

  RMSEA                                          0.037       0.036
  90 Percent Confidence Interval          0.022  0.050       0.021  0.049
  P-value RMSEA <= 0.05                          0.950       0.961

  Robust RMSEA                                               0.036
  90 Percent Confidence Interval                             0.021  0.050

Standardized Root Mean Square Residual:

  SRMR                                           0.050       0.050

Parameter Estimates:

  Information                                 Observed
  Standard Errors                   Robust.huber.white


Group 1 [Female]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.135    0.068   16.637    0.000    1.135    0.686
    item2     (L2)    1.336    0.075   17.802    0.000    1.336    0.661
    item3     (L3)    0.860    0.077   11.228    0.000    0.860    0.411
    item4     (L4)    1.168    0.083   14.063    0.000    1.168    0.526
    item5     (L5)    1.001    0.076   13.194    0.000    1.001    0.473
    item6     (L6)    1.161    0.077   15.096    0.000    1.161    0.563
    item7     (L7)    0.766    0.086    8.914    0.000    0.766    0.372
    item8     (L8)    1.144    0.082   13.946    0.000    1.144    0.529
    item9     (L9)    0.622    0.069    9.001    0.000    0.622    0.348

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.485    0.159    3.047    0.002    0.485    0.266

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.176    0.060   69.282    0.000    4.176    2.525
   .item2     (I2)    3.702    0.074   50.291    0.000    3.702    1.833
   .item3     (I3)    1.845    0.077   24.121    0.000    1.845    0.881
   .item4     (I4)    3.473    0.081   42.797    0.000    3.473    1.563
   .item5     (I5)    2.245    0.077   29.048    0.000    2.245    1.061
   .item6     (I6)    3.808    0.075   50.564    0.000    3.808    1.846
   .item7    (I7F)    3.842    0.104   37.048    0.000    3.842    1.866
   .item8     (I8)    3.556    0.079   45.035    0.000    3.556    1.644
   .item9     (I9)    1.232    0.065   18.878    0.000    1.232    0.689
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (E1)    1.447    0.145    9.949    0.000    1.447    0.529
   .item2     (E2)    2.295    0.178   12.893    0.000    2.295    0.563
   .item3     (E3)    3.649    0.143   25.557    0.000    3.649    0.831
   .item4     (E4)    3.576    0.197   18.172    0.000    3.576    0.724
   .item5     (E5)    3.478    0.161   21.617    0.000    3.478    0.776
   .item6     (E6)    2.906    0.199   14.596    0.000    2.906    0.683
   .item7    (E7F)    3.654    0.271   13.478    0.000    3.654    0.862
   .item8     (E8)    3.368    0.207   16.275    0.000    3.368    0.720
   .item9     (E9)    2.807    0.143   19.667    0.000    2.807    0.879
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.471
    item2             0.437
    item3             0.169
    item4             0.276
    item5             0.224
    item6             0.317
    item7             0.138
    item8             0.280
    item9             0.121


Group 2 [Male]:

Latent Variables:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
  depress =~                                                            
    item1     (L1)    1.135    0.068   16.637    0.000    1.135    0.686
    item2     (L2)    1.336    0.075   17.802    0.000    1.336    0.661
    item3     (L3)    0.860    0.077   11.228    0.000    0.860    0.411
    item4     (L4)    1.168    0.083   14.063    0.000    1.168    0.526
    item5     (L5)    1.001    0.076   13.194    0.000    1.001    0.473
    item6     (L6)    1.161    0.077   15.096    0.000    1.161    0.563
    item7     (L7)    0.766    0.086    8.914    0.000    0.766    0.336
    item8     (L8)    1.144    0.082   13.946    0.000    1.144    0.529
    item9     (L9)    0.622    0.069    9.001    0.000    0.622    0.348

Covariances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
 .item1 ~~                                                              
   .item2   (EC12)    0.829    0.152    5.448    0.000    0.829    0.455

Intercepts:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (I1)    4.176    0.060   69.282    0.000    4.176    2.525
   .item2     (I2)    3.702    0.074   50.291    0.000    3.702    1.833
   .item3     (I3)    1.845    0.077   24.121    0.000    1.845    0.881
   .item4     (I4)    3.473    0.081   42.797    0.000    3.473    1.563
   .item5     (I5)    2.245    0.077   29.048    0.000    2.245    1.061
   .item6     (I6)    3.808    0.075   50.564    0.000    3.808    1.846
   .item7    (I7M)    3.448    0.116   29.819    0.000    3.448    1.510
   .item8     (I8)    3.556    0.079   45.035    0.000    3.556    1.644
   .item9     (I9)    1.232    0.065   18.878    0.000    1.232    0.689
    depress           0.000                               0.000    0.000

Variances:
                   Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
   .item1     (E1)    1.447    0.145    9.949    0.000    1.447    0.529
   .item2     (E2)    2.295    0.178   12.893    0.000    2.295    0.563
   .item3     (E3)    3.649    0.143   25.557    0.000    3.649    0.831
   .item4     (E4)    3.576    0.197   18.172    0.000    3.576    0.724
   .item5     (E5)    3.478    0.161   21.617    0.000    3.478    0.776
   .item6     (E6)    2.906    0.199   14.596    0.000    2.906    0.683
   .item7    (E7M)    4.625    0.260   17.769    0.000    4.625    0.887
   .item8     (E8)    3.368    0.207   16.275    0.000    3.368    0.720
   .item9     (E9)    2.807    0.143   19.667    0.000    2.807    0.879
    depress           1.000                               1.000    1.000

R-Square:
                   Estimate
    item1             0.471
    item2             0.437
    item3             0.169
    item4             0.276
    item5             0.224
    item6             0.317
    item7             0.113
    item8             0.280
    item9             0.121
anova(structuralMean, structuralVariance)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                   Df   AIC   BIC  Chisq Chisq diff Df diff Pr(>Chisq)
structuralVariance 76 27494 27642 114.90                              
structuralMean     77 27493 27636 116.14     1.2252       1     0.2683
anova(structuralMean, configuralEstimates)
Scaled Chi Square Difference Test (method = "satorra.bentler.2001")

                    Df   AIC   BIC   Chisq Chisq diff Df diff Pr(>Chisq)
configuralEstimates 52 27526 27784  98.911                              
structuralMean      77 27493 27636 116.143     18.255      25     0.8314

And here we see the means do not differ by group, nor does the final model differ from the initial configural model. We are done.

Write-up of CFA with MLR Multiple Group Invariance Model

The extent to which a confirmatory factor model measuring depression (with nine items each on a nine-point response scale) exhibited measurement and structural invariance between women and men was examined using the lavaan (Rosseel, 2012) package in R (R Core Team, 2017). Robust maximum likelihood (MLR) estimation was used for all analyses; accordingly, nested model comparisons were conducted using the −2LL rescaled difference test. Women served as the reference group in all invariance models. A configural invariance model was initially specified in which single-factor models were estimated simultaneously within each group; factor mean was fixed to 0 and the factor variance was fixed to 1 for identification within each group. A residual covariance between items 1 and 2 was also estimated in each group as suggested by previous results. As shown in Table 1, the configural model had good fit, and thus a series of model constraints were then applied in successive models to examine potential decreases in fit resulting from measurement or structural non-invariance.

Equality of the unstandardized item factor loadings across groups was then examined in a metric invariance model in which the factor variance was fixed to 1 in women but was freely estimated in men; the factor means were fixed to 0 in both groups. All factor loadings were constrained to be equal across groups; all intercepts and residual variances (and the residual covariance between items 1 and 2) were still permitted to vary across groups. The metric invariance model fit well (see Table 1) and did not result in a significant decrease in fit relative to the configural model, −2ΔLL(8) = 4.26, p = .83. The modification indices suggested no points of localized strain among the constrained loadings. The fact that metric invariance (i.e., “weak invariance”“) held indicates that the items were related to the latent factor equivalently across groups, or more simply, that the same latent factor was being measured in each group.

Equality of the unstandardized item intercepts across groups was then examined in a scalar invariance model. The factor mean and variance were fixed to 0 and 1, respectively, for identification in the women, but the factor mean and variance were then estimated in the men. All factor loadings and item intercepts were constrained to be equal across groups; all residual variances (and the residual covariance between items 1 and 2) were still permitted to differ across groups. The scalar invariance model fit well (see Table 1) and did not result in a significant decrease in fit relative to the metric invariance model, −2ΔLL(8) = 12.39, p = .13. However, examination of the modification indices for parameter differences suggested a point of localized strain; accordingly, a partial scalar invariance model was thus estimated in which the intercept for item 7 (“feelings of worthless or guilt”“) was allowed to differ between groups, resulting in a good-fitting model and a significantly better-fitting model relative to the full scalar invariance model, −2ΔLL(1) = 5.93, p = .01. The partial scalar invariance did not fit significantly worse than the metric invariance model, −2ΔLL(7) = 6.36, p = .50, indicating that partial scalar invariance did hold. The factor that partial scalar invariance (i.e., “strong invariance”) held indicates that both groups have the same expected item response at the same absolute level of the trait, or more simply, that the observed differences in item means between groups is due to factor mean differences only. The exception to this is item 7, for which women are expected to have a higher item response than men at the same absolute trait level of depression.

Equality of the unstandardized residual variances across groups was then examined in a residual variance invariance model. As in the partial scalar invariance model, the factor mean and variance were fixed to 0 and 1, respectively, for identification in the women, but the factor mean and variance were still estimated in the men. All factor loadings, item intercepts (except for item 7), and all residual variances (except for item 7) were constrained to be equal across groups; the residual covariance between item 1 and 2 was still permitted to differ across groups. The residual variance invariance model fit well (see Table 1) and did not result in significant decrease in fit relative to the partial scalar invariance model, −2ΔLL(8) = 5.27, p = .73. The modification indices suggested no points of localized strain among the constrained residual variances. The fact that residual variance invariance (i.e., “strict invariance”) held indicates that the amount of item variance not accounted for by the factor was the same across groups. Finally, equality of the residual covariance between items 1 and 2 across groups was tested and resulted in a significant decrease in fit relative to the residual invariance model, −2ΔLL(1) = 4.18, p = .04, indicating that the residual relationship between items 1 and 2 differed significantly between men and women. The residual covariance between items 1 and 2 was thus permitted to vary across groups in further models.

After achieving partial measurement invariance as just described, structural invariance was then tested with two additional models. First, the factor variance in men (which had been estimated freely) was constrained to 1 (i.e., to be equal to the factor variance in the women), resulting in a nonsignificant decrease in fit relative to the residual invariance model, −2ΔLL(1) = 1.01, p = .31. Thus, men and women had equivalent amounts of individual differences in depression. Second, the factor mean in men (which had been estimated freely) was constrained to 0 (i.e., to be equal to the factor mean in women), resulting in a nonsignificant decrease in fit relative to the factor variance invariance model, −2ΔLL(1) = 1.23, p = .27, indicating that men and women had comparable amounts of depression on average. Thus, in conclusion, these analyses showed that partial measurement invariance was obtained between men and women – that is, the relationships of the items to the latent factor of depression were equivalent in both groups (except for the intercept and residual variance for item 7). These analyses also showed that full structural invariance was obtained between men and women, such that both groups had the same amount of depression and interindividual variation in depression as measured by these nine items. The fact that both the factor variances and item residual variances could be constrained equal across groups also indicates equal reliability of the items (i.e., equal standardized factor loadings) across groups, with the exception of item 7. Model parameters from the final invariance model are given in Table 2.

Table 1 would have model fit statistics for tests of multiple group measurement invariance.

Table 2 would have actual model parameters. (unstandardized and standardized estimates and their SEs, so 4 columns)

LS0tCnRpdGxlOiAiRVBTWSA5MDYvQ0xEUCA5NDggRXhhbXBsZSA3QSIKb3V0cHV0OgogIGh0bWxfbm90ZWJvb2s6IGRlZmF1bHQKICBodG1sX2RvY3VtZW50OiBkZWZhdWx0Ci0tLQoKYGBge3Igc2V0dXAsIGluY2x1ZGU9VFJVRX0KaWYgKCFyZXF1aXJlKGxhdmFhbikpIGluc3RhbGwucGFja2FnZXMoImxhdmFhbiIpCmxpYnJhcnkobGF2YWFuKQpgYGAKCiMjIE11bHRpcGxlIEdyb3VwIENGQSBJbnZhcmlhbmN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U3TSkqaXRlbTc7IGl0ZW04IH5+IGMoRThGLCBFOE0pKml0ZW04OyBpdGVtOSB+fiBjKEU5RiwgRTlNKSppdGVtOTsKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojUmVzaWR1YWwgY292YXJpYW5jZSBmcmVlbHkgZXN0aW1hdGVkIGluIGJvdGggZ3JvdXBzIHdpdGggbGFiZWwgZm9yIGVhY2ggZ3JvdXAKaXRlbTEgfn4gYyhFQzEyRiwgRUMxMk0pKml0ZW0yCiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI0ZhY3RvciB2YXJpYW5jZSBmaXhlZCB0byAxIGZvciBpZGVudGlmaWNhdGlvbiBpbiBlYWNoIGdyb3VwCmRlcHJlc3Mgfn4gYygxLDEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZWQgdG8gemVybyBmb3IgaWRlbnRpZmljYXRpb24gaW4gZWFjaCBncm91cApkZXByZXNzIH4gYygwLDApKjAKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoiCgpjb25maWd1cmFsRXN0aW1hdGVzID0gbGF2YWFuKG1vZGVsID0gY29uZmlndXJhbFN5bnRheCwgZGF0YSA9IG1kZEFsbCwgZXN0aW1hdG9yID0gIk1MUiIsIG1pbWljID0gIm1wbHVzIiwgZ3JvdXA9InNleCIpCnN1bW1hcnkoY29uZmlndXJhbEVzdGltYXRlcywgZml0Lm1lYXN1cmVzID0gVFJVRSwgcnNxdWFyZSA9IFRSVUUsIHN0YW5kYXJkaXplZCA9IFRSVUUpCmBgYApUaGUgY29uZmlndXJhbCBtb2RlbCBpcyB0aGUgZmlyc3QgbW9kZWwgd2hpY2ggYWxsb3dzIHNlcGFyYXRlIGVzdGltYXRpb24gb2YgdGhlIGZhY3RvciBmb3IgZWFjaCBncm91cC4gQXMgdGhlIGl0ZW1zIGFyZSBub3QgbGlua2VkLCB0aGUgZmFjdG9yIGlzIG5vdCBkaXJlY3RseSBjb21wYXJhYmxlLgoKIyMjIE1ldHJpYyBJbnZhcmlhbmNlIE1vZGVsIChsb2FkaW5ncyBoZWxkIGVxdWFsIGFjcm9zcyBncm91cHMpCgpgYGB7ciBtZXRyaWMsIGluY2x1ZGU9VFJVRX0KbWV0cmljU3ludGF4ID0gIgojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgbG9hZGluZ3Mgc2V0IHRvIGJlIGVxdWFsIGluIGJvdGggZ3JvdXBzIHNvIGxhYmVsIGZvciBlYWNoIGdyb3VwIGlzIGlkZW50aWNhbCAqKioqKioqKioKZGVwcmVzcyA9fiBjKEwxLCBMMSkqaXRlbTEgKyBjKEwyLCBMMikqaXRlbTIgKyBjKEwzLCBMMykqaXRlbTMgKyAKICAgICAgICAgICBjKEw0LCBMNCkqaXRlbTQgKyBjKEw1LCBMNSkqaXRlbTUgKyBjKEw2LCBMNikqaXRlbTYgKyAKICAgICAgICAgICBjKEw3LCBMNykqaXRlbTcgKyBjKEw4LCBMOCkqaXRlbTggKyBjKEw5LCBMOSkqaXRlbTkKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojSXRlb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ZnJlZWx5IGVzdGltYXRlZCBpbiBib3RoIGdyb3VwcyB3aXRoIGxhYmVsIGZvciBlYWNoIGdyb3VwCml0ZW0xIH5+IGMoRUMxMkYsIEVDMTJNKSppdGVtMgojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgdmFyaWFuY2UgZml4ZWQgdG8gMSBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gbWFsZSBncm91cCAqKioqKgpkZXByZXNzIH5+IGMoMSxOQSkqZGVwcmVzcwojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgbWVhbiBmaXhlZCB0byB6ZXJvIGZvciBpZGVudGlmaWNhdGlvbiBpbiBlYWNoIGdyb3VwCmRlcHJlc3MgfiBjKDAsMCkqMAojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiIKCm1ldHJpY0VzdGltYXRlcyA9IGxhdmFhbihtb2RlbCA9IG1ldHJpY1N5bnRheCwgZGF0YSA9IG1kZEFsbCwgZXN0aW1hdG9yID0gIk1MUiIsIG1pbWljID0gIm1wbHVzIiwgZ3JvdXA9InNleCIpCnN1bW1hcnkobWV0cmljRXN0aW1hdGVzLCBmaXQubWVhc3VyZXMgPSBUUlVFLCByc3F1YXJlID0gVFJVRSwgc3RhbmRhcmRpemVkID0gVFJVRSkKYGBgClRvIHRlc3QgaWYgdGhlIG1ldHJpYyBtb2RlbCBmaXRzIGFzIHdlbGwgYXMgdGhlIGNvbmZpZ3VyYWwgbW9kZWwsIH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ppdGVtNyB+fiBjKEU3RiwgRTdNKSppdGVtNzsgaXRlbTggfn4gYyhFOEYsIEU4TSkqaXRlbTg7IGl0ZW05IH5+IGMoRTlGLCBFOU0pKml0ZW05OwojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNSZXNpZHVhbCBjb3ZhcmlhbmNlIGZyZWVseSBlc3RpbWF0ZWQgaW4gYm90aCBncm91cHMgd2l0aCBsYWJlbCBmb3IgZWFjaCBncm91cAppdGVtMSB+fiBjKEVDMTJGLCBFQzEyTSkqaXRlbTIKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIHZhcmlhbmNlIGZpeGVkIHRvIDEgZm9yIGlkZW50aWZpY2F0aW9uIGluIEZlbWFsZSBncm91cCBidXQgZXN0aW1hdGVkIGluIG1hbGUgZ3JvdXAKZGVwcmVzcyB+fiBjKDEsTkEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZWQgdG8gemVybyBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gbWFsZSBncm91cCAqKioqCmRlcHJlc3MgfiBjKDAsTkEpKjEKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoiCgpzY2FsYXJFc3RpbWF0ZXMxID0gbGF2YWFuKG1vZGVsID0gc2NhbGFyU3ludGF4MSwgZG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00pKml0ZW03OyBpdGVtOCB+fiBjKEU4RiwgRThNKSppdGVtODsgaXRlbTkgfn4gYyhFOUYsIEU5TSkqaXRlbTk7CiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI1Jlc2lkdWFsIGNvdmFyaWFuY2UgZnJlZWx5IGVzdGltYXRlZCBpbiBib3RoIGdyb3VwcyB3aXRoIGxhYmVsIGZvciBlYWNoIGdyb3VwCml0ZW0xIH5+IGMoRUMxMkYsIEVDMTJNKSppdGVtMgojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgdmFyaWFuY2UgZml4ZWQgdG8gMSBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gbWFsZSBncm91cApkZXByZXNzIH5+IGMoMSxOQSkqZGVwcmVzcwojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgbWVhbiBmaXhlZCB0byB6ZXJvIGZvciBpZGVudGlmaWNhdGlvbiBpbiBGZW1hbGUgZ3JvdXAgYnV0IGVzdGltYXRlZCBpbiBtYWxlIGdyb3VwCmRlcHJlc3MgfiBjKDAsTkEpKjEKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoKSW50RGlmZjcgOj0gSTdGLUk3TQoiCgpzY2FsYXJFc3RpbWF0ZXMyID0gbGF2YWFuKG1vZGVsID0gc2NhbGFyU3ludGF4Miw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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgbG9hZGluZ3Mgc2V0IHRvIGJlIGVxdWFsIGluIGJvdGggZ3JvdXBzIHNvIGxhYmVsIGZvciBlYWNoIGdyb3VwIGlzIGlkZW50aWNhbCAKZGVwcmVzcyA9fiBjKEwxLCBMMSkqaXRlbTEgKyBjKEwyLCBMMikqaXRlbTIgKyBjKEwzLCBMMykqaXRlbTMgKyAKICAgICAgICAgICBjKEw0LCBMNCkqaXRlbTQgKyBjKEw1LCBMNSkqaXRlbTUgKyBjKEw2LCBMNikqaXRlbTYgKyAKICAgICAgICAgICBjKEw3LCBMNykqaXRlbTcgKyBjKEw4LCBMOCkqaXRlbTggKyBjKEw5LCBMOSkqaXRlbTkKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojSXRlbSBpbnRlcmNlcHRzIHNldCB0byBiZSBlcXVhbCBpbiBib3RoIGdyb3VwcyBzbyBsYWJlbCBmb3IgZWFjaCBncm91cCBpcyBpZGVudGljYWwKaXRlbTEgfiBjKEkxLCBJMSkqMTsgaXRlbTIgfiBjKEkyLCBJMikqMTsgaXRlbTMgfiBjKEkzLCBJMykqMTsgCml0ZW00IH4gYyhJNCwgSTQpKjE7IGl0ZW01IH4gYyhJNSwgSTUpKjE7IGl0ZW02IH4gYyhJNiwgSTYpKjE7IAppdGVtNyB+IGMoSTdGLCBJN00pKjE7IGl0ZW04IH4gYyhJOCwgSTgpKjE7IGl0ZW05IH4gYyhJOSwgSTkpKjE7CiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI1JlZGlkdWFsIHZhcmlhbmNlcyBzZXQgdG8gYmUgZXF1YWwgaW4gYm90aCBncm91cHMgc28gbGFiZWwgZm9yIGVhY2ggZ3JvdXAgaXMgaWRlbnRpY2FsCml0ZW0xIH5+IGMoRTEsIEUxKSppdGVtMTsgaXRlbTIgfn4gYyhFMiwgRTIpKml0ZW0yOyBpdGVtMyB+fiBjKEUzLCBFMykqaXRlbTM7IAppdGVtNCB+fiBjKEU0LCBFNCkqaXRlbTQ7IGl0ZW01IH5+IGMoRTUsIEU1KSppdGVtNTsgaXRlbTYgfn4gYyhFNiwgRTYpKml0ZW02OyAKaXRlbTcgfn4gYyhFN0YsIEU3TSkqaXRlbTc7IGl0ZW04IH5+IGMoRTgsIEU4KSppdGVtODsgaXRlbTkgfn4gYyhFOSwgRTkpKml0ZW05OwojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNSZXNpZHVhbCBjb3ZhcmlhbmNlIGZyZWVseSBlc3RpbWF0ZWQgaW4gYm90aCBncm91cHMgd2l0aCBsYWJlbCBmb3IgZWFjaCBncm91cAppdGVtMSB+fiBjKEVDMTJGLCBFQzEyTSkqaXRlbTIKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIHZhcmlhbmNlIGZpeGVkIHRvIDEgZm9yIGlkZW50aWZpY2F0aW9uIGluIEZlbWFsZSBncm91cCBidXQgZXN0aW1hdGVkIGluIG1hbGUgZ3JvdXAKZGVwcmVzcyB+fiBjKDEsTkEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZW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MTsgaXRlbTIgfn4gYyhFMiwgRTIpKml0ZW0yOyBpdGVtMyB+fiBjKEUzLCBFMykqaXRlbTM7IAppdGVtNCB+fiBjKEU0LCBFNCkqaXRlbTQ7IGl0ZW01IH5+IGMoRTUsIEU1KSppdGVtNTsgaXRlbTYgfn4gYyhFNiwgRTYpKml0ZW02OyAKaXRlbTcgfn4gYyhFN0YsIEU3TSkqaXRlbTc7IGl0ZW04IH5+IGMoRTgsIEU4KSppdGVtODsgaXRlbTkgfn4gYyhFOSwgRTkpKml0ZW05OwojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNSZXNpZHVhbCBjb3ZhcmlhbmNlIGZyZWVseSBlc3RpbWF0ZWQgaW4gYm90aCBncm91cHMgd2l0aCBsYWJlbCBmb3IgZWFjaCBncm91cCAqKioqCml0ZW0xIH5+IGMoRUMxMiwgRUMxMikqaXRlbTIKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIHZhcmlhbmNlIGZpeGVkIHRvIDEgZm9yIGlkZW50aWZpY2F0aW9uIGluIEZlbWFsZSBncm91cCBidXQgZXN0aW1hdGVkIGluIG1hbGUgZ3JvdXAKZGVwcmVzcyB+fiBjKDEsTkEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZWQgdG8gemVybyBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gbWFsZSBncm91cApkZXByZXNzIH4gYygwLE5BKSoxCiM9PT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w1KSppdGVtNSArIGMoTDYsIEw2KSppdGVtNiArIAogICAgICAgICAgIGMoTDcsIEw3KSppdGVtNyArIGMoTDgsIEw4KSppdGVtOCArIGMoTDksIEw5KSppdGVtOQojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNJdGVtIGludGVyY2VwdHMgc2V0IHRvIGJlIGVxdWFsIGluIGJvdGggZ3JvdXBzIHNvIGxhYmVsIGZvciBlYWNoIGdyb3VwIGlzIGlkZW50aWNhbAppdGVtMSB+IGMoSTEsIEkxKSoxOyBpdGVtMiB+IGMoSTIsIEkyKSoxOyBpdGVtMyB+IGMoSTMsIEkzKSoxOyAKaXRlbTQgfiBjKEk0LCBJNCkqMTsgaXRlbTUgfiBjKEk1LCBJNSkqMTsgaXRlbTYgfiBjKEk2LCBJNikqMTsgCml0ZW03IH4gYyhJN0YsIEk3TSkqMTsgaXRlbTggfiBjKEk4LCBJOCkqMTsgaXRlbTkgfiBjKEk5LCBJOSkqMTsKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojUmVkaWR1YWwgdmFyaWFuY2VzIHNldCB0byBiZSBlcXVhbCBpbiBib3RoIGdyb3VwcyBzbyBsYWJlbCBmb3IgZWFjaCBncm91cCBpcyBpZGVudGljYWwKaXRlbTEgfn4gYyhFMSwgRTEpKml0ZW0xOyBpdGVtMiB+fiBjKEUyLCBFMikqaXRlbTI7IGl0ZW0zIH5+IGMoRTMsIEUzKSppdGVtMzsgCml0ZW00IH5+IGMoRTQsIEU0KSppdGVtNDsgaXRlbTUgfn4gYyhFNSwgRTUpKml0ZW01OyBpdGVtNiB+fiBjKEU2LCBFNikqaXRlbTY7IAppdGVtNyB+fiBjKEU3RiwgRTdNKSppdGVtNzsgaXRlbTggfn4gYyhFOCwgRTgpKml0ZW04OyBpdGVtOSB+fiBjKEU5LCBFOSkqaXRlbTk7CiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI1Jlc2lkdWFsIGNvdmFyaWFuY2UgZnJlZWx5IGVzdGltYXRlZCBpbiBib3RoIGdyb3VwcyB3aXRoIGxhYmVsIGZvciBlYWNoIGdyb3VwCml0ZW0xIH5+IGMoRUMxMkYsIEVDMTJNKSppdGVtMgojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgdmFyaWFuY2UgZml4ZWQgdG8gMSBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gTWFsZSBncm91cCAqKioqCmRlcHJlc3Mgfn4gYygxLDEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZWQgdG8gemVybyBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gTWFsZSBncm91cApkZXByZXNzIH4gYygwLE5BKSoxCiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KCiIKCnN0cnVjdHVyYWxWYXJpYW5jZSA9IGxhdmFhbihtb2RlbCA9IHN0cnVjdHVyYWxWYXJpYW5jZSwgZGF0YSA9IG1kZEFsbCwgZXN0aW1hdG9yID0gIk1MUiIsIG1pbWljID0gIm1wbHVzIiwgZ3JvdXA9InNleCIpCgphbm92YShyZXNpZHVhbEVzdGltYXRlczEsIHN0cnVjdHVyYWxWYXJpYW5jZSkKYGBgCgpUaGlzIHRlc3QgcmV2ZWFscyBzZXR0aW5nIHRoZSBmYWN0b3IgdmFyaWFuY2UgZXF1YWwgZG9lcyBub3QgbWFrZSB0aGUgbW9kZWwgZml0IHdvcnNlLCBzbyB3ZSBjYW4ga2VlcCB0aGVtIGVxdWFsLgoKIyMjIEZhY3RvciBNZWFuIEludmFyaWFuY2UgTW9kZWwgCgoKYGBge3IgZmFjdE1lYW4sIGluY2x1ZGU9VFJVRX0Kc3RydWN0dXJhbE1lYW4gPSAiCiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KI0ZhY3RvciBsb2FkaW5ncyBzZXQgdG8gYmUgZXF1YWwgaW4gYm90aCBncm91cHMgc28gbGFiZWwgZm9yIGVhY2ggZ3JvdXAgaXMgaWRlbnRpY2FsIApkZXByZXNzID1+IGMoTDEsIEwxKSppdGVtMSArIGMoTDIsIEwyKSppdGVtMiArIGMoTDMsIEwzKSppdGVtMyArIAogICAgICAgICAgIGMoTDQsIEw0KSppdGVtNCArIGMoTDUsIEw1KSppdGVtNSArIGMoTDYsIEw2KSppdGVtNiArIAogICAgICAgICAgIGMoTDcsIEw3KSppdGVtNyArIGMoTDgsIEw4KSppdGVtOCArIGMoTDksIEw5KSppdGVtOQojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNJdGVtIGludGVyY2VwdHMgc2V0IHRvIGJlIGVxdWFsIGluIGJvdGggZ3JvdXBzIHNvIGxhYmVsIGZvciBlYWNoIGdyb3VwIGlzIGl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GVtMgojPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiNGYWN0b3IgdmFyaWFuY2UgZml4ZWQgdG8gMSBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gTWFsZSBncm91cCAqKioqCmRlcHJlc3Mgfn4gYygxLDEpKmRlcHJlc3MKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQojRmFjdG9yIG1lYW4gZml4ZWQgdG8gemVybyBmb3IgaWRlbnRpZmljYXRpb24gaW4gRmVtYWxlIGdyb3VwIGJ1dCBlc3RpbWF0ZWQgaW4gTWFsZSBncm91cApkZXByZXNzIH4gYygwLDApKjAKIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoKIgoKc3RydWN0dXJhbE1lYW4gPSBsYXZhYW4obW9kZWwgPSBzdHJ1Y3R1cmFsTWVhbiwgZGF0YSA9IG1kZEFsbCwgZXN0aW1hdG9yID0gIk1MUiIsIG1pbWljID0gIm1wbHVzIiwgZ3JvdXA9InNleCIpCnN1bW1hcnkoc3RydWN0dXJhbE1lYW4sIGZpdC5tZWFzdXJlcyA9IFRSVUUsIHJzcXVhcmUgPSBUUlVFLCBzdGFuZGFyZGl6ZWQgPSBUUlVFKQphbm92YShzdHJ1Y3R1cmFsTWVhbiwgc3RydWN0dXJhbFZhcmlhbmNlKQphbm92YShzdHJ1Y3R1cmFsTWVhbiwgY29uZmlndXJhbEVzdGltYXRlcykKYGBgCgpBbmQgaGVyZSB3ZSBzZWUgdGhlIG1lYW5zIGRvIG5vdCB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