Análisis estadístico

Diego Bogado

Para el análisis descriptivo, aquellas variables numéricas continuas que asumieron una distribución normal se reportan como media y desvío estándar (DE). En caso contrario se reportan como mediana y rango intercuartílico (RIQ). Las variables categóricas se reportan como número de presentación y porcentaje (%). Para valorar la normalidad de la muestra se utilizó el test estadístico de Shapiro-Wilk y la evaluación gráfica mediante gráficos de histogramas y gráficos de cajas y bigotes.

Luego del análisis descriptivo, se analizó la consistencia interna del cuestionario Escala de Identidad Deportiva a través del cálculo del coeficiente de alfa de Cronbach (Bland 1997). La evaluación de la consistencia interna permite estimar la confiabilidad de la escala como instrumento de medida a través de un conjunto de ítems que se espera que midan el mismo constructo. Se consideran aceptables valores entre 0.70 y 0.95 (Tavakol & Dennick 2011; COSMIN 2018).

Previo a la exploración de la estructura interna de la escala a través de un Análisis Factorial Exploratorio (Orcan 2018), se calculó la correlación inter ítem mediante el coeficiente de correlación de Spearman. Se considera necesario para el análisis factorial la presencia de correlaciones mayores a 0.30 en la matríz de correlación (Tabachnik & Fidell 2001). Se aplicó el criterio de Kaiser-Meyer-Olkin (KMO) (Kaiser 1960; Kaiser 1970) y el test de esfericidad de Bartlett (Bartlett 1950; Bartlett 1951) para valorar la adecuación del muestreo. La índices de KMO superiores a 0.6 se consideran aceptables como medida de adecuación del modelo. Luego de haber controlado el cumplimiento de supuestos, se realizó la extracción de datos mediante el método de rotación Equamax y el método de extracción de máxima verosimilitud. Se calculó el número más adecuado de factores con extracción Equamax (Lloret 2014). Con el objetivo de analizar los vínculos entre las variables observadas en la escala, y las variables latentes denominadas factores, se llevó a cabo el análisis factorial exploratorio incluyendo todas las variables con un coeficiente de correlación mayor a 0.30.

###Referencias

Bland JM, Altman DG. Statistics notes: Cronbach’s alpha. BMJ. 1997;314(7080):572-572.

Tavakol, Mohsen, and Reg Dennick. 2011. “Making Sense of Cronbach’s Alpha.” International journal of medical education 2: 53–55.

Prinsen CAC, Mokkink LB, Bouter LM, Alonso J, Patrick DL, de Vet HCW, Terwee CB. COSMIN guideline for systematic reviews of patient-reported outcome measures. Qual Life Res. 2018 May;27(5):1147-1157. -57.

Tabachnick, B. G. and L. S. Fidell (2001). Using multivariate statistics. Needham Heights, MA, Allyn & Bacon.

Orcan F. Exploratory and Confirmatory Factor Analysis: Which One to Use First? Eğitimde Ve Psikolojide Ölçme Ve Değerlendirme Derg. 2018;414-21.

Kaiser HF. The Application of Electronic Computers to Factor Analysis. Educ Psychol Meas. 1960;20(1):141-51.

Kaiser HF. A second generation little jiffy. Psychometrika. 1970;35(4):401-15.

Bartlett MS. Tests of significance in factor analysis. Br J Stat Psychol. 1950;3(2):77-85.

Bartlett MS. A further note on tests of significance in factor analysis. Br J Stat Psychol. 1951;4(1):1-2.

Lloret-Segura, Susana; Ferreres-Traver, Adoración; Hernández-Baeza, Ana; Tomás-Marco, Inés El análisis factorial exploratorio de los ítems: una guía práctica, revisada y actualizada. Anales de Psicología 2014; 30 (3):1151-116.

ANÁLISIS DESCRIPTIVO

Edad

# Edad
boxplot(df$Edad)

hist(df$Edad)

shapiro.test(df$Edad) # Distribución Normal - 0.08117
## 
##  Shapiro-Wilk normality test
## 
## data:  df$Edad
## W = 0.95183, p-value = 0.08117
# No hay evidencia de incumplimiento de la normalidad, sin embargo de forma gráfica no parece serlo. 
# Por lo tanto test de la Mediana y RIQ

mifuncion(df$Edad)
##          Media         Desvio Cuantil.25.25%        Mediana Cuantil.75.75% 
##      30.487805       8.964156      24.000000      30.000000      37.000000 
##            Min            Max         Rango1         Rango2              N 
##       0.000000      50.000000       0.000000      50.000000      41.000000 
##             na        N_total        Porc_NA 
##       0.000000      41.000000       0.000000

RPE

tab.noby <- tableby(~Deporte, data=df)
summary(tab.noby)
## 
## 
## |                                                | Overall (N=41) |
## |:-----------------------------------------------|:--------------:|
## |**Deporte**                                     |                |
## |&nbsp;&nbsp;&nbsp;Atletismo adaptado            |    2 (4.9%)    |
## |&nbsp;&nbsp;&nbsp;Básquet sobre silla de ruedas |   21 (51.2%)   |
## |&nbsp;&nbsp;&nbsp;Natación adaptada             |    3 (7.3%)    |
## |&nbsp;&nbsp;&nbsp;Tenis de mesa adaptado        |   15 (36.6%)   |
#descriptiva por grupo/by
tab1 <- tableby(Deporte ~ Sexo + Edad + Frecuencia + Horas + RPE + Años, data=df, na.tableby(TRUE)) #paquete arsenal
# si queremos missing, agregar a la sintaxis na.tableby(TRUE)
# si queremos que no haga comparaciones, agregar test=FALSE

#para q se vea bien en la consola
summary(tab1, text=TRUE)
## 
## 
## |                              | Atletismo adaptado (N=2) | Básquet sobre silla de ruedas (N=21) | Natación adaptada (N=3) | Tenis de mesa adaptado (N=15) |  Total (N=41)  | p value|
## |:-----------------------------|:------------------------:|:------------------------------------:|:-----------------------:|:-----------------------------:|:--------------:|-------:|
## |Sexo                          |                          |                                      |                         |                               |                |   0.205|
## |-  Femenino                   |        2 (100.0%)        |              6 (28.6%)               |        1 (33.3%)        |           4 (26.7%)           |   13 (31.7%)   |        |
## |-  Masculino                  |         0 (0.0%)         |              15 (71.4%)              |        2 (66.7%)        |          11 (73.3%)           |   28 (68.3%)   |        |
## |Edad                          |                          |                                      |                         |                               |                |   0.070|
## |-  Mean (SD)                  |      21.000 (0.000)      |            28.952 (8.840)            |     26.333 (5.508)      |        34.733 (8.614)         | 30.488 (8.964) |        |
## |-  Range                      |     21.000 - 21.000      |            0.000 - 40.000            |     20.000 - 30.000     |        22.000 - 50.000        | 0.000 - 50.000 |        |
## |Frecuencia                    |                          |                                      |                         |                               |                |   0.331|
## |-  2 veces por semana o menos |         0 (0.0%)         |               0 (0.0%)               |        0 (0.0%)         |           1 (6.7%)            |    1 (2.4%)    |        |
## |-  3 veces por semana         |         0 (0.0%)         |               2 (9.5%)               |        0 (0.0%)         |           5 (33.3%)           |   7 (17.1%)    |        |
## |-  4 veces por semana o más   |        2 (100.0%)        |              19 (90.5%)              |       3 (100.0%)        |           9 (60.0%)           |   33 (80.5%)   |        |
## |Horas                         |                          |                                      |                         |                               |                |   0.583|
## |-  Entre 1 y 2 horas          |         0 (0.0%)         |              4 (19.0%)               |        0 (0.0%)         |           2 (13.3%)           |   6 (14.6%)    |        |
## |-  Entre 2 y 3 horas          |         0 (0.0%)         |              9 (42.9%)               |        1 (33.3%)        |           8 (53.3%)           |   18 (43.9%)   |        |
## |-  Más de 3 horas             |        2 (100.0%)        |              8 (38.1%)               |        2 (66.7%)        |           5 (33.3%)           |   17 (41.5%)   |        |
## |RPE                           |                          |                                      |                         |                               |                |   0.169|
## |-  Mean (SD)                  |      8.000 (1.414)       |            7.762 (0.889)             |      9.333 (0.577)      |         8.200 (1.474)         | 8.049 (1.182)  |        |
## |-  Range                      |      7.000 - 9.000       |            6.000 - 10.000            |     9.000 - 10.000      |        5.000 - 10.000         | 5.000 - 10.000 |        |
## |Años                          |                          |                                      |                         |                               |                |   0.515|
## |-  2 años o menos             |         0 (0.0%)         |               2 (9.5%)               |        0 (0.0%)         |           0 (0.0%)            |    2 (4.9%)    |        |
## |-  3 años                     |        1 (50.0%)         |               2 (9.5%)               |        0 (0.0%)         |           0 (0.0%)            |    3 (7.3%)    |        |
## |-  4 años                     |         0 (0.0%)         |               2 (9.5%)               |        0 (0.0%)         |           2 (13.3%)           |    4 (9.8%)    |        |
## |-  5 años                     |         0 (0.0%)         |               2 (9.5%)               |        0 (0.0%)         |           3 (20.0%)           |   5 (12.2%)    |        |
## |-  6 años o más               |        1 (50.0%)         |              13 (61.9%)              |       3 (100.0%)        |          10 (66.7%)           |   27 (65.9%)   |        |

SUBGRUPO IDENTIDAD DEPORTIVA (AIMS)

Se extrajo de la base de datos aquellas columnas correspondientes a la Escala de identidad deportiva. A partir de dicha base, se llevó a cabo el cálculo del coeficiente alfa de Cronbach el cual arrojó un valor de 0.739. Dicho valor se encuentra dentro del rango propuesto por Tavakol & Dennick.

df_afe<-df[c(40:49)]

alpha(df_afe) # 0.7391779
## [1] 0.7391779

Con el objetivo de buscar las correlaciones entre las variables de la Escala, se utilizó el método de correlación de Spearman debido a su mayor robustez. De la aplicación de dicho test, se encontraron correlaciones positivas y negativas siendo las de mayor magnitud la correlación entre el ítem 4 y 5 (0.75), entre el 1 y el 2 (0.74) y entre el 8 y el 9 (0.54). El resto de los valores se muestran en la siguiente matriz.

correlacion<-cor2(df_afe, method ="spearman")
##    xi                                                         
## xi  1.00                                                      
##     0.74  1.00                                                
##     0.02  0.22  1.00                                          
##     0.36  0.40  0.33  1.00                                    
##     0.09  0.14  0.37  0.75  1.00                              
##     0.00 -0.05  0.35  0.22  0.40  1.00                        
##     0.47  0.46  0.07  0.53  0.34  0.22  1.00                  
##     0.08  0.22  0.00  0.21  0.26  0.12  0.15  1.00            
##    -0.19 -0.17  0.22  0.25  0.36  0.42  0.00  0.39  1.00      
##     0.26  0.38 -0.01  0.46  0.48  0.19  0.36  0.54  0.19  1.00
colnames(correlacion)<-c("ID1","ID2","ID3","ID4","ID5","ID6", "ID7", "ID8", "ID9", "ID10")                    
rownames(correlacion)<-c("ID1","ID2","ID3","ID4","ID5","ID6", "ID7", "ID8", "ID9", "ID10")                    
corrplot.mixed(correlacion, upper  = "ellipse" , tl.pos = "lt")

#matriz<-hetcor(df_afe)$correlations

#ggcorrplot(mat_cor, type = "lower", hc.order = TRUE)

Llevamos a cabo la prueba de adecuación de la muestra mediante el test de KMO y de esfericidad de Bartlett. De dichos test encontramos que la adecuación muestral fueron satisfactorios, con un índice global de KMO de 0.64, con todos los índices individuales ubicados entre 0.44 y 0.77. Por otro lado, la prueba de esfericidad de Bartlett resultó estadísticamente significativo con p-valor < 0.001.

KMO<-KMO(cor(df_afe))

Bartlett<-cortest.bartlett(cor(df_afe), n=nrow(df_afe))

KMO # Medida de adecuación de los datos para el análisis factorial
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = cor(df_afe))
## Overall MSA =  0.64
## MSA for each item = 
##  ID1  ID2  ID3  ID4  ID5  ID6  ID7  ID8  ID9 ID10 
## 0.58 0.52 0.44 0.75 0.70 0.65 0.77 0.57 0.67 0.63
Bartlett # Comprueba la H0 que afirma que las variables no están correlacionadas
## $chisq
## [1] 162.2623
## 
## $p.value
## [1] 3.688479e-15
## 
## $df
## [1] 45
#Calculo de determinante, donde valores cercanos a cero indican presencia de correlación entre las variables
#det(cor(df_afe))

Análisis Factorial. Por medio de esta estrategia, se lleva a cabo la extracción de factores. El Análisis Factorial intenta reducir la cantidad de dimensiones disponibles sin perder información (o perdiendo la menor cantidad de información disponible) por lo cual, la cantidad máxima de factores va a ser igual a la cantidad de ítems que tengamos. En el gráfico siguiente se puede observar cual es el número de factores más adecuado según la mayoría de los métodos empleados.

nfactoresAF<-n_factors(
  df_afe,
  type = "FA",
  rotation = "equamax",
  algorithm = "default",
  package = c("nFactors", "psych"),
  cor = NULL,
  safe = TRUE,
  n_max = NULL)
plot(nfactoresAF)

nfactoresAF
as.data.frame(nfactoresAF)
summary(nfactoresAF)

El análisis factorial llevado a cabo mostró una estructura de 3 factores que en suma explican el 58% de la varianza total, con una explicación del 24% por parte de primer factor. La siguiente salida muestra los resultados del análisis factorial exploratorio con los factores y las variables que lo componen según el valor de correlación en cada una. A su vez, se muestra en la figura las cargas de cada variable que es explicada por cada factor latente.

afe<-fa(df_afe,nfactors = 3,fm = "ml",rotate ="equamax",cor = "cor") 

print(afe,digits = 2,cut = .30,sort=TRUE)
## Factor Analysis using method =  ml
## Call: fa(r = df_afe, nfactors = 3, rotate = "equamax", fm = "ml", cor = "cor")
## Standardized loadings (pattern matrix) based upon correlation matrix
##      item  ML2   ML3   ML1   h2    u2 com
## ID5     5 0.92             0.86 0.137 1.1
## ID4     4 0.76  0.37       0.72 0.275 1.5
## ID7     7 0.55  0.38       0.45 0.549 1.8
## ID6     6 0.50             0.29 0.713 1.3
## ID3     3 0.42             0.19 0.810 1.2
## ID9     9 0.40        0.34 0.34 0.655 2.7
## ID2     2       0.91       0.84 0.157 1.1
## ID1     1       0.81       0.66 0.335 1.0
## ID8     8             0.99 1.00 0.005 1.0
## ID10   10 0.30        0.56 0.46 0.536 2.0
## 
##                        ML2  ML3  ML1
## SS loadings           2.41 1.93 1.48
## Proportion Var        0.24 0.19 0.15
## Cumulative Var        0.24 0.43 0.58
## Proportion Explained  0.41 0.33 0.25
## Cumulative Proportion 0.41 0.75 1.00
## 
## Mean item complexity =  1.5
## Test of the hypothesis that 3 factors are sufficient.
## 
## The degrees of freedom for the null model are  45  and the objective function was  4.53 with Chi Square of  162.26
## The degrees of freedom for the model are 18  and the objective function was  0.66 
## 
## The root mean square of the residuals (RMSR) is  0.06 
## The df corrected root mean square of the residuals is  0.1 
## 
## The harmonic number of observations is  41 with the empirical chi square  15.56  with prob <  0.62 
## The total number of observations was  41  with Likelihood Chi Square =  22.49  with prob <  0.21 
## 
## Tucker Lewis Index of factoring reliability =  0.896
## RMSEA index =  0.074  and the 90 % confidence intervals are  0 0.17
## BIC =  -44.35
## Fit based upon off diagonal values = 0.96
## Measures of factor score adequacy             
##                                                    ML2  ML3  ML1
## Correlation of (regression) scores with factors   0.95 0.94 1.00
## Multiple R square of scores with factors          0.90 0.89 0.99
## Minimum correlation of possible factor scores     0.81 0.78 0.99
fa.diagram(afe)

Analisis factorial confirmatorio

Análisis de un factor, es decir, con todas las variables ubicadas bajo el mismo factor.

#Especificación del modelo conceptual - Unifactorial
Unfactor<-'A =~ ID1 + ID2 + ID3 + ID4 + ID5 + ID6 + ID7 + ID8 + ID9 + ID10'


Unfactor <- cfa(Unfactor,orthogonal=FALSE, data=df_afe, estimator="WLSMV",ordered =names(df_afe))
summary(Unfactor, fit.measures=TRUE)
## lavaan 0.6-12 ended normally after 24 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        55
## 
##   Number of observations                            41
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                               107.216     105.341
##   Degrees of freedom                                35          35
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.178
##   Shift parameter                                           14.317
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                               705.910     418.854
##   Degrees of freedom                                45          45
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.768
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.891       0.812
##   Tucker-Lewis Index (TLI)                       0.860       0.758
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.227       0.224
##   90 Percent confidence interval - lower         0.179       0.176
##   90 Percent confidence interval - upper         0.277       0.274
##   P-value RMSEA <= 0.05                          0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.221       0.221
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   A =~                                                
##     ID1               1.000                           
##     ID2               1.023    0.201    5.090    0.000
##     ID3               0.427    0.133    3.218    0.001
##     ID4               1.061    0.128    8.298    0.000
##     ID5               0.962    0.114    8.410    0.000
##     ID6               0.503    0.152    3.318    0.001
##     ID7               0.752    0.121    6.213    0.000
##     ID8               0.586    0.159    3.698    0.000
##     ID9               0.386    0.152    2.545    0.011
##     ID10              0.771    0.132    5.830    0.000
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.000                           
##    .ID2               0.000                           
##    .ID3               0.000                           
##    .ID4               0.000                           
##    .ID5               0.000                           
##    .ID6               0.000                           
##    .ID7               0.000                           
##    .ID8               0.000                           
##    .ID9               0.000                           
##    .ID10              0.000                           
##     A                 0.000                           
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1|t1           -1.657    0.337   -4.919    0.000
##     ID1|t2           -1.052    0.244   -4.318    0.000
##     ID1|t3           -0.476    0.207   -2.304    0.021
##     ID2|t1           -0.859    0.227   -3.782    0.000
##     ID2|t2           -0.408    0.204   -1.999    0.046
##     ID3|t1           -1.971    0.426   -4.625    0.000
##     ID3|t2           -1.052    0.244   -4.318    0.000
##     ID3|t3           -0.546    0.209   -2.607    0.009
##     ID3|t4           -0.031    0.198   -0.154    0.877
##     ID3|t5            0.408    0.204    1.999    0.046
##     ID3|t6            0.694    0.217    3.204    0.001
##     ID4|t1           -1.052    0.244   -4.318    0.000
##     ID4|t2           -0.092    0.198   -0.463    0.644
##     ID4|t3            0.279    0.201    1.387    0.166
##     ID5|t1           -1.971    0.426   -4.625    0.000
##     ID5|t2           -1.052    0.244   -4.318    0.000
##     ID5|t3           -0.216    0.200   -1.079    0.281
##     ID5|t4            0.343    0.202    1.693    0.090
##     ID6|t1           -1.453    0.296   -4.900    0.000
##     ID6|t2           -1.052    0.244   -4.318    0.000
##     ID6|t3           -0.694    0.217   -3.204    0.001
##     ID6|t4           -0.092    0.198   -0.463    0.644
##     ID6|t5            0.408    0.204    1.999    0.046
##     ID7|t1           -1.971    0.426   -4.625    0.000
##     ID7|t2           -1.657    0.337   -4.919    0.000
##     ID7|t3           -0.694    0.217   -3.204    0.001
##     ID7|t4            0.153    0.199    0.771    0.441
##     ID7|t5            0.694    0.217    3.204    0.001
##     ID8|t1           -1.657    0.337   -4.919    0.000
##     ID8|t2           -1.453    0.296   -4.900    0.000
##     ID8|t3           -1.052    0.244   -4.318    0.000
##     ID8|t4           -0.774    0.221   -3.497    0.000
##     ID8|t5           -0.408    0.204   -1.999    0.046
##     ID8|t6            0.153    0.199    0.771    0.441
##     ID9|t1           -0.618    0.213   -2.907    0.004
##     ID9|t2           -0.343    0.202   -1.693    0.090
##     ID9|t3           -0.092    0.198   -0.463    0.644
##     ID9|t4            0.618    0.213    2.907    0.004
##     ID9|t5            1.165    0.256    4.557    0.000
##     ID10|t1          -1.453    0.296   -4.900    0.000
##     ID10|t2          -1.052    0.244   -4.318    0.000
##     ID10|t3          -0.774    0.221   -3.497    0.000
##     ID10|t4          -0.476    0.207   -2.304    0.021
##     ID10|t5          -0.153    0.199   -0.771    0.441
##     ID10|t6           0.343    0.202    1.693    0.090
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.293                           
##    .ID2               0.259                           
##    .ID3               0.871                           
##    .ID4               0.203                           
##    .ID5               0.345                           
##    .ID6               0.821                           
##    .ID7               0.600                           
##    .ID8               0.757                           
##    .ID9               0.894                           
##    .ID10              0.580                           
##     A                 0.707    0.151    4.680    0.000
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1               1.000                           
##     ID2               1.000                           
##     ID3               1.000                           
##     ID4               1.000                           
##     ID5               1.000                           
##     ID6               1.000                           
##     ID7               1.000                           
##     ID8               1.000                           
##     ID9               1.000                           
##     ID10              1.000
fitMeasures(Unfactor)
##                          npar                          fmin 
##                        55.000                         1.308 
##                         chisq                            df 
##                       107.216                        35.000 
##                        pvalue                  chisq.scaled 
##                         0.000                       105.341 
##                     df.scaled                 pvalue.scaled 
##                        35.000                         0.000 
##          chisq.scaling.factor                baseline.chisq 
##                         1.178                       705.910 
##                   baseline.df               baseline.pvalue 
##                        45.000                         0.000 
##         baseline.chisq.scaled            baseline.df.scaled 
##                       418.854                        45.000 
##        baseline.pvalue.scaled baseline.chisq.scaling.factor 
##                         0.000                         1.768 
##                           cfi                           tli 
##                         0.891                         0.860 
##                          nnfi                           rfi 
##                         0.860                         0.805 
##                           nfi                          pnfi 
##                         0.848                         0.660 
##                           ifi                           rni 
##                         0.892                         0.891 
##                    cfi.scaled                    tli.scaled 
##                         0.812                         0.758 
##                    cfi.robust                    tli.robust 
##                            NA                            NA 
##                   nnfi.scaled                   nnfi.robust 
##                         0.758                            NA 
##                    rfi.scaled                    nfi.scaled 
##                         0.677                         0.749 
##                    ifi.scaled                    rni.scaled 
##                         0.817                         0.812 
##                    rni.robust                         rmsea 
##                            NA                         0.227 
##                rmsea.ci.lower                rmsea.ci.upper 
##                         0.179                         0.277 
##                  rmsea.pvalue                  rmsea.scaled 
##                         0.000                         0.224 
##         rmsea.ci.lower.scaled         rmsea.ci.upper.scaled 
##                         0.176                         0.274 
##           rmsea.pvalue.scaled                  rmsea.robust 
##                         0.000                            NA 
##         rmsea.ci.lower.robust         rmsea.ci.upper.robust 
##                            NA                            NA 
##           rmsea.pvalue.robust                           rmr 
##                            NA                         0.203 
##                    rmr_nomean                          srmr 
##                         0.221                         0.221 
##                  srmr_bentler           srmr_bentler_nomean 
##                         0.203                         0.221 
##                          crmr                   crmr_nomean 
##                         0.221                         0.244 
##                    srmr_mplus             srmr_mplus_nomean 
##                            NA                            NA 
##                         cn_05                         cn_01 
##                        19.580                        22.393 
##                           gfi                          agfi 
##                         0.911                         0.772 
##                          pgfi                           mfi 
##                         0.354                         0.405
semPaths(Unfactor, intercepts = FALSE,
         edge.label.cex=1.5, 
         optimizeLatRes = TRUE, 
         groups = "lat",
         pastel = TRUE, 
         exoVar = FALSE, 
         sizeInt=5,
         edge.color ="black",
         esize = 6, 
         label.prop=2,
         sizeLat = 6,"std", 
         layout="tree2",
         rotation = 2)

#Especificación del modelo conceptual - Trifactorial
Tresfactores<-'A =~ ID5 + ID4 + ID6 + ID7 + ID9 + ID3 
B =~ ID2 + ID1 + ID4 + ID7
C =~ ID 8 + ID9 + ID10'


AFCtres <- cfa(Tresfactores,orthogonal=FALSE, data=df_afe, estimator="WLSMV",ordered =names(df_afe))
summary(AFCtres, fit.measures=TRUE)
## lavaan 0.6-12 ended normally after 34 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        61
## 
##   Number of observations                            41
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                                27.307      41.374
##   Degrees of freedom                                29          29
##   P-value (Chi-square)                           0.555       0.064
##   Scaling correction factor                                  0.865
##   Shift parameter                                            9.790
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                               705.910     418.854
##   Degrees of freedom                                45          45
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.768
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000       0.967
##   Tucker-Lewis Index (TLI)                       1.004       0.949
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000       0.103
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.112       0.170
##   P-value RMSEA <= 0.05                          0.688       0.130
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                        NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.108       0.108
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   A =~                                                
##     ID5               1.000                           
##     ID4               0.751    0.117    6.401    0.000
##     ID6               0.585    0.133    4.389    0.000
##     ID7               0.379    0.129    2.944    0.003
##     ID9               0.507    0.169    2.995    0.003
##     ID3               0.428    0.104    4.108    0.000
##   B =~                                                
##     ID2               1.000                           
##     ID1               1.013    0.237    4.269    0.000
##     ID4               0.518    0.132    3.931    0.000
##     ID7               0.631    0.142    4.450    0.000
##   C =~                                                
##     ID8               1.000                           
##     ID9               0.033    0.296    0.111    0.912
##     ID10              1.609    0.710    2.268    0.023
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   A ~~                                                
##     B                 0.047    0.178    0.264    0.792
##     C                 0.281    0.128    2.193    0.028
##   B ~~                                                
##     C                 0.206    0.119    1.735    0.083
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID5               0.000                           
##    .ID4               0.000                           
##    .ID6               0.000                           
##    .ID7               0.000                           
##    .ID9               0.000                           
##    .ID3               0.000                           
##    .ID2               0.000                           
##    .ID1               0.000                           
##    .ID8               0.000                           
##    .ID10              0.000                           
##     A                 0.000                           
##     B                 0.000                           
##     C                 0.000                           
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID5|t1           -1.971    0.426   -4.625    0.000
##     ID5|t2           -1.052    0.244   -4.318    0.000
##     ID5|t3           -0.216    0.200   -1.079    0.281
##     ID5|t4            0.343    0.202    1.693    0.090
##     ID4|t1           -1.052    0.244   -4.318    0.000
##     ID4|t2           -0.092    0.198   -0.463    0.644
##     ID4|t3            0.279    0.201    1.387    0.166
##     ID6|t1           -1.453    0.296   -4.900    0.000
##     ID6|t2           -1.052    0.244   -4.318    0.000
##     ID6|t3           -0.694    0.217   -3.204    0.001
##     ID6|t4           -0.092    0.198   -0.463    0.644
##     ID6|t5            0.408    0.204    1.999    0.046
##     ID7|t1           -1.971    0.426   -4.625    0.000
##     ID7|t2           -1.657    0.337   -4.919    0.000
##     ID7|t3           -0.694    0.217   -3.204    0.001
##     ID7|t4            0.153    0.199    0.771    0.441
##     ID7|t5            0.694    0.217    3.204    0.001
##     ID9|t1           -0.618    0.213   -2.907    0.004
##     ID9|t2           -0.343    0.202   -1.693    0.090
##     ID9|t3           -0.092    0.198   -0.463    0.644
##     ID9|t4            0.618    0.213    2.907    0.004
##     ID9|t5            1.165    0.256    4.557    0.000
##     ID3|t1           -1.971    0.426   -4.625    0.000
##     ID3|t2           -1.052    0.244   -4.318    0.000
##     ID3|t3           -0.546    0.209   -2.607    0.009
##     ID3|t4           -0.031    0.198   -0.154    0.877
##     ID3|t5            0.408    0.204    1.999    0.046
##     ID3|t6            0.694    0.217    3.204    0.001
##     ID2|t1           -0.859    0.227   -3.782    0.000
##     ID2|t2           -0.408    0.204   -1.999    0.046
##     ID1|t1           -1.657    0.337   -4.919    0.000
##     ID1|t2           -1.052    0.244   -4.318    0.000
##     ID1|t3           -0.476    0.207   -2.304    0.021
##     ID8|t1           -1.657    0.337   -4.919    0.000
##     ID8|t2           -1.453    0.296   -4.900    0.000
##     ID8|t3           -1.052    0.244   -4.318    0.000
##     ID8|t4           -0.774    0.221   -3.497    0.000
##     ID8|t5           -0.408    0.204   -1.999    0.046
##     ID8|t6            0.153    0.199    0.771    0.441
##     ID10|t1          -1.453    0.296   -4.900    0.000
##     ID10|t2          -1.052    0.244   -4.318    0.000
##     ID10|t3          -0.774    0.221   -3.497    0.000
##     ID10|t4          -0.476    0.207   -2.304    0.021
##     ID10|t5          -0.153    0.199   -0.771    0.441
##     ID10|t6           0.343    0.202    1.693    0.090
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID5              -0.020                           
##    .ID4               0.153                           
##    .ID6               0.651                           
##    .ID7               0.482                           
##    .ID9               0.728                           
##    .ID3               0.813                           
##    .ID2               0.125                           
##    .ID1               0.101                           
##    .ID8               0.601                           
##    .ID10             -0.034                           
##     A                 1.020    0.164    6.215    0.000
##     B                 0.875    0.216    4.053    0.000
##     C                 0.399    0.209    1.912    0.056
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID5               1.000                           
##     ID4               1.000                           
##     ID6               1.000                           
##     ID7               1.000                           
##     ID9               1.000                           
##     ID3               1.000                           
##     ID2               1.000                           
##     ID1               1.000                           
##     ID8               1.000                           
##     ID10              1.000
fitMeasures(AFCtres)
##                          npar                          fmin 
##                        61.000                         0.333 
##                         chisq                            df 
##                        27.307                        29.000 
##                        pvalue                  chisq.scaled 
##                         0.555                        41.374 
##                     df.scaled                 pvalue.scaled 
##                        29.000                         0.064 
##          chisq.scaling.factor                baseline.chisq 
##                         0.865                       705.910 
##                   baseline.df               baseline.pvalue 
##                        45.000                         0.000 
##         baseline.chisq.scaled            baseline.df.scaled 
##                       418.854                        45.000 
##        baseline.pvalue.scaled baseline.chisq.scaling.factor 
##                         0.000                         1.768 
##                           cfi                           tli 
##                         1.000                         1.004 
##                          nnfi                           rfi 
##                         1.004                         0.940 
##                           nfi                          pnfi 
##                         0.961                         0.620 
##                           ifi                           rni 
##                         1.003                         1.003 
##                    cfi.scaled                    tli.scaled 
##                         0.967                         0.949 
##                    cfi.robust                    tli.robust 
##                            NA                            NA 
##                   nnfi.scaled                   nnfi.robust 
##                         0.949                            NA 
##                    rfi.scaled                    nfi.scaled 
##                         0.847                         0.901 
##                    ifi.scaled                    rni.scaled 
##                         0.968                         0.967 
##                    rni.robust                         rmsea 
##                            NA                         0.000 
##                rmsea.ci.lower                rmsea.ci.upper 
##                         0.000                         0.112 
##                  rmsea.pvalue                  rmsea.scaled 
##                         0.688                         0.103 
##         rmsea.ci.lower.scaled         rmsea.ci.upper.scaled 
##                         0.000                         0.170 
##           rmsea.pvalue.scaled                  rmsea.robust 
##                         0.130                            NA 
##         rmsea.ci.lower.robust         rmsea.ci.upper.robust 
##                         0.000                            NA 
##           rmsea.pvalue.robust                           rmr 
##                            NA                         0.099 
##                    rmr_nomean                          srmr 
##                         0.108                         0.108 
##                  srmr_bentler           srmr_bentler_nomean 
##                         0.099                         0.108 
##                          crmr                   crmr_nomean 
##                         0.108                         0.119 
##                    srmr_mplus             srmr_mplus_nomean 
##                            NA                            NA 
##                         cn_05                         cn_01 
##                        63.339                        73.638 
##                           gfi                          agfi 
##                         0.977                         0.930 
##                          pgfi                           mfi 
##                         0.315                         1.021
semPaths(AFCtres, intercepts = FALSE,
         edge.label.cex=1.5, 
         optimizeLatRes = TRUE, 
         groups = "lat",
         pastel = TRUE, 
         exoVar = FALSE, 
         sizeInt=1,
         edge.color ="black",
         esize = 1, 
         label.prop=1,
         sizeLat = 6,
         "std", 
         layout="tree2",
         rotation = 2,
         weighted = FALSE)

Se realizaron dos modelos de ecuaciones estructurales. Una forma unifactorial y una trifactorial. Se utilizó una rotación Equamax con un método de facorización de máxima verosimilitud. En el análisis trifactorial se obtuvo un Chi-cuadrado de 41.374, con 29 grados de libertd, CFI: 0.967, NFI: 0.961, RMSEA: 0.103. Se muestra el modelo hipotetizado en la figura.

FA3 <- fa(df_afe,nfactors = 3,rotate = "equamax",fm="ml")
print(FA3)
## Factor Analysis using method =  ml
## Call: fa(r = df_afe, nfactors = 3, rotate = "equamax", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
##       ML2   ML3   ML1   h2    u2 com
## ID1  0.07  0.81 -0.02 0.66 0.335 1.0
## ID2  0.06  0.91  0.14 0.84 0.157 1.1
## ID3  0.42  0.10 -0.08 0.19 0.810 1.2
## ID4  0.76  0.37  0.08 0.72 0.275 1.5
## ID5  0.92 -0.03  0.15 0.86 0.137 1.1
## ID6  0.50 -0.15  0.09 0.29 0.713 1.3
## ID7  0.55  0.38  0.06 0.45 0.549 1.8
## ID8  0.05  0.05  0.99 1.00 0.005 1.0
## ID9  0.40 -0.27  0.34 0.34 0.655 2.7
## ID10 0.30  0.25  0.56 0.46 0.536 2.0
## 
##                        ML2  ML3  ML1
## SS loadings           2.41 1.93 1.48
## Proportion Var        0.24 0.19 0.15
## Cumulative Var        0.24 0.43 0.58
## Proportion Explained  0.41 0.33 0.25
## Cumulative Proportion 0.41 0.75 1.00
## 
## Mean item complexity =  1.5
## Test of the hypothesis that 3 factors are sufficient.
## 
## The degrees of freedom for the null model are  45  and the objective function was  4.53 with Chi Square of  162.26
## The degrees of freedom for the model are 18  and the objective function was  0.66 
## 
## The root mean square of the residuals (RMSR) is  0.06 
## The df corrected root mean square of the residuals is  0.1 
## 
## The harmonic number of observations is  41 with the empirical chi square  15.56  with prob <  0.62 
## The total number of observations was  41  with Likelihood Chi Square =  22.49  with prob <  0.21 
## 
## Tucker Lewis Index of factoring reliability =  0.896
## RMSEA index =  0.074  and the 90 % confidence intervals are  0 0.17
## BIC =  -44.35
## Fit based upon off diagonal values = 0.96
## Measures of factor score adequacy             
##                                                    ML2  ML3  ML1
## Correlation of (regression) scores with factors   0.95 0.94 1.00
## Multiple R square of scores with factors          0.90 0.89 0.99
## Minimum correlation of possible factor scores     0.81 0.78 0.99
fa.plot(FA3,cut=0.3,labels=names(df_afe))

print(FA3$loadings,cutoff = 0.3)
## 
## Loadings:
##      ML2    ML3    ML1   
## ID1          0.812       
## ID2          0.906       
## ID3   0.416              
## ID4   0.763  0.369       
## ID5   0.916              
## ID6   0.504              
## ID7   0.553  0.376       
## ID8                 0.995
## ID9   0.396         0.342
## ID10  0.300         0.558
## 
##                  ML2   ML3   ML1
## SS loadings    2.413 1.928 1.485
## Proportion Var 0.241 0.193 0.148
## Cumulative Var 0.241 0.434 0.583
fa.diagram(FA3)

SUBGRUPO IDENTIDAD DEPORTIVA (Solo items Identidad Deportiva)

Se extrajo de la base de datos aquellas columnas correspondientes a la Escala de identidad deportiva. A partir de dicha base, se llevó a cabo el cálculo del coeficiente alfa de Cronbach el cual arrojó un valor de 0.6599. Dicho valor se encuentra dentro del rango propuesto por Tavakol & Dennick.

# Esto es el análisis sacando los 3 ítems que no corresponden a Ident Deport según Mosqueda Ortiz
df_afe_id<-df[c(40:44, 47, 49)]

alpha(df_afe_id) # 0.6598875
## [1] 0.6598875

Con el objetivo de buscar las correlaciones entre las variables de la Escala, se utilizó el método de correlación de Spearman debido a su mayor robustez. De la aplicación de dicho test, se encontraron correlaciones positivas siendo las de mayor magnitud la correlación entre el ítem 4 y 5 (0.75), entre el 1 y el 2 (0.74) y entre el 8 y el 9 (0.54). El resto de los valores se muestran en la siguiente matriz.

# Esto es el análisis sacando los 3 ítems que no corresponden a Ident Deport según Mosqueda Ortiz
correlacion_id<-cor2(df_afe_id, method ="spearman")
##    xi                                       
## xi  1.00                                    
##     0.74  1.00                              
##     0.02  0.22  1.00                        
##     0.36  0.40  0.33  1.00                  
##     0.09  0.14  0.37  0.75  1.00            
##     0.08  0.22  0.00  0.21  0.26  1.00      
##     0.26  0.38 -0.01  0.46  0.48  0.54  1.00
colnames(correlacion_id)<-c("ID1","ID2","ID3","ID4","ID5", "ID8",  "ID10")                    
rownames(correlacion_id)<-c("ID1","ID2","ID3","ID4","ID5", "ID8", "ID10")                    
corrplot.mixed(correlacion_id, upper  = "ellipse" , tl.pos = "lt")

Llevamos a cabo la prueba de adecuación de la muestra mediante el test de KMO y de esfericidad de Bartlett. De dichos test encontramos que la adecuación muestral fueron satisfactorios, con un índice global de KMO de 0.55, con todos los índices individuales ubicados entre 0.40 y 0.66. Por otro lado, la prueba de esfericidad de Bartlett resultó estadísticamente significativo con p-valor < 0.001.

KMO_id<-KMO(cor(df_afe_id))
Bartlett_id<-cortest.bartlett(cor(df_afe_id), n=nrow(df_afe_id))

KMO_id
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = cor(df_afe_id))
## Overall MSA =  0.55
## MSA for each item = 
##  ID1  ID2  ID3  ID4  ID5  ID8 ID10 
## 0.51 0.50 0.40 0.66 0.54 0.60 0.59
Bartlett_id
## $chisq
## [1] 108.2131
## 
## $p.value
## [1] 9.891136e-14
## 
## $df
## [1] 21
#Calculo de determinante, donde valores cercanos a cero indican presencia de correlación entre las variables
#det(cor(df_afe))

Análisis Factorial. Por medio de esta estrategia, se lleva a cabo la extracción de factores. El Análisis Factorial intenta reducir la cantidad de dimensiones disponibles sin perder información (o perdiendo la menor cantidad de información disponible) por lo cual, la cantidad máxima de factores va a ser igual a la cantidad de ítems que tengamos. En el gráfico siguiente se puede observar cual es el número de factores más adecuado según la mayoría de los métodos empleados.

nfactoresAF<-n_factors(
  df_afe_id,
  type = "FA",
  rotation = "equamax",
  algorithm = "default",
  package = c("nFactors", "psych"),
  cor = NULL,
  safe = TRUE,
  n_max = NULL)
plot(nfactoresAF)

nfactoresAF
as.data.frame(nfactoresAF)
summary(nfactoresAF)

El análisis factorial llevado a cabo mostró una estructura de 3 factores que en suma explican el 67% de la varianza total, con una explicación del 24% por parte de primer factor. La siguiente salida muestra los resultados del análisis factorial exploratorio con los factores y las variables que lo componen según el valor de correlación en cada una.

afe_id<-fa(df_afe_id,nfactors = 3,fm = "ml",rotate ="equamax",cor = "cor") 

print(afe_id,digits = 2,cut = .30,sort=TRUE)
## Factor Analysis using method =  ml
## Call: fa(r = df_afe_id, nfactors = 3, rotate = "equamax", fm = "ml", 
##     cor = "cor")
## Standardized loadings (pattern matrix) based upon correlation matrix
##      item  ML1   ML3   ML2   h2    u2 com
## ID5     5 0.98             1.00 0.005 1.1
## ID4     4 0.70  0.35       0.65 0.355 1.7
## ID3     3 0.43             0.25 0.754 1.7
## ID2     2       0.93       0.91 0.088 1.1
## ID1     1       0.78       0.61 0.387 1.0
## ID10    7             0.97 1.00 0.005 1.1
## ID8     6             0.58 0.34 0.657 1.1
## 
##                        ML1  ML3  ML2
## SS loadings           1.68 1.67 1.40
## Proportion Var        0.24 0.24 0.20
## Cumulative Var        0.24 0.48 0.68
## Proportion Explained  0.35 0.35 0.30
## Cumulative Proportion 0.35 0.70 1.00
## 
## Mean item complexity =  1.3
## Test of the hypothesis that 3 factors are sufficient.
## 
## The degrees of freedom for the null model are  21  and the objective function was  2.94 with Chi Square of  108.21
## The degrees of freedom for the model are 3  and the objective function was  0.17 
## 
## The root mean square of the residuals (RMSR) is  0.04 
## The df corrected root mean square of the residuals is  0.11 
## 
## The harmonic number of observations is  41 with the empirical chi square  3.07  with prob <  0.38 
## The total number of observations was  41  with Likelihood Chi Square =  5.89  with prob <  0.12 
## 
## Tucker Lewis Index of factoring reliability =  0.751
## RMSEA index =  0.151  and the 90 % confidence intervals are  0 0.341
## BIC =  -5.25
## Fit based upon off diagonal values = 0.98
## Measures of factor score adequacy             
##                                                    ML1  ML3  ML2
## Correlation of (regression) scores with factors   1.00 0.96 1.00
## Multiple R square of scores with factors          0.99 0.92 0.99
## Minimum correlation of possible factor scores     0.99 0.84 0.98

Analisis factorial confirmatorio

Análisis de un factor, es decir, con todas las variables ubicadas bajo el mismo factor.

#Especificación del modelo conceptual - Unifactorial
Unfactor_id<-'A =~ ID1 + ID2 + ID3 + ID4 + ID5 + ID8 + ID10'


Unfactor_id <- cfa(Unfactor_id,orthogonal=FALSE, data=df_afe_id, estimator="WLSMV",ordered =names(df_afe_id))
summary(Unfactor_id, fit.measures=TRUE)
## lavaan 0.6-12 ended normally after 20 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        37
## 
##   Number of observations                            41
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                                57.777      60.206
##   Degrees of freedom                                14          14
##   P-value (Chi-square)                           0.000       0.000
##   Scaling correction factor                                  1.038
##   Shift parameter                                            4.540
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                               501.984     332.133
##   Degrees of freedom                                21          21
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.546
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.909       0.851
##   Tucker-Lewis Index (TLI)                       0.863       0.777
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.280       0.287
##   90 Percent confidence interval - lower         0.207       0.215
##   90 Percent confidence interval - upper         0.356       0.364
##   P-value RMSEA <= 0.05                          0.000       0.000
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                        NA
##   90 Percent confidence interval - upper                        NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.222       0.222
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)
##   A =~                                                
##     ID1               1.000                           
##     ID2               1.093    0.215    5.094    0.000
##     ID3               0.408    0.134    3.047    0.002
##     ID4               1.066    0.133    7.995    0.000
##     ID5               0.955    0.125    7.625    0.000
##     ID8               0.583    0.169    3.452    0.001
##     ID10              0.802    0.152    5.293    0.000
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.000                           
##    .ID2               0.000                           
##    .ID3               0.000                           
##    .ID4               0.000                           
##    .ID5               0.000                           
##    .ID8               0.000                           
##    .ID10              0.000                           
##     A                 0.000                           
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1|t1           -1.657    0.337   -4.919    0.000
##     ID1|t2           -1.052    0.244   -4.318    0.000
##     ID1|t3           -0.476    0.207   -2.304    0.021
##     ID2|t1           -0.859    0.227   -3.782    0.000
##     ID2|t2           -0.408    0.204   -1.999    0.046
##     ID3|t1           -1.971    0.426   -4.625    0.000
##     ID3|t2           -1.052    0.244   -4.318    0.000
##     ID3|t3           -0.546    0.209   -2.607    0.009
##     ID3|t4           -0.031    0.198   -0.154    0.877
##     ID3|t5            0.408    0.204    1.999    0.046
##     ID3|t6            0.694    0.217    3.204    0.001
##     ID4|t1           -1.052    0.244   -4.318    0.000
##     ID4|t2           -0.092    0.198   -0.463    0.644
##     ID4|t3            0.279    0.201    1.387    0.166
##     ID5|t1           -1.971    0.426   -4.625    0.000
##     ID5|t2           -1.052    0.244   -4.318    0.000
##     ID5|t3           -0.216    0.200   -1.079    0.281
##     ID5|t4            0.343    0.202    1.693    0.090
##     ID8|t1           -1.657    0.337   -4.919    0.000
##     ID8|t2           -1.453    0.296   -4.900    0.000
##     ID8|t3           -1.052    0.244   -4.318    0.000
##     ID8|t4           -0.774    0.221   -3.497    0.000
##     ID8|t5           -0.408    0.204   -1.999    0.046
##     ID8|t6            0.153    0.199    0.771    0.441
##     ID10|t1          -1.453    0.296   -4.900    0.000
##     ID10|t2          -1.052    0.244   -4.318    0.000
##     ID10|t3          -0.774    0.221   -3.497    0.000
##     ID10|t4          -0.476    0.207   -2.304    0.021
##     ID10|t5          -0.153    0.199   -0.771    0.441
##     ID10|t6           0.343    0.202    1.693    0.090
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.310                           
##    .ID2               0.176                           
##    .ID3               0.885                           
##    .ID4               0.216                           
##    .ID5               0.371                           
##    .ID8               0.766                           
##    .ID10              0.556                           
##     A                 0.690    0.153    4.496    0.000
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1               1.000                           
##     ID2               1.000                           
##     ID3               1.000                           
##     ID4               1.000                           
##     ID5               1.000                           
##     ID8               1.000                           
##     ID10              1.000
fitMeasures(Unfactor_id)
##                          npar                          fmin 
##                        37.000                         0.705 
##                         chisq                            df 
##                        57.777                        14.000 
##                        pvalue                  chisq.scaled 
##                         0.000                        60.206 
##                     df.scaled                 pvalue.scaled 
##                        14.000                         0.000 
##          chisq.scaling.factor                baseline.chisq 
##                         1.038                       501.984 
##                   baseline.df               baseline.pvalue 
##                        21.000                         0.000 
##         baseline.chisq.scaled            baseline.df.scaled 
##                       332.133                        21.000 
##        baseline.pvalue.scaled baseline.chisq.scaling.factor 
##                         0.000                         1.546 
##                           cfi                           tli 
##                         0.909                         0.863 
##                          nnfi                           rfi 
##                         0.863                         0.827 
##                           nfi                          pnfi 
##                         0.885                         0.590 
##                           ifi                           rni 
##                         0.910                         0.909 
##                    cfi.scaled                    tli.scaled 
##                         0.851                         0.777 
##                    cfi.robust                    tli.robust 
##                            NA                            NA 
##                   nnfi.scaled                   nnfi.robust 
##                         0.777                            NA 
##                    rfi.scaled                    nfi.scaled 
##                         0.728                         0.819 
##                    ifi.scaled                    rni.scaled 
##                         0.855                         0.851 
##                    rni.robust                         rmsea 
##                            NA                         0.280 
##                rmsea.ci.lower                rmsea.ci.upper 
##                         0.207                         0.356 
##                  rmsea.pvalue                  rmsea.scaled 
##                         0.000                         0.287 
##         rmsea.ci.lower.scaled         rmsea.ci.upper.scaled 
##                         0.215                         0.364 
##           rmsea.pvalue.scaled                  rmsea.robust 
##                         0.000                            NA 
##         rmsea.ci.lower.robust         rmsea.ci.upper.robust 
##                            NA                            NA 
##           rmsea.pvalue.robust                           rmr 
##                            NA                         0.199 
##                    rmr_nomean                          srmr 
##                         0.222                         0.222 
##                  srmr_bentler           srmr_bentler_nomean 
##                         0.199                         0.222 
##                          crmr                   crmr_nomean 
##                         0.222                         0.257 
##                    srmr_mplus             srmr_mplus_nomean 
##                            NA                            NA 
##                         cn_05                         cn_01 
##                        17.397                        21.175 
##                           gfi                          agfi 
##                         0.931                         0.750 
##                          pgfi                           mfi 
##                         0.256                         0.579
semPaths(Unfactor_id, intercepts = FALSE,
         edge.label.cex=1.5, 
         optimizeLatRes = TRUE, 
         groups = "lat",
         pastel = TRUE, 
         exoVar = FALSE, 
         sizeInt=1,
         edge.color ="black",
         esize = 1, 
         label.prop=1,
         sizeLat = 6,
         "std", 
         layout="tree2",
         rotation = 2,
         weighted = FALSE)

#Especificación del modelo conceptual - Trifactorial
Tresfactores_id<-'Identidad Social =~ ID1 + ID2 
Exclusividad =~ ID3 + ID4 + ID5
Afectividad negativa =~ ID 8 + ID10'


AFCtres_id <- cfa(Tresfactores_id,orthogonal=FALSE, data=df_afe_id, estimator="WLSMV",ordered =names(df_afe_id))
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING:
##     The variance-covariance matrix of the estimated parameters (vcov)
##     does not appear to be positive definite! The smallest eigenvalue
##     (= 2.169638e-17) is close to zero. This may be a symptom that the
##     model is not identified.
## Warning in lav_object_post_check(object): lavaan WARNING: some estimated ov
## variances are negative
summary(AFCtres_id, fit.measures=TRUE)
## lavaan 0.6-12 ended normally after 39 iterations
## 
##   Estimator                                       DWLS
##   Optimization method                           NLMINB
##   Number of model parameters                        40
## 
##   Number of observations                            41
## 
## Model Test User Model:
##                                               Standard      Robust
##   Test Statistic                                 7.859      13.882
##   Degrees of freedom                                11          11
##   P-value (Chi-square)                           0.726       0.240
##   Scaling correction factor                                  0.726
##   Shift parameter                                            3.058
##     simple second-order correction                                
## 
## Model Test Baseline Model:
## 
##   Test statistic                               501.984     332.133
##   Degrees of freedom                                21          21
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.546
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000       0.991
##   Tucker-Lewis Index (TLI)                       1.012       0.982
##                                                                   
##   Robust Comparative Fit Index (CFI)                            NA
##   Robust Tucker-Lewis Index (TLI)                               NA
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000       0.081
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.124       0.194
##   P-value RMSEA <= 0.05                          0.788       0.319
##                                                                   
##   Robust RMSEA                                                  NA
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                        NA
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.087       0.087
## 
## Parameter Estimates:
## 
##   Standard errors                           Robust.sem
##   Information                                 Expected
##   Information saturated (h1) model        Unstructured
## 
## Latent Variables:
##                          Estimate  Std.Err  z-value  P(>|z|)
##   IdentidadSocial =~                                        
##     ID1                     1.000                           
##     ID2                     1.447    0.612    2.366    0.018
##   Exclusividad =~                                           
##     ID3                     1.000                           
##     ID4                     2.380    0.610    3.903    0.000
##     ID5                     2.134    0.576    3.708    0.000
##   Afectividadnegativa =~                                    
##     ID8                     1.000                           
##     ID10                    2.078    1.256    1.655    0.098
## 
## Covariances:
##                      Estimate  Std.Err  z-value  P(>|z|)
##   IdentidadSocial ~~                                    
##     Exclusividad        0.116    0.081    1.427    0.154
##     Afectividdngtv      0.151    0.109    1.389    0.165
##   Exclusividad ~~                                       
##     Afectividdngtv      0.103    0.071    1.457    0.145
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.000                           
##    .ID2               0.000                           
##    .ID3               0.000                           
##    .ID4               0.000                           
##    .ID5               0.000                           
##    .ID8               0.000                           
##    .ID10              0.000                           
##     IdentidadSocil    0.000                           
##     Exclusividad      0.000                           
##     Afectividdngtv    0.000                           
## 
## Thresholds:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1|t1           -1.657    0.337   -4.919    0.000
##     ID1|t2           -1.052    0.244   -4.318    0.000
##     ID1|t3           -0.476    0.207   -2.304    0.021
##     ID2|t1           -0.859    0.227   -3.782    0.000
##     ID2|t2           -0.408    0.204   -1.999    0.046
##     ID3|t1           -1.971    0.426   -4.625    0.000
##     ID3|t2           -1.052    0.244   -4.318    0.000
##     ID3|t3           -0.546    0.209   -2.607    0.009
##     ID3|t4           -0.031    0.198   -0.154    0.877
##     ID3|t5            0.408    0.204    1.999    0.046
##     ID3|t6            0.694    0.217    3.204    0.001
##     ID4|t1           -1.052    0.244   -4.318    0.000
##     ID4|t2           -0.092    0.198   -0.463    0.644
##     ID4|t3            0.279    0.201    1.387    0.166
##     ID5|t1           -1.971    0.426   -4.625    0.000
##     ID5|t2           -1.052    0.244   -4.318    0.000
##     ID5|t3           -0.216    0.200   -1.079    0.281
##     ID5|t4            0.343    0.202    1.693    0.090
##     ID8|t1           -1.657    0.337   -4.919    0.000
##     ID8|t2           -1.453    0.296   -4.900    0.000
##     ID8|t3           -1.052    0.244   -4.318    0.000
##     ID8|t4           -0.774    0.221   -3.497    0.000
##     ID8|t5           -0.408    0.204   -1.999    0.046
##     ID8|t6            0.153    0.199    0.771    0.441
##     ID10|t1          -1.453    0.296   -4.900    0.000
##     ID10|t2          -1.052    0.244   -4.318    0.000
##     ID10|t3          -0.774    0.221   -3.497    0.000
##     ID10|t4          -0.476    0.207   -2.304    0.021
##     ID10|t5          -0.153    0.199   -0.771    0.441
##     ID10|t6           0.343    0.202    1.693    0.090
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)
##    .ID1               0.387                           
##    .ID2              -0.283                           
##    .ID3               0.839                           
##    .ID4               0.089                           
##    .ID5               0.268                           
##    .ID8               0.692                           
##    .ID10             -0.330                           
##     IdentidadSocil    0.613    0.272    2.257    0.024
##     Exclusividad      0.161    0.081    1.973    0.048
##     Afectividdngtv    0.308    0.212    1.452    0.146
## 
## Scales y*:
##                    Estimate  Std.Err  z-value  P(>|z|)
##     ID1               1.000                           
##     ID2               1.000                           
##     ID3               1.000                           
##     ID4               1.000                           
##     ID5               1.000                           
##     ID8               1.000                           
##     ID10              1.000
fitMeasures(AFCtres_id)
##                          npar                          fmin 
##                        40.000                         0.096 
##                         chisq                            df 
##                         7.859                        11.000 
##                        pvalue                  chisq.scaled 
##                         0.726                        13.882 
##                     df.scaled                 pvalue.scaled 
##                        11.000                         0.240 
##          chisq.scaling.factor                baseline.chisq 
##                         0.726                       501.984 
##                   baseline.df               baseline.pvalue 
##                        21.000                         0.000 
##         baseline.chisq.scaled            baseline.df.scaled 
##                       332.133                        21.000 
##        baseline.pvalue.scaled baseline.chisq.scaling.factor 
##                         0.000                         1.546 
##                           cfi                           tli 
##                         1.000                         1.012 
##                          nnfi                           rfi 
##                         1.012                         0.970 
##                           nfi                          pnfi 
##                         0.984                         0.516 
##                           ifi                           rni 
##                         1.006                         1.007 
##                    cfi.scaled                    tli.scaled 
##                         0.991                         0.982 
##                    cfi.robust                    tli.robust 
##                            NA                            NA 
##                   nnfi.scaled                   nnfi.robust 
##                         0.982                            NA 
##                    rfi.scaled                    nfi.scaled 
##                         0.920                         0.958 
##                    ifi.scaled                    rni.scaled 
##                         0.991                         0.991 
##                    rni.robust                         rmsea 
##                            NA                         0.000 
##                rmsea.ci.lower                rmsea.ci.upper 
##                         0.000                         0.124 
##                  rmsea.pvalue                  rmsea.scaled 
##                         0.788                         0.081 
##         rmsea.ci.lower.scaled         rmsea.ci.upper.scaled 
##                         0.000                         0.194 
##           rmsea.pvalue.scaled                  rmsea.robust 
##                         0.319                            NA 
##         rmsea.ci.lower.robust         rmsea.ci.upper.robust 
##                         0.000                            NA 
##           rmsea.pvalue.robust                           rmr 
##                            NA                         0.078 
##                    rmr_nomean                          srmr 
##                         0.087                         0.087 
##                  srmr_bentler           srmr_bentler_nomean 
##                         0.078                         0.087 
##                          crmr                   crmr_nomean 
##                         0.087                         0.101 
##                    srmr_mplus             srmr_mplus_nomean 
##                            NA                            NA 
##                         cn_05                         cn_01 
##                       101.140                       126.841 
##                           gfi                          agfi 
##                         0.991                         0.957 
##                          pgfi                           mfi 
##                         0.214                         1.040
semPaths(AFCtres_id, 
         intercepts = FALSE,
         edge.label.cex=1.5, 
         optimizeLatRes = TRUE, 
         groups = "lat",
         pastel = TRUE, 
         exoVar = FALSE, 
         sizeInt=1,
         edge.color ="black",
         esize = 1, 
         label.prop=1,
         sizeLat = 6,
         "std", 
         layout="tree2",
         rotation = 2,
         weighted = FALSE)

El factor latente Identidad Social queda explicado por las dos variables ID1 y 2. El factor latente Exclusividad queda explicado por las dos variables ID5, 4 y 3. El factor latente Afectividad negativa queda explicado por las dos variables ID8 y 10. Lineas enteras de la variable latente explica de forma más fuerte la variable.

FA3_id <- fa(df_afe_id,nfactors = 3,rotate = "equamax",fm="ml")
print(FA3_id)
## Factor Analysis using method =  ml
## Call: fa(r = df_afe_id, nfactors = 3, rotate = "equamax", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
##       ML1   ML3   ML2   h2    u2 com
## ID1  0.05  0.78  0.02 0.61 0.387 1.0
## ID2  0.05  0.93  0.19 0.91 0.088 1.1
## ID3  0.43  0.19 -0.16 0.25 0.754 1.7
## ID4  0.70  0.35  0.20 0.65 0.355 1.7
## ID5  0.98 -0.04  0.18 1.00 0.005 1.1
## ID8  0.09  0.06  0.58 0.34 0.657 1.1
## ID10 0.20  0.15  0.97 1.00 0.005 1.1
## 
##                        ML1  ML3  ML2
## SS loadings           1.68 1.67 1.40
## Proportion Var        0.24 0.24 0.20
## Cumulative Var        0.24 0.48 0.68
## Proportion Explained  0.35 0.35 0.30
## Cumulative Proportion 0.35 0.70 1.00
## 
## Mean item complexity =  1.3
## Test of the hypothesis that 3 factors are sufficient.
## 
## The degrees of freedom for the null model are  21  and the objective function was  2.94 with Chi Square of  108.21
## The degrees of freedom for the model are 3  and the objective function was  0.17 
## 
## The root mean square of the residuals (RMSR) is  0.04 
## The df corrected root mean square of the residuals is  0.11 
## 
## The harmonic number of observations is  41 with the empirical chi square  3.07  with prob <  0.38 
## The total number of observations was  41  with Likelihood Chi Square =  5.89  with prob <  0.12 
## 
## Tucker Lewis Index of factoring reliability =  0.751
## RMSEA index =  0.151  and the 90 % confidence intervals are  0 0.341
## BIC =  -5.25
## Fit based upon off diagonal values = 0.98
## Measures of factor score adequacy             
##                                                    ML1  ML3  ML2
## Correlation of (regression) scores with factors   1.00 0.96 1.00
## Multiple R square of scores with factors          0.99 0.92 0.99
## Minimum correlation of possible factor scores     0.99 0.84 0.98
fa.plot(FA3_id,cut=0.3,labels=names(df_afe))

print(FA3_id$loadings,cutoff = 0.3)
## 
## Loadings:
##      ML1    ML3    ML2   
## ID1          0.780       
## ID2          0.934       
## ID3   0.426              
## ID4   0.695  0.348       
## ID5   0.980              
## ID8                 0.575
## ID10                0.966
## 
##                  ML1   ML3   ML2
## SS loadings    1.678 1.668 1.402
## Proportion Var 0.240 0.238 0.200
## Cumulative Var 0.240 0.478 0.678
fa.diagram(FA3_id)