Teoría

Los Modelos de Ecuaciones estructurales (SEM) es una técnica de análisis de estadistica multivariada, que permite analizar patrones complejos de relaciones entre variables, realizar comparaciones entre e intragrupos, y validad modelos teóricos y empiricos,

Ejemplo 1. Estudio de Holzinger y Swineford (1939)

Contexto

Holdzinger y Swineford realizaron exámenes de habilidad mental a adolescentes de 7° y 8° de dos escuelas (Pasteur y Grandw-White)

La base de datos esta incluida como paquete en R, e incluye las siguientes columnas:

  • sex: Género (1=male, 2=female)
  • x1: Percepción visual
  • x2: Juego de cubos
  • x3: Juego con pastillas/espacial
  • x4: Comprensión de párrafos
  • x5: Completar oraciones
  • x6: Significado de palabras
  • x7: sumas aceleradas
  • x8: Conteo acelerado de puntos
  • x9: Discriminación acelerada de myúsculas rectas y curvas

Se busca identificar las relaciones entre las habilidades visual (x1,x2, x3), textual (x4, x5 y x6) y velocidad (x7, x8 y x9) de lso adolescentes.

Práctica: * verbigracia: ejemplo * ex libris: sello para libros * aquelarre: reunión de brujas * beodo: borracho * carpe diem: Aprovecha el día

Instalar paquetes y llamar librerias

#install.packages("lavaan")
library(lavaan)
## This is lavaan 0.6-19
## lavaan is FREE software! Please report any bugs.
# Lavaan: Análisis de variables latentes
#install.packages("lavaanPlot")
library(lavaanPlot)
library(readxl)

Generar el Modelo

1.Regresión (~) variable que depende de otras. 2. Variables Latentes (=~) No se observa, se infiere. 3. Varianzas y covarianzas (~~)Relaciones entre variables latentes y observadas (Varianzas entre si misma, covarianza entre otras.) 4. Intercepto (~1) valor esperado cuando las demás variables son cero modelo1 <- # Regresiones # variables Latentes # Varianzas y Covarianzas # Intercepto

Generar el Modelo

df1 <- HolzingerSwineford1939
summary(df1)
##        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  
## 
str(df1)
## 'data.frame':    301 obs. of  15 variables:
##  $ id    : int  1 2 3 4 5 6 7 8 9 11 ...
##  $ sex   : int  1 2 2 1 2 2 1 2 2 2 ...
##  $ ageyr : int  13 13 13 13 12 14 12 12 13 12 ...
##  $ agemo : int  1 7 1 2 2 1 1 2 0 5 ...
##  $ school: Factor w/ 2 levels "Grant-White",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ grade : int  7 7 7 7 7 7 7 7 7 7 ...
##  $ x1    : num  3.33 5.33 4.5 5.33 4.83 ...
##  $ x2    : num  7.75 5.25 5.25 7.75 4.75 5 6 6.25 5.75 5.25 ...
##  $ x3    : num  0.375 2.125 1.875 3 0.875 ...
##  $ x4    : num  2.33 1.67 1 2.67 2.67 ...
##  $ x5    : num  5.75 3 1.75 4.5 4 3 6 4.25 5.75 5 ...
##  $ x6    : num  1.286 1.286 0.429 2.429 2.571 ...
##  $ x7    : num  3.39 3.78 3.26 3 3.7 ...
##  $ x8    : num  5.75 6.25 3.9 5.3 6.3 6.65 6.2 5.15 4.65 4.55 ...
##  $ x9    : num  6.36 7.92 4.42 4.86 5.92 ...
modelo1 <- ' # Regresiones
# variables Latentes
visual =~ x1 + x2 +x3
textual =~ x4 + x5 +x6
velocidad =~ x7 + x8 +x9
# Varianzas y Covarianzas
visual ~~ textual
textual ~~ velocidad
velocidad ~~ visual
# Intercepto '
sem1 <- sem(modelo1, data=df1)
summary(sem1)
## lavaan 0.6-19 ended normally after 35 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        21
## 
##   Number of observations                           301
## 
## Model Test User Model:
##                                                       
##   Test statistic                                85.306
##   Degrees of freedom                                24
##   P-value (Chi-square)                           0.000
## 
## 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
##   velocidad =~                                        
##     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
##   textual ~~                                          
##     velocidad         0.173    0.049    3.518    0.000
##   visual ~~                                           
##     velocidad         0.262    0.056    4.660    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
##     velocidad         0.384    0.086    4.451    0.000
lavaanPlot(sem1, coef=TRUE, cov=TRUE)

En conclusión, la inteligencia de los adolescentes está compuesta por un grupo de factores que no se reducen a un sólo numero.

Ejercicio 1. Democracia política e Industrialización

Contexto

La base de datos contiene distintas mediciones sobre la democracia política e industrialización en países en desarrollo durante 1960 y 1965.

La tabla incluye los siguientes datos:

y1: Calificaciones sobr libertad de prensa en 1960 y2: Libertad de la oposición politica en 1960 y3: Imparcialidad de elecciones en 1960 y4: Eficacia de la legislatura electa en 1960 y5: calificaciones sobre la libertad de prensa en 1965 y6: Libertad de la oposición politica en 1965 y7: Imparcialidad de elcciones en 1965 y8: Eficacia de la legislatura electa en 1965 x1: PIB per cápita eb 1960 x2:Consumo de energía inanimada per cápita en 1960 *x3: Porcentaje de la fuerza laboral en la industria en 1960

Generar el modelo

df2 <- PoliticalDemocracy
summary(df2)
##        y1               y2               y3               y4        
##  Min.   : 1.250   Min.   : 0.000   Min.   : 0.000   Min.   : 0.000  
##  1st Qu.: 2.900   1st Qu.: 0.000   1st Qu.: 3.767   1st Qu.: 1.581  
##  Median : 5.400   Median : 3.333   Median : 6.667   Median : 3.333  
##  Mean   : 5.465   Mean   : 4.256   Mean   : 6.563   Mean   : 4.453  
##  3rd Qu.: 7.500   3rd Qu.: 8.283   3rd Qu.:10.000   3rd Qu.: 6.667  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :10.000  
##        y5               y6               y7               y8        
##  Min.   : 0.000   Min.   : 0.000   Min.   : 0.000   Min.   : 0.000  
##  1st Qu.: 3.692   1st Qu.: 0.000   1st Qu.: 3.478   1st Qu.: 1.301  
##  Median : 5.000   Median : 2.233   Median : 6.667   Median : 3.333  
##  Mean   : 5.136   Mean   : 2.978   Mean   : 6.196   Mean   : 4.043  
##  3rd Qu.: 7.500   3rd Qu.: 4.207   3rd Qu.:10.000   3rd Qu.: 6.667  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :10.000  
##        x1              x2              x3       
##  Min.   :3.784   Min.   :1.386   Min.   :1.002  
##  1st Qu.:4.477   1st Qu.:3.663   1st Qu.:2.300  
##  Median :5.075   Median :4.963   Median :3.568  
##  Mean   :5.054   Mean   :4.792   Mean   :3.558  
##  3rd Qu.:5.515   3rd Qu.:5.830   3rd Qu.:4.523  
##  Max.   :6.737   Max.   :7.872   Max.   :6.425
str(df2)
## 'data.frame':    75 obs. of  11 variables:
##  $ y1: num  2.5 1.25 7.5 8.9 10 7.5 7.5 7.5 2.5 10 ...
##  $ y2: num  0 0 8.8 8.8 3.33 ...
##  $ y3: num  3.33 3.33 10 10 10 ...
##  $ y4: num  0 0 9.2 9.2 6.67 ...
##  $ y5: num  1.25 6.25 8.75 8.91 7.5 ...
##  $ y6: num  0 1.1 8.09 8.13 3.33 ...
##  $ y7: num  3.73 6.67 10 10 10 ...
##  $ y8: num  3.333 0.737 8.212 4.615 6.667 ...
##  $ x1: num  4.44 5.38 5.96 6.29 5.86 ...
##  $ x2: num  3.64 5.06 6.26 7.57 6.82 ...
##  $ x3: num  2.56 3.57 5.22 6.27 4.57 ...
modelo2 <- '
# Variables Latentes
dem60 =~ y1 + y2 + y3 + y4
dem65 =~ y5 + y6 + y7 + y8
ind60 =~ x1 + x2 + x3

# Varianzas
dem65 ~~ dem60
dem60 ~~ ind60
dem65 ~~ ind60

#Intercepto
'


sem2 <- sem(modelo2, data = df2)
summary(sem2)
## lavaan 0.6-19 ended normally after 47 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        25
## 
##   Number of observations                            75
## 
## Model Test User Model:
##                                                       
##   Test statistic                                72.462
##   Degrees of freedom                                41
##   P-value (Chi-square)                           0.002
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   dem60 =~                                            
##     y1                1.000                           
##     y2                1.354    0.175    7.755    0.000
##     y3                1.044    0.150    6.961    0.000
##     y4                1.300    0.138    9.412    0.000
##   dem65 =~                                            
##     y5                1.000                           
##     y6                1.258    0.164    7.651    0.000
##     y7                1.282    0.158    8.137    0.000
##     y8                1.310    0.154    8.529    0.000
##   ind60 =~                                            
##     x1                1.000                           
##     x2                2.182    0.139   15.714    0.000
##     x3                1.819    0.152   11.956    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   dem60 ~~                                            
##     dem65             4.487    0.911    4.924    0.000
##     ind60             0.660    0.206    3.202    0.001
##   dem65 ~~                                            
##     ind60             0.774    0.208    3.715    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .y1                1.942    0.395    4.910    0.000
##    .y2                6.490    1.185    5.479    0.000
##    .y3                5.340    0.943    5.662    0.000
##    .y4                2.887    0.610    4.731    0.000
##    .y5                2.390    0.447    5.351    0.000
##    .y6                4.343    0.796    5.456    0.000
##    .y7                3.510    0.668    5.252    0.000
##    .y8                2.940    0.586    5.019    0.000
##    .x1                0.082    0.020    4.180    0.000
##    .x2                0.118    0.070    1.689    0.091
##    .x3                0.467    0.090    5.174    0.000
##     dem60             4.845    1.088    4.453    0.000
##     dem65             4.345    1.051    4.134    0.000
##     ind60             0.448    0.087    5.169    0.000
lavaanPlot(sem2, coef=TRUE, cov=TRUE)

En conclusión, la industrialización impulsa la democracia, y una democracia estable, tiende a seguir estandolo.

style=“color:red;”> Parte 1. Experiencias de Recuperacion

df3 <- read_excel("/Users/sebastianfajardo/Downloads/Datos_SEM_Eng.xlsx")

modelo3 <- '
# Variables Latentes
desapego =~ RPD01 + RPD02 + RPD03 + RPD05
relajacion =~ RRE02 + RRE03 + RRE04 + RRE05 + RRE06 + RRE07 + RRE10
maestria =~ RMA02 + RMA03 + RMA04 + RMA05 + RMA06 + RMA07 + RMA08 + RMA09 + RMA10
control =~ RCO02 + RCO03 + RCO04 + RCO05 + RCO06 + RCO07
'


sem3 <- sem(modelo3, data = df3)

summary(sem3, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-19 ended normally after 47 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        58
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                               769.246
##   Degrees of freedom                               293
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                              5985.683
##   Degrees of freedom                               325
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.916
##   Tucker-Lewis Index (TLI)                       0.907
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -8774.100
##   Loglikelihood unrestricted model (H1)      -8389.477
##                                                       
##   Akaike (AIC)                               17664.199
##   Bayesian (BIC)                             17861.815
##   Sample-size adjusted Bayesian (SABIC)      17678.006
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.085
##   90 Percent confidence interval - lower         0.078
##   90 Percent confidence interval - upper         0.093
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    0.888
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.074
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego =~                                                           
##     RPD01             1.000                               1.439    0.818
##     RPD02             1.181    0.076   15.594    0.000    1.700    0.873
##     RPD03             1.156    0.079   14.682    0.000    1.664    0.837
##     RPD05             1.295    0.080   16.261    0.000    1.863    0.899
##   relajacion =~                                                         
##     RRE02             1.000                               1.274    0.850
##     RRE03             1.119    0.065   17.231    0.000    1.427    0.870
##     RRE04             1.025    0.058   17.727    0.000    1.306    0.884
##     RRE05             1.055    0.056   18.774    0.000    1.345    0.910
##     RRE06             1.245    0.074   16.871    0.000    1.586    0.860
##     RRE07             1.116    0.071   15.683    0.000    1.422    0.825
##     RRE10             0.813    0.067   12.089    0.000    1.036    0.696
##   maestria =~                                                           
##     RMA02             1.000                               1.407    0.729
##     RMA03             1.155    0.096   12.063    0.000    1.624    0.800
##     RMA04             1.179    0.089   13.271    0.000    1.659    0.874
##     RMA05             1.140    0.087   13.048    0.000    1.604    0.860
##     RMA06             0.647    0.075    8.618    0.000    0.910    0.581
##     RMA07             1.103    0.085   13.051    0.000    1.552    0.860
##     RMA08             1.109    0.085   12.986    0.000    1.560    0.856
##     RMA09             1.030    0.084   12.254    0.000    1.449    0.811
##     RMA10             1.056    0.088   12.040    0.000    1.486    0.798
##   control =~                                                            
##     RCO02             1.000                               1.631    0.855
##     RCO03             0.948    0.049   19.242    0.000    1.546    0.912
##     RCO04             0.795    0.044   18.137    0.000    1.297    0.886
##     RCO05             0.817    0.043   18.991    0.000    1.332    0.907
##     RCO06             0.834    0.046   18.240    0.000    1.360    0.888
##     RCO07             0.834    0.046   18.074    0.000    1.360    0.884
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego ~~                                                           
##     relajacion        1.122    0.166    6.772    0.000    0.612    0.612
##     maestria          0.648    0.159    4.064    0.000    0.320    0.320
##     control           1.351    0.207    6.537    0.000    0.576    0.576
##   relajacion ~~                                                         
##     maestria          0.968    0.159    6.085    0.000    0.540    0.540
##     control           1.483    0.195    7.610    0.000    0.713    0.713
##   maestria ~~                                                           
##     control           1.221    0.202    6.048    0.000    0.532    0.532
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .RPD01             1.022    0.116    8.783    0.000    1.022    0.331
##    .RPD02             0.906    0.118    7.709    0.000    0.906    0.239
##    .RPD03             1.182    0.139    8.493    0.000    1.182    0.299
##    .RPD05             0.822    0.121    6.807    0.000    0.822    0.192
##    .RRE02             0.626    0.068    9.265    0.000    0.626    0.278
##    .RRE03             0.653    0.073    9.004    0.000    0.653    0.243
##    .RRE04             0.480    0.055    8.780    0.000    0.480    0.219
##    .RRE05             0.373    0.046    8.132    0.000    0.373    0.171
##    .RRE06             0.886    0.097    9.143    0.000    0.886    0.260
##    .RRE07             0.952    0.100    9.502    0.000    0.952    0.320
##    .RRE10             1.141    0.113   10.094    0.000    1.141    0.515
##    .RMA02             1.742    0.175    9.934    0.000    1.742    0.468
##    .RMA03             1.489    0.155    9.581    0.000    1.489    0.361
##    .RMA04             0.853    0.097    8.770    0.000    0.853    0.237
##    .RMA05             0.905    0.101    8.984    0.000    0.905    0.260
##    .RMA06             1.627    0.158   10.279    0.000    1.627    0.662
##    .RMA07             0.846    0.094    8.981    0.000    0.846    0.260
##    .RMA08             0.885    0.098    9.036    0.000    0.885    0.267
##    .RMA09             1.089    0.115    9.495    0.000    1.089    0.342
##    .RMA10             1.258    0.131    9.590    0.000    1.258    0.363
##    .RCO02             0.979    0.104    9.376    0.000    0.979    0.269
##    .RCO03             0.481    0.057    8.378    0.000    0.481    0.167
##    .RCO04             0.462    0.052    8.967    0.000    0.462    0.215
##    .RCO05             0.385    0.045    8.537    0.000    0.385    0.178
##    .RCO06             0.494    0.055    8.922    0.000    0.494    0.211
##    .RCO07             0.517    0.057    8.993    0.000    0.517    0.218
##     desapego          2.070    0.284    7.293    0.000    1.000    1.000
##     relajacion        1.624    0.207    7.839    0.000    1.000    1.000
##     maestria          1.979    0.317    6.242    0.000    1.000    1.000
##     control           2.661    0.335    7.931    0.000    1.000    1.000
lavaanPlot(model = sem3, coefs = TRUE, covs = TRUE, stars = TRUE)
modelo4 <- '
# Variables Latentes
energia =~ EN01 + EN02 + EN04 + EN05 + EN06 + EN07 + EN08
'
sem4 <- sem(modelo4, data = df3)

summary(sem4, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-19 ended normally after 32 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        14
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                                47.222
##   Degrees of freedom                                14
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                              2324.436
##   Degrees of freedom                                21
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.986
##   Tucker-Lewis Index (TLI)                       0.978
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -2017.154
##   Loglikelihood unrestricted model (H1)      -1993.543
##                                                       
##   Akaike (AIC)                                4062.308
##   Bayesian (BIC)                              4110.008
##   Sample-size adjusted Bayesian (SABIC)       4065.641
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.103
##   90 Percent confidence interval - lower         0.072
##   90 Percent confidence interval - upper         0.136
##   P-value H_0: RMSEA <= 0.050                    0.004
##   P-value H_0: RMSEA >= 0.080                    0.892
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.012
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   energia =~                                                            
##     EN01              1.000                               1.674    0.893
##     EN02              1.029    0.044   23.192    0.000    1.723    0.933
##     EN04              0.999    0.044   22.583    0.000    1.672    0.924
##     EN05              0.999    0.042   23.649    0.000    1.672    0.939
##     EN06              0.986    0.042   23.722    0.000    1.651    0.940
##     EN07              1.049    0.046   22.856    0.000    1.755    0.928
##     EN08              1.036    0.043   24.173    0.000    1.734    0.946
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .EN01              0.711    0.074    9.651    0.000    0.711    0.202
##    .EN02              0.444    0.049    9.012    0.000    0.444    0.130
##    .EN04              0.481    0.052    9.214    0.000    0.481    0.147
##    .EN05              0.375    0.042    8.830    0.000    0.375    0.118
##    .EN06              0.359    0.041    8.798    0.000    0.359    0.116
##    .EN07              0.499    0.055    9.129    0.000    0.499    0.139
##    .EN08              0.353    0.041    8.580    0.000    0.353    0.105
##     energia           2.801    0.327    8.565    0.000    1.000    1.000
lavaanPlot(model = sem4, coefs = TRUE, covs = TRUE, stars = TRUE)
modelo5 <- '
desapego =~ RPD01 + RPD02 + RPD03 + RPD05
relajacion =~ RRE02 + RRE03 + RRE04 + RRE05 + RRE06 + RRE07 + RRE10
maestria =~ RMA02 + RMA03 + RMA04 + RMA05 + RMA06 + RMA07 + RMA08 + RMA09 + RMA10
control =~ RCO02 + RCO03 + RCO04 + RCO05 + RCO06 + RCO07

energia =~ EN01 + EN02 + EN04 + EN05 + EN06 + EN07 + EN08

vigor =~ EVI01 + EVI02 + EVI03
dedicacion =~ EDE01 + EDE02 + EDE03
absorbcion =~ EAB01 + EAB02 + EAB03
'

sem5 <- sem(modelo5, data = df3)

summary(sem5, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-19 ended normally after 94 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       112
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                              1839.261
##   Degrees of freedom                               791
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             11684.422
##   Degrees of freedom                               861
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.903
##   Tucker-Lewis Index (TLI)                       0.895
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -13572.104
##   Loglikelihood unrestricted model (H1)     -12652.474
##                                                       
##   Akaike (AIC)                               27368.209
##   Bayesian (BIC)                             27749.812
##   Sample-size adjusted Bayesian (SABIC)      27394.870
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.077
##   90 Percent confidence interval - lower         0.072
##   90 Percent confidence interval - upper         0.082
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    0.151
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.064
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego =~                                                           
##     RPD01             1.000                               1.438    0.817
##     RPD02             1.181    0.076   15.565    0.000    1.697    0.871
##     RPD03             1.159    0.079   14.711    0.000    1.666    0.838
##     RPD05             1.297    0.080   16.282    0.000    1.864    0.900
##   relajacion =~                                                         
##     RRE02             1.000                               1.274    0.849
##     RRE03             1.121    0.065   17.252    0.000    1.428    0.871
##     RRE04             1.023    0.058   17.631    0.000    1.303    0.881
##     RRE05             1.054    0.056   18.721    0.000    1.343    0.909
##     RRE06             1.246    0.074   16.874    0.000    1.587    0.860
##     RRE07             1.120    0.071   15.755    0.000    1.427    0.827
##     RRE10             0.815    0.067   12.126    0.000    1.039    0.698
##   maestria =~                                                           
##     RMA02             1.000                               1.407    0.730
##     RMA03             1.152    0.096   12.048    0.000    1.621    0.798
##     RMA04             1.179    0.089   13.281    0.000    1.659    0.874
##     RMA05             1.139    0.087   13.050    0.000    1.603    0.860
##     RMA06             0.648    0.075    8.639    0.000    0.912    0.582
##     RMA07             1.103    0.084   13.061    0.000    1.552    0.860
##     RMA08             1.109    0.085   13.002    0.000    1.561    0.857
##     RMA09             1.030    0.084   12.276    0.000    1.450    0.812
##     RMA10             1.057    0.088   12.059    0.000    1.487    0.799
##   control =~                                                            
##     RCO02             1.000                               1.631    0.855
##     RCO03             0.945    0.049   19.129    0.000    1.542    0.910
##     RCO04             0.794    0.044   18.068    0.000    1.295    0.884
##     RCO05             0.815    0.043   18.918    0.000    1.329    0.905
##     RCO06             0.838    0.045   18.420    0.000    1.366    0.893
##     RCO07             0.837    0.046   18.203    0.000    1.365    0.887
##   energia =~                                                            
##     EN01              1.000                               1.681    0.897
##     EN02              1.026    0.044   23.583    0.000    1.725    0.934
##     EN04              0.996    0.043   22.959    0.000    1.674    0.925
##     EN05              0.994    0.042   23.920    0.000    1.670    0.938
##     EN06              0.980    0.041   23.933    0.000    1.648    0.938
##     EN07              1.044    0.045   23.138    0.000    1.755    0.927
##     EN08              1.030    0.042   24.458    0.000    1.732    0.945
##   vigor =~                                                              
##     EVI01             1.000                               1.692    0.971
##     EVI02             0.977    0.027   35.895    0.000    1.653    0.958
##     EVI03             0.990    0.048   20.675    0.000    1.675    0.835
##   dedicacion =~                                                         
##     EDE01             1.000                               1.858    0.946
##     EDE02             0.915    0.035   26.258    0.000    1.699    0.924
##     EDE03             0.581    0.037   15.858    0.000    1.080    0.763
##   absorbcion =~                                                         
##     EAB01             1.000                               1.614    0.921
##     EAB02             0.704    0.051   13.897    0.000    1.136    0.748
##     EAB03             0.728    0.063   11.625    0.000    1.174    0.667
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego ~~                                                           
##     relajacion        1.120    0.165    6.769    0.000    0.612    0.612
##     maestria          0.647    0.159    4.064    0.000    0.320    0.320
##     control           1.350    0.207    6.536    0.000    0.576    0.576
##     energia           1.475    0.213    6.915    0.000    0.611    0.611
##     vigor             1.148    0.196    5.848    0.000    0.472    0.472
##     dedicacion        1.147    0.214    5.355    0.000    0.430    0.430
##     absorbcion        0.853    0.186    4.586    0.000    0.368    0.368
##   relajacion ~~                                                         
##     maestria          0.970    0.159    6.093    0.000    0.541    0.541
##     control           1.482    0.195    7.609    0.000    0.713    0.713
##     energia           1.372    0.188    7.290    0.000    0.641    0.641
##     vigor             0.957    0.168    5.690    0.000    0.444    0.444
##     dedicacion        1.036    0.187    5.548    0.000    0.438    0.438
##     absorbcion        0.752    0.162    4.656    0.000    0.366    0.366
##   maestria ~~                                                           
##     control           1.222    0.202    6.051    0.000    0.533    0.533
##     energia           1.327    0.209    6.356    0.000    0.561    0.561
##     vigor             1.009    0.191    5.290    0.000    0.424    0.424
##     dedicacion        0.987    0.207    4.774    0.000    0.378    0.378
##     absorbcion        0.866    0.185    4.692    0.000    0.381    0.381
##   control ~~                                                            
##     energia           1.989    0.252    7.877    0.000    0.726    0.726
##     vigor             1.493    0.225    6.642    0.000    0.541    0.541
##     dedicacion        1.534    0.246    6.238    0.000    0.506    0.506
##     absorbcion        1.154    0.212    5.437    0.000    0.438    0.438
##   energia ~~                                                            
##     vigor             2.047    0.249    8.227    0.000    0.720    0.720
##     dedicacion        1.850    0.259    7.134    0.000    0.592    0.592
##     absorbcion        1.344    0.220    6.098    0.000    0.495    0.495
##   vigor ~~                                                              
##     dedicacion        2.763    0.293    9.420    0.000    0.879    0.879
##     absorbcion        2.137    0.248    8.622    0.000    0.783    0.783
##   dedicacion ~~                                                         
##     absorbcion        2.734    0.293    9.323    0.000    0.912    0.912
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .RPD01             1.026    0.116    8.824    0.000    1.026    0.332
##    .RPD02             0.913    0.117    7.793    0.000    0.913    0.241
##    .RPD03             1.174    0.138    8.510    0.000    1.174    0.297
##    .RPD05             0.818    0.119    6.852    0.000    0.818    0.191
##    .RRE02             0.627    0.068    9.269    0.000    0.627    0.279
##    .RRE03             0.649    0.072    8.991    0.000    0.649    0.241
##    .RRE04             0.488    0.055    8.822    0.000    0.488    0.223
##    .RRE05             0.377    0.046    8.164    0.000    0.377    0.173
##    .RRE06             0.884    0.097    9.139    0.000    0.884    0.260
##    .RRE07             0.939    0.099    9.482    0.000    0.939    0.316
##    .RRE10             1.136    0.113   10.090    0.000    1.136    0.513
##    .RMA02             1.740    0.175    9.938    0.000    1.740    0.468
##    .RMA03             1.499    0.156    9.599    0.000    1.499    0.363
##    .RMA04             0.854    0.097    8.786    0.000    0.854    0.237
##    .RMA05             0.909    0.101    9.005    0.000    0.909    0.261
##    .RMA06             1.624    0.158   10.280    0.000    1.624    0.661
##    .RMA07             0.847    0.094    8.996    0.000    0.847    0.260
##    .RMA08             0.884    0.098    9.045    0.000    0.884    0.266
##    .RMA09             1.085    0.114    9.498    0.000    1.085    0.341
##    .RMA10             1.255    0.131    9.595    0.000    1.255    0.362
##    .RCO02             0.980    0.104    9.397    0.000    0.980    0.269
##    .RCO03             0.496    0.058    8.494    0.000    0.496    0.173
##    .RCO04             0.469    0.052    9.026    0.000    0.469    0.219
##    .RCO05             0.392    0.045    8.619    0.000    0.392    0.182
##    .RCO06             0.476    0.054    8.873    0.000    0.476    0.203
##    .RCO07             0.504    0.056    8.970    0.000    0.504    0.213
##    .EN01              0.687    0.071    9.659    0.000    0.687    0.196
##    .EN02              0.439    0.048    9.068    0.000    0.439    0.129
##    .EN04              0.474    0.051    9.261    0.000    0.474    0.145
##    .EN05              0.381    0.043    8.946    0.000    0.381    0.120
##    .EN06              0.369    0.041    8.941    0.000    0.369    0.120
##    .EN07              0.501    0.054    9.209    0.000    0.501    0.140
##    .EN08              0.359    0.041    8.720    0.000    0.359    0.107
##    .EVI01             0.174    0.036    4.859    0.000    0.174    0.057
##    .EVI02             0.245    0.039    6.351    0.000    0.245    0.082
##    .EVI03             1.222    0.124    9.829    0.000    1.222    0.304
##    .EDE01             0.402    0.065    6.153    0.000    0.402    0.104
##    .EDE02             0.492    0.065    7.542    0.000    0.492    0.146
##    .EDE03             0.834    0.084    9.885    0.000    0.834    0.417
##    .EAB01             0.468    0.098    4.757    0.000    0.468    0.152
##    .EAB02             1.018    0.109    9.328    0.000    1.018    0.441
##    .EAB03             1.722    0.176    9.798    0.000    1.722    0.555
##     desapego          2.067    0.284    7.287    0.000    1.000    1.000
##     relajacion        1.623    0.207    7.834    0.000    1.000    1.000
##     maestria          1.980    0.317    6.247    0.000    1.000    1.000
##     control           2.660    0.335    7.932    0.000    1.000    1.000
##     energia           2.825    0.327    8.627    0.000    1.000    1.000
##     vigor             2.862    0.289    9.909    0.000    1.000    1.000
##     dedicacion        3.451    0.367    9.408    0.000    1.000    1.000
##     absorbcion        2.605    0.301    8.662    0.000    1.000    1.000
lavaanPlot(model = sem5, coefs = TRUE, covs = TRUE, stars = TRUE)

style=“color:red;”> Parte 2. Energia recuperada

modelo4  <- ' #Regresiones 
              # Variables latentes
              energia =~ EN01 + EN02 + EN04 + EN05 + EN06 + EN07 + EN08
              # Varianzas y covarianzas
              #Intercepto
              '
sem4 <- sem(modelo4, data = df3)
summary(sem4)
## lavaan 0.6-19 ended normally after 32 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        14
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                                47.222
##   Degrees of freedom                                14
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   energia =~                                          
##     EN01              1.000                           
##     EN02              1.029    0.044   23.192    0.000
##     EN04              0.999    0.044   22.583    0.000
##     EN05              0.999    0.042   23.649    0.000
##     EN06              0.986    0.042   23.722    0.000
##     EN07              1.049    0.046   22.856    0.000
##     EN08              1.036    0.043   24.173    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .EN01              0.711    0.074    9.651    0.000
##    .EN02              0.444    0.049    9.012    0.000
##    .EN04              0.481    0.052    9.214    0.000
##    .EN05              0.375    0.042    8.830    0.000
##    .EN06              0.359    0.041    8.798    0.000
##    .EN07              0.499    0.055    9.129    0.000
##    .EN08              0.353    0.041    8.580    0.000
##     energia           2.801    0.327    8.565    0.000

style=“color:red;”> Parte 3. Engagement laboral

modelo5 <-  ' #Regresiones 
              # Variables latentes
              #Parte 1
              desapego =~ RPD01 + RPD02 + RPD03 + RPD05 + RPD06 + RPD07 + RPD08 + RPD09 + RPD10
              relajacion =~ RRE02 + RRE03 + RRE04 + RRE05 + RRE06 + RRE07 + RRE10
              maestria =~ RMA02 + RMA03 + RMA04 + RMA05 + RMA06 + RMA07 + RMA08 + RMA09 + RMA10
              control =~ RCO02 + RCO03 + RCO04 + RCO05 + RCO06 + RCO07
              #Parte 2
              energia =~ EN01 + EN02 + EN04 + EN05 + EN06 + EN07 + EN08
              #Parte 3 
              vigor =~ EVI01 + EVI02 + EVI03
              dedicacion =~ EDE01 + EDE02 + EDE03
              absorcion =~ EAB01 + EAB02
              # Varianzas y covarianzas
              #Intercepto
              '
sem5 <- sem(modelo5, data = df3)
summary(sem5)
## lavaan 0.6-19 ended normally after 103 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       120
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                              2313.998
##   Degrees of freedom                               961
##   P-value (Chi-square)                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   desapego =~                                         
##     RPD01             1.000                           
##     RPD02             1.204    0.081   14.854    0.000
##     RPD03             1.144    0.085   13.492    0.000
##     RPD05             1.311    0.085   15.353    0.000
##     RPD06             1.080    0.088   12.240    0.000
##     RPD07             1.226    0.085   14.502    0.000
##     RPD08             1.157    0.086   13.445    0.000
##     RPD09             1.313    0.086   15.205    0.000
##     RPD10             1.341    0.088   15.302    0.000
##   relajacion =~                                       
##     RRE02             1.000                           
##     RRE03             1.121    0.065   17.282    0.000
##     RRE04             1.022    0.058   17.629    0.000
##     RRE05             1.054    0.056   18.736    0.000
##     RRE06             1.245    0.074   16.864    0.000
##     RRE07             1.119    0.071   15.754    0.000
##     RRE10             0.817    0.067   12.165    0.000
##   maestria =~                                         
##     RMA02             1.000                           
##     RMA03             1.152    0.096   12.038    0.000
##     RMA04             1.179    0.089   13.273    0.000
##     RMA05             1.140    0.087   13.046    0.000
##     RMA06             0.648    0.075    8.634    0.000
##     RMA07             1.103    0.085   13.056    0.000
##     RMA08             1.110    0.085   12.997    0.000
##     RMA09             1.031    0.084   12.268    0.000
##     RMA10             1.057    0.088   12.052    0.000
##   control =~                                          
##     RCO02             1.000                           
##     RCO03             0.945    0.049   19.120    0.000
##     RCO04             0.794    0.044   18.058    0.000
##     RCO05             0.815    0.043   18.910    0.000
##     RCO06             0.838    0.045   18.422    0.000
##     RCO07             0.837    0.046   18.200    0.000
##   energia =~                                          
##     EN01              1.000                           
##     EN02              1.026    0.044   23.552    0.000
##     EN04              0.996    0.043   22.929    0.000
##     EN05              0.994    0.042   23.900    0.000
##     EN06              0.981    0.041   23.931    0.000
##     EN07              1.044    0.045   23.110    0.000
##     EN08              1.031    0.042   24.444    0.000
##   vigor =~                                            
##     EVI01             1.000                           
##     EVI02             0.978    0.027   35.863    0.000
##     EVI03             0.991    0.048   20.695    0.000
##   dedicacion =~                                       
##     EDE01             1.000                           
##     EDE02             0.912    0.034   26.456    0.000
##     EDE03             0.576    0.037   15.716    0.000
##   absorcion =~                                        
##     EAB01             1.000                           
##     EAB02             0.655    0.052   12.563    0.000
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   desapego ~~                                         
##     relajacion        1.155    0.164    7.022    0.000
##     maestria          0.697    0.156    4.477    0.000
##     control           1.321    0.201    6.588    0.000
##     energia           1.387    0.204    6.785    0.000
##     vigor             1.051    0.186    5.635    0.000
##     dedicacion        1.096    0.205    5.336    0.000
##     absorcion         0.860    0.181    4.755    0.000
##   relajacion ~~                                       
##     maestria          0.970    0.159    6.093    0.000
##     control           1.482    0.195    7.609    0.000
##     energia           1.372    0.188    7.290    0.000
##     vigor             0.957    0.168    5.690    0.000
##     dedicacion        1.038    0.187    5.553    0.000
##     absorcion         0.766    0.164    4.682    0.000
##   maestria ~~                                         
##     control           1.222    0.202    6.050    0.000
##     energia           1.326    0.209    6.355    0.000
##     vigor             1.008    0.191    5.290    0.000
##     dedicacion        0.990    0.207    4.779    0.000
##     absorcion         0.883    0.187    4.725    0.000
##   control ~~                                          
##     energia           1.988    0.252    7.875    0.000
##     vigor             1.492    0.225    6.641    0.000
##     dedicacion        1.539    0.246    6.248    0.000
##     absorcion         1.221    0.216    5.647    0.000
##   energia ~~                                          
##     vigor             2.046    0.249    8.225    0.000
##     dedicacion        1.854    0.260    7.142    0.000
##     absorcion         1.382    0.223    6.189    0.000
##   vigor ~~                                            
##     dedicacion        2.770    0.294    9.434    0.000
##     absorcion         2.191    0.251    8.744    0.000
##   dedicacion ~~                                       
##     absorcion         2.797    0.296    9.442    0.000
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .RPD01             1.162    0.119    9.778    0.000
##    .RPD02             0.997    0.108    9.236    0.000
##    .RPD03             1.422    0.146    9.722    0.000
##    .RPD05             0.976    0.109    8.953    0.000
##    .RPD06             1.836    0.184    9.983    0.000
##    .RPD07             1.173    0.125    9.393    0.000
##    .RPD08             1.475    0.151    9.734    0.000
##    .RPD09             1.038    0.115    9.046    0.000
##    .RPD10             1.043    0.116    8.986    0.000
##    .RRE02             0.626    0.067    9.275    0.000
##    .RRE03             0.647    0.072    8.994    0.000
##    .RRE04             0.490    0.055    8.840    0.000
##    .RRE05             0.377    0.046    8.179    0.000
##    .RRE06             0.888    0.097    9.156    0.000
##    .RRE07             0.941    0.099    9.492    0.000
##    .RRE10             1.131    0.112   10.089    0.000
##    .RMA02             1.742    0.175    9.938    0.000
##    .RMA03             1.500    0.156    9.600    0.000
##    .RMA04             0.854    0.097    8.786    0.000
##    .RMA05             0.907    0.101    9.001    0.000
##    .RMA06             1.624    0.158   10.280    0.000
##    .RMA07             0.846    0.094    8.993    0.000
##    .RMA08             0.883    0.098    9.042    0.000
##    .RMA09             1.086    0.114    9.498    0.000
##    .RMA10             1.255    0.131    9.594    0.000
##    .RCO02             0.981    0.104    9.399    0.000
##    .RCO03             0.496    0.058    8.496    0.000
##    .RCO04             0.470    0.052    9.028    0.000
##    .RCO05             0.392    0.046    8.620    0.000
##    .RCO06             0.475    0.054    8.870    0.000
##    .RCO07             0.503    0.056    8.969    0.000
##    .EN01              0.689    0.071    9.662    0.000
##    .EN02              0.439    0.048    9.070    0.000
##    .EN04              0.475    0.051    9.263    0.000
##    .EN05              0.380    0.043    8.944    0.000
##    .EN06              0.368    0.041    8.933    0.000
##    .EN07              0.502    0.054    9.211    0.000
##    .EN08              0.358    0.041    8.714    0.000
##    .EVI01             0.176    0.036    4.910    0.000
##    .EVI02             0.244    0.038    6.341    0.000
##    .EVI03             1.219    0.124    9.824    0.000
##    .EDE01             0.387    0.064    6.037    0.000
##    .EDE02             0.494    0.065    7.606    0.000
##    .EDE03             0.848    0.086    9.917    0.000
##    .EAB01             0.376    0.122    3.075    0.002
##    .EAB02             1.150    0.120    9.588    0.000
##     desapego          1.931    0.275    7.018    0.000
##     relajacion        1.624    0.207    7.838    0.000
##     maestria          1.979    0.317    6.243    0.000
##     control           2.659    0.335    7.930    0.000
##     energia           2.823    0.327    8.623    0.000
##     vigor             2.860    0.289    9.903    0.000
##     dedicacion        3.466    0.367    9.448    0.000
##     absorcion         2.697    0.312    8.655    0.000

style=“color:red;”> Parte 4. Modelo de medición

modelo_cfa <- '
desapego =~ RPD01 + RPD02 + RPD03 + RPD05
relajacion =~ RRE02 + RRE03 + RRE04 + RRE05 + RRE06 + RRE07 + RRE10
maestria =~ RMA02 + RMA03 + RMA04 + RMA05 + RMA06 + RMA07 + RMA08 + RMA09 + RMA10
control =~ RCO02 + RCO03 + RCO04 + RCO05 + RCO06 + RCO07
energia =~ EN01 + EN02 + EN04 + EN05 + EN06 + EN07 + EN08
vigor =~ EVI01 + EVI02 + EVI03
dedicacion =~ EDE01 + EDE02 + EDE03
absorbcion =~ EAB01 + EAB02 + EAB03
'

cfa_model <- cfa(modelo_cfa, data = df3)
summary(cfa_model, fit.measures = TRUE, standardized = TRUE)
## lavaan 0.6-19 ended normally after 94 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       112
## 
##   Number of observations                           223
## 
## Model Test User Model:
##                                                       
##   Test statistic                              1839.261
##   Degrees of freedom                               791
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             11684.422
##   Degrees of freedom                               861
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.903
##   Tucker-Lewis Index (TLI)                       0.895
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -13572.104
##   Loglikelihood unrestricted model (H1)     -12652.474
##                                                       
##   Akaike (AIC)                               27368.209
##   Bayesian (BIC)                             27749.812
##   Sample-size adjusted Bayesian (SABIC)      27394.870
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.077
##   90 Percent confidence interval - lower         0.072
##   90 Percent confidence interval - upper         0.082
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    0.151
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.064
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego =~                                                           
##     RPD01             1.000                               1.438    0.817
##     RPD02             1.181    0.076   15.565    0.000    1.697    0.871
##     RPD03             1.159    0.079   14.711    0.000    1.666    0.838
##     RPD05             1.297    0.080   16.282    0.000    1.864    0.900
##   relajacion =~                                                         
##     RRE02             1.000                               1.274    0.849
##     RRE03             1.121    0.065   17.252    0.000    1.428    0.871
##     RRE04             1.023    0.058   17.631    0.000    1.303    0.881
##     RRE05             1.054    0.056   18.721    0.000    1.343    0.909
##     RRE06             1.246    0.074   16.874    0.000    1.587    0.860
##     RRE07             1.120    0.071   15.755    0.000    1.427    0.827
##     RRE10             0.815    0.067   12.126    0.000    1.039    0.698
##   maestria =~                                                           
##     RMA02             1.000                               1.407    0.730
##     RMA03             1.152    0.096   12.048    0.000    1.621    0.798
##     RMA04             1.179    0.089   13.281    0.000    1.659    0.874
##     RMA05             1.139    0.087   13.050    0.000    1.603    0.860
##     RMA06             0.648    0.075    8.639    0.000    0.912    0.582
##     RMA07             1.103    0.084   13.061    0.000    1.552    0.860
##     RMA08             1.109    0.085   13.002    0.000    1.561    0.857
##     RMA09             1.030    0.084   12.276    0.000    1.450    0.812
##     RMA10             1.057    0.088   12.059    0.000    1.487    0.799
##   control =~                                                            
##     RCO02             1.000                               1.631    0.855
##     RCO03             0.945    0.049   19.129    0.000    1.542    0.910
##     RCO04             0.794    0.044   18.068    0.000    1.295    0.884
##     RCO05             0.815    0.043   18.918    0.000    1.329    0.905
##     RCO06             0.838    0.045   18.420    0.000    1.366    0.893
##     RCO07             0.837    0.046   18.203    0.000    1.365    0.887
##   energia =~                                                            
##     EN01              1.000                               1.681    0.897
##     EN02              1.026    0.044   23.583    0.000    1.725    0.934
##     EN04              0.996    0.043   22.959    0.000    1.674    0.925
##     EN05              0.994    0.042   23.920    0.000    1.670    0.938
##     EN06              0.980    0.041   23.933    0.000    1.648    0.938
##     EN07              1.044    0.045   23.138    0.000    1.755    0.927
##     EN08              1.030    0.042   24.458    0.000    1.732    0.945
##   vigor =~                                                              
##     EVI01             1.000                               1.692    0.971
##     EVI02             0.977    0.027   35.895    0.000    1.653    0.958
##     EVI03             0.990    0.048   20.675    0.000    1.675    0.835
##   dedicacion =~                                                         
##     EDE01             1.000                               1.858    0.946
##     EDE02             0.915    0.035   26.258    0.000    1.699    0.924
##     EDE03             0.581    0.037   15.858    0.000    1.080    0.763
##   absorbcion =~                                                         
##     EAB01             1.000                               1.614    0.921
##     EAB02             0.704    0.051   13.897    0.000    1.136    0.748
##     EAB03             0.728    0.063   11.625    0.000    1.174    0.667
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   desapego ~~                                                           
##     relajacion        1.120    0.165    6.769    0.000    0.612    0.612
##     maestria          0.647    0.159    4.064    0.000    0.320    0.320
##     control           1.350    0.207    6.536    0.000    0.576    0.576
##     energia           1.475    0.213    6.915    0.000    0.611    0.611
##     vigor             1.148    0.196    5.848    0.000    0.472    0.472
##     dedicacion        1.147    0.214    5.355    0.000    0.430    0.430
##     absorbcion        0.853    0.186    4.586    0.000    0.368    0.368
##   relajacion ~~                                                         
##     maestria          0.970    0.159    6.093    0.000    0.541    0.541
##     control           1.482    0.195    7.609    0.000    0.713    0.713
##     energia           1.372    0.188    7.290    0.000    0.641    0.641
##     vigor             0.957    0.168    5.690    0.000    0.444    0.444
##     dedicacion        1.036    0.187    5.548    0.000    0.438    0.438
##     absorbcion        0.752    0.162    4.656    0.000    0.366    0.366
##   maestria ~~                                                           
##     control           1.222    0.202    6.051    0.000    0.533    0.533
##     energia           1.327    0.209    6.356    0.000    0.561    0.561
##     vigor             1.009    0.191    5.290    0.000    0.424    0.424
##     dedicacion        0.987    0.207    4.774    0.000    0.378    0.378
##     absorbcion        0.866    0.185    4.692    0.000    0.381    0.381
##   control ~~                                                            
##     energia           1.989    0.252    7.877    0.000    0.726    0.726
##     vigor             1.493    0.225    6.642    0.000    0.541    0.541
##     dedicacion        1.534    0.246    6.238    0.000    0.506    0.506
##     absorbcion        1.154    0.212    5.437    0.000    0.438    0.438
##   energia ~~                                                            
##     vigor             2.047    0.249    8.227    0.000    0.720    0.720
##     dedicacion        1.850    0.259    7.134    0.000    0.592    0.592
##     absorbcion        1.344    0.220    6.098    0.000    0.495    0.495
##   vigor ~~                                                              
##     dedicacion        2.763    0.293    9.420    0.000    0.879    0.879
##     absorbcion        2.137    0.248    8.622    0.000    0.783    0.783
##   dedicacion ~~                                                         
##     absorbcion        2.734    0.293    9.323    0.000    0.912    0.912
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .RPD01             1.026    0.116    8.824    0.000    1.026    0.332
##    .RPD02             0.913    0.117    7.793    0.000    0.913    0.241
##    .RPD03             1.174    0.138    8.510    0.000    1.174    0.297
##    .RPD05             0.818    0.119    6.852    0.000    0.818    0.191
##    .RRE02             0.627    0.068    9.269    0.000    0.627    0.279
##    .RRE03             0.649    0.072    8.991    0.000    0.649    0.241
##    .RRE04             0.488    0.055    8.822    0.000    0.488    0.223
##    .RRE05             0.377    0.046    8.164    0.000    0.377    0.173
##    .RRE06             0.884    0.097    9.139    0.000    0.884    0.260
##    .RRE07             0.939    0.099    9.482    0.000    0.939    0.316
##    .RRE10             1.136    0.113   10.090    0.000    1.136    0.513
##    .RMA02             1.740    0.175    9.938    0.000    1.740    0.468
##    .RMA03             1.499    0.156    9.599    0.000    1.499    0.363
##    .RMA04             0.854    0.097    8.786    0.000    0.854    0.237
##    .RMA05             0.909    0.101    9.005    0.000    0.909    0.261
##    .RMA06             1.624    0.158   10.280    0.000    1.624    0.661
##    .RMA07             0.847    0.094    8.996    0.000    0.847    0.260
##    .RMA08             0.884    0.098    9.045    0.000    0.884    0.266
##    .RMA09             1.085    0.114    9.498    0.000    1.085    0.341
##    .RMA10             1.255    0.131    9.595    0.000    1.255    0.362
##    .RCO02             0.980    0.104    9.397    0.000    0.980    0.269
##    .RCO03             0.496    0.058    8.494    0.000    0.496    0.173
##    .RCO04             0.469    0.052    9.026    0.000    0.469    0.219
##    .RCO05             0.392    0.045    8.619    0.000    0.392    0.182
##    .RCO06             0.476    0.054    8.873    0.000    0.476    0.203
##    .RCO07             0.504    0.056    8.970    0.000    0.504    0.213
##    .EN01              0.687    0.071    9.659    0.000    0.687    0.196
##    .EN02              0.439    0.048    9.068    0.000    0.439    0.129
##    .EN04              0.474    0.051    9.261    0.000    0.474    0.145
##    .EN05              0.381    0.043    8.946    0.000    0.381    0.120
##    .EN06              0.369    0.041    8.941    0.000    0.369    0.120
##    .EN07              0.501    0.054    9.209    0.000    0.501    0.140
##    .EN08              0.359    0.041    8.720    0.000    0.359    0.107
##    .EVI01             0.174    0.036    4.859    0.000    0.174    0.057
##    .EVI02             0.245    0.039    6.351    0.000    0.245    0.082
##    .EVI03             1.222    0.124    9.829    0.000    1.222    0.304
##    .EDE01             0.402    0.065    6.153    0.000    0.402    0.104
##    .EDE02             0.492    0.065    7.542    0.000    0.492    0.146
##    .EDE03             0.834    0.084    9.885    0.000    0.834    0.417
##    .EAB01             0.468    0.098    4.757    0.000    0.468    0.152
##    .EAB02             1.018    0.109    9.328    0.000    1.018    0.441
##    .EAB03             1.722    0.176    9.798    0.000    1.722    0.555
##     desapego          2.067    0.284    7.287    0.000    1.000    1.000
##     relajacion        1.623    0.207    7.834    0.000    1.000    1.000
##     maestria          1.980    0.317    6.247    0.000    1.000    1.000
##     control           2.660    0.335    7.932    0.000    1.000    1.000
##     energia           2.825    0.327    8.627    0.000    1.000    1.000
##     vigor             2.862    0.289    9.909    0.000    1.000    1.000
##     dedicacion        3.451    0.367    9.408    0.000    1.000    1.000
##     absorbcion        2.605    0.301    8.662    0.000    1.000    1.000
lavaanPlot(model = cfa_model, coefs = TRUE, covs = TRUE, stars = TRUE)

En conclusión, las experiencias de recuperación pueden entenderse como un conjunto de 4 dominios: desapego, relajación, maestría y control. Cada uno de ellos contribuye significativamente en la variable latente. La energía recuperada es unidimensional, y sus variables también contribuyen significativamente. De manera global, tanto la energía como las experiencias de recuperación contribuyen significativamente en el engagement laboral, destacando la relación de la dedicación con la absorción del trabajo.