Get ready by loading some packages:

library(tidyverse)
library(psych)
library(lavaan)
library(semPlot)

Part 1: Exploring EFA and CFA

To start off, we’ll use the well-known Holzinger & Swineford (1939) dataset to get familiar with EFA and CFA in R. This data is included in the lavaan package, so we can load it with the data() function.

data(HolzingerSwineford1939)

summary(HolzingerSwineford1939)
##        id             sex            ageyr        agemo       
##  Min.   :  1.0   Min.   :1.000   Min.   :11   Min.   : 0.000  
##  1st Qu.: 82.0   1st Qu.:1.000   1st Qu.:12   1st Qu.: 2.000  
##  Median :163.0   Median :2.000   Median :13   Median : 5.000  
##  Mean   :176.6   Mean   :1.515   Mean   :13   Mean   : 5.375  
##  3rd Qu.:272.0   3rd Qu.:2.000   3rd Qu.:14   3rd Qu.: 8.000  
##  Max.   :351.0   Max.   :2.000   Max.   :16   Max.   :11.000  
##                                                               
##          school        grade             x1               x2       
##  Grant-White:145   Min.   :7.000   Min.   :0.6667   Min.   :2.250  
##  Pasteur    :156   1st Qu.:7.000   1st Qu.:4.1667   1st Qu.:5.250  
##                    Median :7.000   Median :5.0000   Median :6.000  
##                    Mean   :7.477   Mean   :4.9358   Mean   :6.088  
##                    3rd Qu.:8.000   3rd Qu.:5.6667   3rd Qu.:6.750  
##                    Max.   :8.000   Max.   :8.5000   Max.   :9.250  
##                    NA's   :1                                       
##        x3              x4              x5              x6        
##  Min.   :0.250   Min.   :0.000   Min.   :1.000   Min.   :0.1429  
##  1st Qu.:1.375   1st Qu.:2.333   1st Qu.:3.500   1st Qu.:1.4286  
##  Median :2.125   Median :3.000   Median :4.500   Median :2.0000  
##  Mean   :2.250   Mean   :3.061   Mean   :4.341   Mean   :2.1856  
##  3rd Qu.:3.125   3rd Qu.:3.667   3rd Qu.:5.250   3rd Qu.:2.7143  
##  Max.   :4.500   Max.   :6.333   Max.   :7.000   Max.   :6.1429  
##                                                                  
##        x7              x8               x9       
##  Min.   :1.304   Min.   : 3.050   Min.   :2.778  
##  1st Qu.:3.478   1st Qu.: 4.850   1st Qu.:4.750  
##  Median :4.087   Median : 5.500   Median :5.417  
##  Mean   :4.186   Mean   : 5.527   Mean   :5.374  
##  3rd Qu.:4.913   3rd Qu.: 6.100   3rd Qu.:6.083  
##  Max.   :7.435   Max.   :10.000   Max.   :9.250  
## 

One initial step with any factor analysis is to check the factorability of the data.

KMO(select(HolzingerSwineford1939, x1:x9))
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = select(HolzingerSwineford1939, x1:x9))
## Overall MSA =  0.75
## MSA for each item = 
##   x1   x2   x3   x4   x5   x6   x7   x8   x9 
## 0.81 0.78 0.73 0.76 0.74 0.81 0.59 0.68 0.79
cortest.bartlett(select(HolzingerSwineford1939, x1:x9), n = 301)
## R was not square, finding R from data
## $chisq
## [1] 904.0971
## 
## $p.value
## [1] 1.912079e-166
## 
## $df
## [1] 36

That all looks fine, so we’ll proceed with EFA.

EFA

We’ll use the fa() function from psych and our initial goal is to determine the number of likely factors in the data.

hs.efa <- fa(select(HolzingerSwineford1939, x1:x9), nfactors = 8, 
             rotate = "none", fm = "ml")
hs.efa
## Factor Analysis using method =  ml
## Call: fa(r = select(HolzingerSwineford1939, x1:x9), nfactors = 8, rotate = "none", 
##     fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
##     ML1   ML2   ML4   ML3   ML5   ML6   ML7   ML8   h2    u2 com
## x1 0.37  0.48  0.33 -0.21 -0.12 -0.18 -0.07 -0.09 0.58 0.420 3.9
## x2 0.18  0.25  0.37 -0.17 -0.01  0.13  0.21  0.09 0.33 0.671 4.0
## x3 0.14  0.51  0.39 -0.19 -0.03  0.22 -0.05 -0.07 0.52 0.480 2.9
## x4 0.83  0.14 -0.24 -0.32 -0.13  0.00  0.03  0.01 0.88 0.123 1.6
## x5 0.97 -0.12  0.05  0.11 -0.02  0.01  0.00  0.00 0.96 0.038 1.1
## x6 0.80  0.13 -0.03 -0.21  0.34 -0.02 -0.02  0.02 0.82 0.182 1.6
## x7 0.15  0.49 -0.42  0.35  0.01  0.11 -0.11 -0.03 0.59 0.406 3.3
## x8 0.17  0.59 -0.09  0.43  0.07 -0.07  0.17 -0.06 0.62 0.384 2.4
## x9 0.27  0.58  0.15  0.23 -0.09 -0.06 -0.08  0.19 0.54 0.456 2.3
## 
##                        ML1  ML2  ML4  ML3  ML5  ML6  ML7  ML8
## SS loadings           2.56 1.54 0.66 0.63 0.17 0.12 0.10 0.06
## Proportion Var        0.28 0.17 0.07 0.07 0.02 0.01 0.01 0.01
## Cumulative Var        0.28 0.46 0.53 0.60 0.62 0.63 0.64 0.65
## Proportion Explained  0.44 0.26 0.11 0.11 0.03 0.02 0.02 0.01
## Cumulative Proportion 0.44 0.70 0.82 0.92 0.95 0.97 0.99 1.00
## 
## Mean item complexity =  2.6
## Test of the hypothesis that 8 factors are sufficient.
## 
## The degrees of freedom for the null model are  36  and the objective function was  3.05 with Chi Square of  904.1
## The degrees of freedom for the model are -8  and the objective function was  0 
## 
## The root mean square of the residuals (RMSR) is  0 
## The df corrected root mean square of the residuals is  NA 
## 
## The harmonic number of observations is  301 with the empirical chi square  0  with prob <  NA 
## The total number of observations was  301  with Likelihood Chi Square =  0  with prob <  NA 
## 
## Tucker Lewis Index of factoring reliability =  1.042
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy             
##                                                    ML1  ML2  ML4  ML3   ML5
## Correlation of (regression) scores with factors   0.99 0.90 0.80 0.85  0.68
## Multiple R square of scores with factors          0.97 0.80 0.65 0.72  0.47
## Minimum correlation of possible factor scores     0.94 0.61 0.29 0.44 -0.07
##                                                     ML6   ML7   ML8
## Correlation of (regression) scores with factors    0.45  0.41  0.35
## Multiple R square of scores with factors           0.20  0.17  0.12
## Minimum correlation of possible factor scores     -0.60 -0.66 -0.75

Two approaches to determining number of factors are a screeplot and parallel analysis. First, the screeplot of eigenvalues:

plot(hs.efa$e.values)

It looks like there are at least 3 factors - maybe 4.

Let’s try the parallel analysis:

fa.parallel(select(HolzingerSwineford1939, x1:x9), fa = "fa", fm = "ml")

## Parallel analysis suggests that the number of factors =  3  and the number of components =  NA

This indicates that we have 3 factors which are above the level of random noise. 3 seems like a good number to go with.

Now we fit a 3-factor solution and rotate it - we’ll use an oblique rotation that allows the factors to correlate.

hs.efa3 <- fa(select(HolzingerSwineford1939, x1:x9), nfactors = 3, rotate = "oblimin", fm = "ml")
## Loading required namespace: GPArotation
hs.efa3
## Factor Analysis using method =  ml
## Call: fa(r = select(HolzingerSwineford1939, x1:x9), nfactors = 3, rotate = "oblimin", 
##     fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
##      ML1   ML3   ML2   h2   u2 com
## x1  0.19  0.60  0.03 0.49 0.51 1.2
## x2  0.04  0.51 -0.12 0.25 0.75 1.1
## x3 -0.07  0.69  0.02 0.46 0.54 1.0
## x4  0.84  0.02  0.01 0.72 0.28 1.0
## x5  0.89 -0.07  0.01 0.76 0.24 1.0
## x6  0.81  0.08 -0.01 0.69 0.31 1.0
## x7  0.04 -0.15  0.72 0.50 0.50 1.1
## x8 -0.03  0.10  0.70 0.53 0.47 1.0
## x9  0.03  0.37  0.46 0.46 0.54 1.9
## 
##                        ML1  ML3  ML2
## SS loadings           2.24 1.34 1.28
## Proportion Var        0.25 0.15 0.14
## Cumulative Var        0.25 0.40 0.54
## Proportion Explained  0.46 0.28 0.26
## Cumulative Proportion 0.46 0.74 1.00
## 
##  With factor correlations of 
##      ML1  ML3  ML2
## ML1 1.00 0.33 0.22
## ML3 0.33 1.00 0.27
## ML2 0.22 0.27 1.00
## 
## Mean item complexity =  1.2
## Test of the hypothesis that 3 factors are sufficient.
## 
## The degrees of freedom for the null model are  36  and the objective function was  3.05 with Chi Square of  904.1
## The degrees of freedom for the model are 12  and the objective function was  0.08 
## 
## The root mean square of the residuals (RMSR) is  0.02 
## The df corrected root mean square of the residuals is  0.03 
## 
## The harmonic number of observations is  301 with the empirical chi square  8.03  with prob <  0.78 
## The total number of observations was  301  with Likelihood Chi Square =  22.38  with prob <  0.034 
## 
## Tucker Lewis Index of factoring reliability =  0.964
## RMSEA index =  0.053  and the 90 % confidence intervals are  0.015 0.088
## BIC =  -46.11
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy             
##                                                    ML1  ML3  ML2
## Correlation of (regression) scores with factors   0.94 0.84 0.85
## Multiple R square of scores with factors          0.89 0.71 0.72
## Minimum correlation of possible factor scores     0.78 0.42 0.45

CFA

Now we’ll use the same data to run a CFA. We’ll be aiming for a 3 factor solution based on the theory behind the various measures in this dataset.

It’s important to note that it is not good practice to use a CFA to ‘confirm’ the findings of an EFA - it’s better to use an EFA to help determine the number of factors, but then to collect more data to test one or more competing models based on that general factorization.

As you’ll see in Step 1 below, our CFA model is much more restricted than the EFA model.

Step 1: Specify the Model

hs.mod <- 'visual =~ x1 + x2 + x3
           textual =~ x4 + x5 + x6
           speed =~ x7 + x8 + x9'

Step 2: Estimate (fit) the model

hs.fit <- cfa(hs.mod, data = HolzingerSwineford1939)

Step 3: Model Fit and Step 4: Interpret

summary(hs.fit, fit.measures = TRUE)
## lavaan 0.6-7 ended normally after 35 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         21
##                                                       
##   Number of observations                           301
##                                                       
## Model Test User Model:
##                                                       
##   Test statistic                                85.306
##   Degrees of freedom                                24
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                               918.852
##   Degrees of freedom                                36
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.931
##   Tucker-Lewis Index (TLI)                       0.896
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -3737.745
##   Loglikelihood unrestricted model (H1)      -3695.092
##                                                       
##   Akaike (AIC)                                7517.490
##   Bayesian (BIC)                              7595.339
##   Sample-size adjusted Bayesian (BIC)         7528.739
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.092
##   90 Percent confidence interval - lower         0.071
##   90 Percent confidence interval - upper         0.114
##   P-value RMSEA <= 0.05                          0.001
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.065
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   visual =~                                           
##     x1                1.000                           
##     x2                0.554    0.100    5.554    0.000
##     x3                0.729    0.109    6.685    0.000
##   textual =~                                          
##     x4                1.000                           
##     x5                1.113    0.065   17.014    0.000
##     x6                0.926    0.055   16.703    0.000
##   speed =~                                            
##     x7                1.000                           
##     x8                1.180    0.165    7.152    0.000
##     x9                1.082    0.151    7.155    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   visual ~~                                           
##     textual           0.408    0.074    5.552    0.000
##     speed             0.262    0.056    4.660    0.000
##   textual ~~                                          
##     speed             0.173    0.049    3.518    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .x1                0.549    0.114    4.833    0.000
##    .x2                1.134    0.102   11.146    0.000
##    .x3                0.844    0.091    9.317    0.000
##    .x4                0.371    0.048    7.779    0.000
##    .x5                0.446    0.058    7.642    0.000
##    .x6                0.356    0.043    8.277    0.000
##    .x7                0.799    0.081    9.823    0.000
##    .x8                0.488    0.074    6.573    0.000
##    .x9                0.566    0.071    8.003    0.000
##     visual            0.809    0.145    5.564    0.000
##     textual           0.979    0.112    8.737    0.000
##     speed             0.384    0.086    4.451    0.000
semPaths(hs.fit, "std", layout = "tree", intercepts = F, residuals = T, nDigits = 2, 
         label.cex = 1, edge.label.cex=.95, fade = F)

Part 2: Working with some measures of L2 morphosyntax

d <- read_csv("cfa_data.csv")

summary(d)
##      SPRt_s              WMTt               OPr              EIr       
##  Min.   :-0.60412   Min.   :-0.67012   Min.   :0.3750   Min.   :0.700  
##  1st Qu.:-0.17407   1st Qu.:-0.12850   1st Qu.:0.7265   1st Qu.:1.300  
##  Median : 0.07328   Median : 0.06882   Median :0.8400   Median :1.550  
##  Mean   : 0.05501   Mean   : 0.04815   Mean   :0.8176   Mean   :1.529  
##  3rd Qu.: 0.24032   3rd Qu.: 0.20718   3rd Qu.:0.9384   3rd Qu.:1.800  
##  Max.   : 0.92267   Max.   : 0.66606   Max.   :1.0000   Max.   :2.100  
##  NA's   :26         NA's   :31         NA's   :28       NA's   :44     
##      TAGJT            TWGJT           UAGJT_ug         UWGJT_ug     
##  Min.   :0.2083   Min.   :0.1250   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:0.4896   1st Qu.:0.5417   1st Qu.:0.3333   1st Qu.:0.4167  
##  Median :0.5417   Median :0.5833   Median :0.4167   Median :0.6667  
##  Mean   :0.5687   Mean   :0.6083   Mean   :0.4476   Mean   :0.6194  
##  3rd Qu.:0.6250   3rd Qu.:0.7083   3rd Qu.:0.5833   3rd Qu.:0.7708  
##  Max.   :1.0000   Max.   :0.9583   Max.   :1.0000   Max.   :1.0000  
##  NA's   :8        NA's   :36       NA's   :8        NA's   :36      
##       MKT        
##  Min.   :0.2083  
##  1st Qu.:0.5417  
##  Median :0.6667  
##  Mean   :0.6401  
##  3rd Qu.:0.7500  
##  Max.   :1.0000  
##  NA's   :21

Factorability:

KMO(d)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = d)
## Overall MSA =  0.77
## MSA for each item = 
##   SPRt_s     WMTt      OPr      EIr    TAGJT    TWGJT UAGJT_ug UWGJT_ug 
##     0.70     0.51     0.81     0.83     0.79     0.77     0.78     0.75 
##      MKT 
##     0.76
cortest.bartlett(cor(d, use = "pairwise.complete.obs"), n = 156)
## $chisq
## [1] 243.5961
## 
## $p.value
## [1] 1.183665e-32
## 
## $df
## [1] 36

EFA

EFA <- fa(d, nfactors = 8, rotate = "none", fm = "ml")

summary(EFA)
## 
## Factor analysis with Call: fa(r = d, nfactors = 8, rotate = "none", fm = "ml")
## 
## Test of the hypothesis that 8 factors are sufficient.
## The degrees of freedom for the model is -8  and the objective function was  0 
## The number of observations was  156  with Chi Square =  0  with prob <  NA 
## 
## The root mean square of the residuals (RMSA) is  0 
## The df corrected root mean square of the residuals is  NA 
## 
## Tucker Lewis Index of factoring reliability =  1.181
plot(EFA$e.values)

fa.parallel(d, fa = "fa", fm = "ml") 

## Parallel analysis suggests that the number of factors =  1  and the number of components =  NA
EFA2 <- fa(d, nfactors = 2, rotate = "oblimin", fm = "ml")
EFA2
## Factor Analysis using method =  ml
## Call: fa(r = d, nfactors = 2, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
##           ML2   ML1    h2   u2 com
## SPRt_s   0.19  0.01 0.037 0.96 1.0
## WMTt     0.20 -0.20 0.039 0.96 2.0
## OPr      0.56 -0.02 0.300 0.70 1.0
## EIr      0.63 -0.05 0.365 0.63 1.0
## TAGJT    0.63 -0.05 0.365 0.63 1.0
## TWGJT    0.74  0.07 0.605 0.39 1.0
## UAGJT_ug 0.24  0.04 0.071 0.93 1.1
## UWGJT_ug 0.00  0.99 0.980 0.02 1.0
## MKT      0.27  0.37 0.312 0.69 1.8
## 
##                        ML2  ML1
## SS loadings           1.88 1.20
## Proportion Var        0.21 0.13
## Cumulative Var        0.21 0.34
## Proportion Explained  0.61 0.39
## Cumulative Proportion 0.61 1.00
## 
##  With factor correlations of 
##      ML2  ML1
## ML2 1.00 0.51
## ML1 0.51 1.00
## 
## Mean item complexity =  1.2
## Test of the hypothesis that 2 factors are sufficient.
## 
## The degrees of freedom for the null model are  36  and the objective function was  1.61 with Chi Square of  243.6
## The degrees of freedom for the model are 19  and the objective function was  0.14 
## 
## The root mean square of the residuals (RMSR) is  0.05 
## The df corrected root mean square of the residuals is  0.07 
## 
## The harmonic number of observations is  112 with the empirical chi square  20.95  with prob <  0.34 
## The total number of observations was  156  with Likelihood Chi Square =  21.65  with prob <  0.3 
## 
## Tucker Lewis Index of factoring reliability =  0.976
## RMSEA index =  0.029  and the 90 % confidence intervals are  0 0.079
## BIC =  -74.3
## Fit based upon off diagonal values = 0.96
## Measures of factor score adequacy             
##                                                    ML2  ML1
## Correlation of (regression) scores with factors   0.89 0.99
## Multiple R square of scores with factors          0.79 0.98
## Minimum correlation of possible factor scores     0.57 0.96

CFA

Two models - we’ll compare a 1 and 2 factor model.

One <- '
# latent variable definitions
language =~ EIr + OPr + UWGJT_ug + MKT + TWGJT + MKT + SPRt_s + WMTt + TAGJT + UAGJT_ug
'

Two <- '
# latent variable definitions
implicit =~ EIr + OPr + TWGJT + TAGJT + WMTt + SPRt_s
explicit =~ UWGJT_ug + UAGJT_ug + MKT

# covariances
implicit~~explicit
'

And then fit them both:

fitOne <- cfa(One, data = d, missing = "fiml", estimator = "MLR")

fitTwo <- cfa(Two, data = d, missing = "fiml", estimator = "MLR")

And compare…

lavaan::summary(fitOne, estimates = T, standardized = T, fit.measures = T)
## lavaan 0.6-7 ended normally after 84 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         27
##                                                       
##   Number of observations                           156
##   Number of missing patterns                        26
##                                                       
## Model Test User Model:
##                                                Standard      Robust
##   Test Statistic                                 30.458      29.942
##   Degrees of freedom                                 27          27
##   P-value (Chi-square)                            0.294       0.317
##   Scaling correction factor                                   1.017
##        Yuan-Bentler correction (Mplus variant)                     
## 
## Model Test Baseline Model:
## 
##   Test statistic                               183.271     176.306
##   Degrees of freedom                                36          36
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.040
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.977       0.979
##   Tucker-Lewis Index (TLI)                       0.969       0.972
##                                                                   
##   Robust Comparative Fit Index (CFI)                         0.979
##   Robust Tucker-Lewis Index (TLI)                            0.973
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)                274.605     274.605
##   Scaling correction factor                                  1.010
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)        289.834     289.834
##   Scaling correction factor                                  1.014
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                                -495.211    -495.211
##   Bayesian (BIC)                              -412.865    -412.865
##   Sample-size adjusted Bayesian (BIC)         -498.328    -498.328
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.029       0.026
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.071       0.070
##   P-value RMSEA <= 0.05                          0.753       0.774
##                                                                   
##   Robust RMSEA                                               0.027
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                     0.070
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.059       0.059
## 
## 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
##   language =~                                                           
##     EIr               1.000                               0.183    0.591
##     OPr               0.433    0.091    4.785    0.000    0.079    0.526
##     UWGJT_ug          0.723    0.167    4.325    0.000    0.132    0.556
##     MKT               0.459    0.101    4.550    0.000    0.084    0.491
##     TWGJT             0.594    0.099    6.005    0.000    0.109    0.787
##     SPRt_s            0.385    0.179    2.150    0.032    0.071    0.234
##     WMTt              0.104    0.133    0.782    0.434    0.019    0.074
##     TAGJT             0.453    0.095    4.765    0.000    0.083    0.565
##     UAGJT_ug          0.348    0.131    2.664    0.008    0.064    0.287
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .EIr               1.529    0.028   54.086    0.000    1.529    4.936
##    .OPr               0.818    0.013   62.349    0.000    0.818    5.424
##    .UWGJT_ug          0.617    0.021   28.925    0.000    0.617    2.590
##    .MKT               0.640    0.015   43.732    0.000    0.640    3.738
##    .TWGJT             0.606    0.012   50.090    0.000    0.606    4.381
##    .SPRt_s            0.052    0.026    1.991    0.046    0.052    0.173
##    .WMTt              0.046    0.023    2.000    0.046    0.046    0.180
##    .TAGJT             0.567    0.012   47.599    0.000    0.567    3.861
##    .UAGJT_ug          0.446    0.018   24.347    0.000    0.446    2.008
##     language          0.000                               0.000    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .EIr               0.062    0.010    6.195    0.000    0.062    0.650
##    .OPr               0.016    0.002    7.497    0.000    0.016    0.723
##    .UWGJT_ug          0.039    0.006    6.864    0.000    0.039    0.691
##    .MKT               0.022    0.003    7.190    0.000    0.022    0.759
##    .TWGJT             0.007    0.002    3.471    0.001    0.007    0.381
##    .SPRt_s            0.086    0.010    8.765    0.000    0.086    0.945
##    .WMTt              0.065    0.008    8.034    0.000    0.065    0.994
##    .TAGJT             0.015    0.003    5.669    0.000    0.015    0.681
##    .UAGJT_ug          0.045    0.006    7.231    0.000    0.045    0.918
##     language          0.034    0.010    3.385    0.001    1.000    1.000
lavaan::summary(fitTwo, estimates = T, standardized = T, fit.measures = T)
## lavaan 0.6-7 ended normally after 95 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of free parameters                         28
##                                                       
##   Number of observations                           156
##   Number of missing patterns                        26
##                                                       
## Model Test User Model:
##                                                Standard      Robust
##   Test Statistic                                 21.043      21.508
##   Degrees of freedom                                 26          26
##   P-value (Chi-square)                            0.740       0.715
##   Scaling correction factor                                   0.978
##        Yuan-Bentler correction (Mplus variant)                     
## 
## Model Test Baseline Model:
## 
##   Test statistic                               183.271     176.306
##   Degrees of freedom                                36          36
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.040
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000       1.000
##   Tucker-Lewis Index (TLI)                       1.047       1.044
##                                                                   
##   Robust Comparative Fit Index (CFI)                         1.000
##   Robust Tucker-Lewis Index (TLI)                            1.042
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)                279.313     279.313
##   Scaling correction factor                                  1.047
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)        289.834     289.834
##   Scaling correction factor                                  1.014
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                                -502.625    -502.625
##   Bayesian (BIC)                              -417.229    -417.229
##   Sample-size adjusted Bayesian (BIC)         -505.858    -505.858
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000       0.000
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.047       0.049
##   P-value RMSEA <= 0.05                          0.961       0.953
##                                                                   
##   Robust RMSEA                                               0.000
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                     0.048
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.052       0.052
## 
## 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
##   implicit =~                                                           
##     EIr               1.000                               0.182    0.586
##     OPr               0.436    0.089    4.906    0.000    0.079    0.524
##     TWGJT             0.626    0.116    5.392    0.000    0.114    0.821
##     TAGJT             0.465    0.101    4.618    0.000    0.084    0.575
##     WMTt              0.107    0.131    0.813    0.416    0.019    0.076
##     SPRt_s            0.367    0.175    2.099    0.036    0.067    0.221
##   explicit =~                                                           
##     UWGJT_ug          1.000                               0.180    0.752
##     UAGJT_ug          0.328    0.179    1.830    0.067    0.059    0.265
##     MKT               0.607    0.123    4.944    0.000    0.109    0.636
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   implicit ~~                                                           
##     explicit          0.022    0.006    4.006    0.000    0.685    0.685
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .EIr               1.530    0.028   54.065    0.000    1.530    4.935
##    .OPr               0.819    0.013   62.390    0.000    0.819    5.423
##    .TWGJT             0.607    0.012   50.156    0.000    0.607    4.384
##    .TAGJT             0.567    0.012   47.636    0.000    0.567    3.862
##    .WMTt              0.046    0.023    2.005    0.045    0.046    0.180
##    .SPRt_s            0.052    0.026    1.994    0.046    0.052    0.173
##    .UWGJT_ug          0.616    0.021   29.071    0.000    0.616    2.583
##    .UAGJT_ug          0.446    0.018   24.223    0.000    0.446    2.008
##    .MKT               0.638    0.015   43.185    0.000    0.638    3.725
##     implicit          0.000                               0.000    0.000
##     explicit          0.000                               0.000    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .EIr               0.063    0.011    5.922    0.000    0.063    0.657
##    .OPr               0.017    0.002    7.407    0.000    0.017    0.725
##    .TWGJT             0.006    0.002    2.838    0.005    0.006    0.325
##    .TAGJT             0.014    0.003    5.644    0.000    0.014    0.669
##    .WMTt              0.065    0.008    8.008    0.000    0.065    0.994
##    .SPRt_s            0.086    0.010    8.767    0.000    0.086    0.951
##    .UWGJT_ug          0.025    0.007    3.355    0.001    0.025    0.434
##    .UAGJT_ug          0.046    0.007    6.657    0.000    0.046    0.930
##    .MKT               0.018    0.003    5.083    0.000    0.018    0.596
##     implicit          0.033    0.010    3.247    0.001    1.000    1.000
##     explicit          0.032    0.010    3.365    0.001    1.000    1.000