#Packages
library(pacman); p_load(psych, lavaan, semPlot)
#Functions
CONGO <- function(F1, F2) {
PHI = sum(F1*F2) / sqrt(sum(F1^2)*sum(F2^2))
return(PHI)}
CRITR <- function(n, alpha = .05) {
df <- n - 2; CRITT <- qt(alpha/2, df, lower.tail = F)
CRITR <- sqrt((CRITT^2)/((CRITT^2) + df ))
return(CRITR)}
NP <- function(N, S = 2) {
NP = 1-pnorm(qnorm(1-(N^(-6/5))/S))
return(NP)}
#Model Fit Measures
FITM <- c("chisq", "df", "nPar", "cfi", "rmsea", "rmsea.ci.lower", "rmsea.ci.upper", "aic", "bic")
#Data
##Correlation Matrices
lowerKAUF <-'
1
0.5 1
0.66 0.48 1
0.28 0.31 0.16 1
0.2 0.29 0.19 0.1 1
0.27 0.16 0.25 0.21 0.19 1
0.24 0.22 0.09 0.08 0.18 0.18 1
0.3 0.32 0.24 0.21 0.25 0.21 0.28 1
0.36 0.33 0.33 0.26 0.28 0.26 0.42 0.63 1
0.13 0.05 0.13 0.01 0.03 0.13 0.02 0.01 0.08 1
0.04 0.17 0.05 0.18 0.24 0.21 0.21 0.27 0.33 0.66 1
0.03 0.1 0.01 0.1 0.18 0.23 0.19 0.25 0.16 0.76 0.76 1'
lowerKAUFPSY <- '
1
0.5 1
0.66 0.48 1
0.28 0.31 0.16 1
0.2 0.29 0.19 0.1 1
0.27 0.16 0.25 0.21 0.19 1'
lowerKAUFOTH <- '
1
0.28 1
0.42 0.63 1
0.02 0.01 0.08 1
0.21 0.27 0.33 0.66 1
0.19 0.25 0.16 0.76 0.76 1'
KAUF.cor = getCov(lowerKAUF, names = c("AbsPR", "VerbR", "MentRA", "ExpAL", "WM", "PS", "ARA", "PRA", "SERA", "ARS", "PRS", "SERS"))
KAUFPSY.cor = getCov(lowerKAUFPSY, names = c("AbsPR", "VerbR", "MentRA", "ExpAL", "WM", "PS"))
KAUFOTH.cor = getCov(lowerKAUFOTH, names = c("ARA", "PRA", "SERA", "ARS", "PRS", "SERS"))
##Sample Size
nKAUF <- 112
Speed signs were reversed, as is typical. An n of 112 was used even though correlations with explicit associative learning used an n of 111.
fa.parallel(KAUF.cor, n.obs = nKAUF)
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Parallel analysis suggests that the number of factors = 3 and the number of components = 2
fa.parallel(KAUF.cor[1:9,1:9], n.obs = nKAUF)
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Parallel analysis suggests that the number of factors = 2 and the number of components = 1
fa.parallel(KAUFPSY.cor, n.obs = nKAUF)
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Parallel analysis suggests that the number of factors = 1 and the number of components = 1
fa.parallel(KAUFOTH.cor, n.obs = nKAUF)
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs = np.obs, :
## The estimated weights for the factor scores are probably incorrect. Try a
## different factor score estimation method.
## Warning in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : An
## ultra-Heywood case was detected. Examine the results carefully
## Parallel analysis suggests that the number of factors = 2 and the number of components = 2
fa.parallel(KAUFOTH.cor[1:3,1:3], n.obs = nKAUF)
## Parallel analysis suggests that the number of factors = 1 and the number of components = 1
FATOT1 <- fa(KAUF.cor, n.obs = nKAUF, nfactors = 1)
FATOT2 <- fa(KAUF.cor, n.obs = nKAUF, nfactors = 2)
## Loading required namespace: GPArotation
FATOT3 <- fa(KAUF.cor, n.obs = nKAUF, nfactors = 3)
FATOTS1 <- fa(KAUF.cor[1:9,1:9], n.obs = nKAUF, nfactors = 1)
FATOTS2 <- fa(KAUF.cor[1:9,1:9], n.obs = nKAUF, nfactors = 2)
FATOTS3 <- fa(KAUF.cor[1:9,1:9], n.obs = nKAUF, nfactors = 3)
FAPSY1 <- fa(KAUFPSY.cor, n.obs = nKAUF, nfactors = 1)
FAPSY2 <- fa(KAUFPSY.cor, n.obs = nKAUF, nfactors = 2)
FAOTH1 <- fa(KAUFOTH.cor, n.obs = nKAUF, nfactors = 1)
FAOTH2 <- fa(KAUFOTH.cor, n.obs = nKAUF, nfactors = 2)
FAOTHS1 <- fa(KAUFOTH.cor[1:3,1:3], n.obs = nKAUF, nfactors = 1)
print(FATOT1$loadings)
##
## Loadings:
## MR1
## AbsPR 0.568
## VerbR 0.556
## MentRA 0.500
## ExpAL 0.359
## WM 0.400
## PS 0.416
## ARA 0.407
## PRA 0.588
## SERA 0.674
## ARS 0.362
## PRS 0.547
## SERS 0.476
##
## MR1
## SS loadings 2.966
## Proportion Var 0.247
print(FATOT2$loadings)
##
## Loadings:
## MR1 MR2
## AbsPR 0.735
## VerbR 0.645
## MentRA 0.643
## ExpAL 0.365
## WM 0.352 0.119
## PS 0.344 0.158
## ARA 0.358 0.118
## PRA 0.547 0.131
## SERA 0.646 0.125
## ARS 0.753
## PRS 0.100 0.835
## SERS 0.960
##
## MR1 MR2
## SS loadings 2.605 2.291
## Proportion Var 0.217 0.191
## Cumulative Var 0.217 0.408
print(FATOT3$loadings)
##
## Loadings:
## MR2 MR3 MR1
## AbsPR 0.820
## VerbR 0.514 0.239
## MentRA 0.795
## ExpAL 0.217 0.224
## WM 0.137 0.308
## PS 0.151 0.215 0.207
## ARA 0.440
## PRA 0.673
## SERA 0.139 0.754
## ARS 0.902 0.145 -0.252
## PRS 0.774 0.273
## SERS 0.893 0.119
##
## MR2 MR3 MR1
## SS loadings 2.246 1.744 1.619
## Proportion Var 0.187 0.145 0.135
## Cumulative Var 0.187 0.333 0.467
print(FATOTS1$loadings)
##
## Loadings:
## MR1
## AbsPR 0.701
## VerbR 0.633
## MentRA 0.610
## ExpAL 0.373
## WM 0.381
## PS 0.384
## ARA 0.391
## PRA 0.584
## SERA 0.684
##
## MR1
## SS loadings 2.659
## Proportion Var 0.295
print(FATOTS2$loadings)
##
## Loadings:
## MR1 MR2
## AbsPR 0.819
## VerbR 0.547 0.165
## MentRA 0.806
## ExpAL 0.232 0.185
## WM 0.144 0.285
## PS 0.212 0.220
## ARA 0.461
## PRA 0.687
## SERA 0.878
##
## MR1 MR2
## SS loadings 1.739 1.652
## Proportion Var 0.193 0.184
## Cumulative Var 0.193 0.377
print(FATOTS3$loadings)
##
## Loadings:
## MR3 MR1 MR2
## AbsPR 0.759
## VerbR 0.162 0.492 0.122
## MentRA 0.871
## ExpAL 1.001
## WM 0.297 0.141
## PS 0.207 0.179
## ARA 0.485
## PRA 0.686
## SERA 0.876
##
## MR3 MR1 MR2
## SS loadings 1.638 1.627 1.034
## Proportion Var 0.182 0.181 0.115
## Cumulative Var 0.182 0.363 0.478
print(FAPSY1$loadings)
##
## Loadings:
## MR1
## AbsPR 0.812
## VerbR 0.658
## MentRA 0.734
## ExpAL 0.353
## WM 0.317
## PS 0.346
##
## MR1
## SS loadings 1.976
## Proportion Var 0.329
print(FAPSY2$loadings)
##
## Loadings:
## MR1 MR2
## AbsPR 0.388 0.454
## VerbR 0.113 0.604
## MentRA 0.996
## ExpAL -0.178 0.570
## WM 0.370
## PS 0.352
##
## MR1 MR2
## SS loadings 1.188 1.158
## Proportion Var 0.198 0.193
## Cumulative Var 0.198 0.391
print(FAOTH1$loadings)
##
## Loadings:
## MR1
## ARA 0.271
## PRA 0.347
## SERA 0.370
## ARS 0.684
## PRS 0.887
## SERS 0.878
##
## MR1
## SS loadings 2.355
## Proportion Var 0.393
print(FAOTH2$loadings)
##
## Loadings:
## MR1 MR2
## ARA 0.437
## PRA 0.679
## SERA 0.911
## ARS 0.867 -0.161
## PRS 0.780 0.187
## SERS 0.915
##
## MR1 MR2
## SS loadings 2.200 1.543
## Proportion Var 0.367 0.257
## Cumulative Var 0.367 0.624
print(FAOTHS1$loadings)
##
## Loadings:
## MR1
## ARA 0.432
## PRA 0.648
## SERA 0.972
##
## MR1
## SS loadings 1.552
## Proportion Var 0.517
EFATOTALL <- c(0.568, 0.556, 0.500, 0.359, 0.400, 0.416, 0.407, 0.588, 0.674)
EFATOTALLS <- c(0.701, 0.633, 0.610, 0.373, 0.381, 0.384, 0.391, 0.584, 0.684)
cor(EFATOTALL, EFATOTALLS, method = "pearson"); cor(EFATOTALL, EFATOTALLS, method = "spearman"); CONGO(EFATOTALL, EFATOTALLS)
## [1] 0.918411
## [1] 0.85
## [1] 0.9948657
The g loadings are stable even if the speed indicators are excluded.
EFATOKAUF <- c(0.568, 0.556, 0.500, 0.359, 0.400, 0.416, 0.407, 0.588, 0.674, 0.362, 0.547, 0.476)
EFATOKAUFPsy <- c(0.568, 0.556, 0.500, 0.359, 0.400, 0.416); EFATOKAUFOTH <- c(0.407, 0.588, 0.674, 0.362, 0.547, 0.476)
EFASEKAUFO <- c(0.812, 0.658, 0.734, 0.353, 0.317, 0.346, 0.271, 0.347, 0.370, 0.684, 0.887, 0.878)
EFASEKAUFOPsy <- c(0.812, 0.658, 0.734, 0.353, 0.317, 0.346); EFASEKAUFOOTH <- c(0.271, 0.347, 0.370, 0.684, 0.887, 0.878)
cor(EFATOKAUF, EFASEKAUFO, method = "pearson"); cor(EFATOKAUF, EFASEKAUFO, method = "spearman"); CONGO(EFATOKAUF, EFASEKAUFO)
## [1] 0.2211624
## [1] 0.3006993
## [1] 0.9222471
cor(EFATOKAUFPsy, EFASEKAUFOPsy, method = "pearson"); cor(EFATOKAUFPsy, EFASEKAUFOPsy, method = "spearman"); CONGO(EFATOKAUFPsy, EFASEKAUFOPsy)
## [1] 0.921678
## [1] 0.7714286
## [1] 0.9767497
cor(EFATOKAUFOTH, EFASEKAUFOOTH, method = "pearson"); cor(EFATOKAUFOTH, EFASEKAUFOOTH, method = "spearman"); CONGO(EFATOKAUFOTH, EFASEKAUFOOTH)
## [1] -0.2155838
## [1] -0.02857143
## [1] 0.8768356
EFATOKAUF <- c(0.701, 0.633, 0.610, 0.373, 0.381, 0.384, 0.391, 0.584, 0.684)
EFATOKAUFPsy <- c(0.701, 0.633, 0.610, 0.373, 0.381, 0.384); EFATOKAUFOTH <- c(0.391, 0.584, 0.684)
EFASEKAUFO <- c(0.812, 0.658, 0.734, 0.353, 0.317, 0.346, 0.432, 0.648, 0.972)
EFASEKAUFOPsy <- c(0.812, 0.658, 0.734, 0.353, 0.317, 0.346); EFASEKAUFOOTH <- c(0.432, 0.648, 0.972)
cor(EFATOKAUF, EFASEKAUFO, method = "pearson"); cor(EFATOKAUF, EFASEKAUFO, method = "spearman"); CONGO(EFATOKAUF, EFASEKAUFO)
## [1] 0.9568264
## [1] 0.9166667
## [1] 0.9899462
cor(EFATOKAUFPsy, EFASEKAUFOPsy, method = "pearson"); cor(EFATOKAUFPsy, EFASEKAUFOPsy, method = "spearman"); CONGO(EFATOKAUFPsy, EFASEKAUFOPsy)
## [1] 0.9854435
## [1] 0.7714286
## [1] 0.9935607
cor(EFATOKAUFOTH, EFASEKAUFOOTH, method = "pearson"); cor(EFATOKAUFOTH, EFASEKAUFOOTH, method = "spearman"); CONGO(EFATOKAUFOTH, EFASEKAUFOOTH)
## [1] 0.9564513
## [1] 1
## [1] 0.9923869
PSYSO.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS'
PSYSO.fit <- cfa(PSYSO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
summary(PSYSO.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 13 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 12
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 12.788
## Degrees of freedom 9
## P-value (Chi-square) 0.172
##
## Model Test Baseline Model:
##
## Test statistic 142.001
## Degrees of freedom 15
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.970
## Tucker-Lewis Index (TLI) 0.950
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -885.907
## Loglikelihood unrestricted model (H1) -879.513
##
## Akaike (AIC) 1795.813
## Bayesian (BIC) 1828.435
## Sample-size adjusted Bayesian (BIC) 1790.511
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.061
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.132
## P-value RMSEA <= 0.05 0.352
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.052
##
## 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
## gPSY =~
## AbsPR 0.831 0.089 9.333 0.000 0.831 0.835
## VerbR 0.620 0.093 6.660 0.000 0.620 0.623
## MentRA 0.768 0.090 8.517 0.000 0.768 0.771
## ExpAL 0.324 0.101 3.215 0.001 0.324 0.325
## WM 0.282 0.101 2.780 0.005 0.282 0.283
## PS 0.328 0.101 3.258 0.001 0.328 0.329
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AbsPR 0.300 0.087 3.450 0.001 0.300 0.303
## .VerbR 0.606 0.095 6.408 0.000 0.606 0.612
## .MentRA 0.401 0.086 4.666 0.000 0.401 0.405
## .ExpAL 0.886 0.122 7.294 0.000 0.886 0.894
## .WM 0.912 0.124 7.344 0.000 0.912 0.920
## .PS 0.884 0.121 7.289 0.000 0.884 0.892
## gPSY 1.000 1.000 1.000
OTHSO.model <- '
gOTH =~ ARA + PRA + SERA + ARS + PRS + SERS'
OTHSO.fit <- cfa(OTHSO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
summary(OTHSO.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 29 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 12
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 103.712
## Degrees of freedom 9
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 315.847
## Degrees of freedom 15
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.685
## Tucker-Lewis Index (TLI) 0.475
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -844.446
## Loglikelihood unrestricted model (H1) -792.590
##
## Akaike (AIC) 1712.892
## Bayesian (BIC) 1745.514
## Sample-size adjusted Bayesian (BIC) 1707.590
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.307
## 90 Percent confidence interval - lower 0.255
## 90 Percent confidence interval - upper 0.361
## P-value RMSEA <= 0.05 0.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.171
##
## 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
## gOTH =~
## ARA 0.197 0.097 2.029 0.042 0.197 0.198
## PRA 0.253 0.097 2.622 0.009 0.253 0.255
## SERA 0.226 0.097 2.327 0.020 0.226 0.227
## ARS 0.796 0.081 9.808 0.000 0.796 0.799
## PRS 0.820 0.080 10.222 0.000 0.820 0.824
## SERS 0.929 0.076 12.287 0.000 0.929 0.934
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .ARA 0.952 0.128 7.455 0.000 0.952 0.961
## .PRA 0.927 0.125 7.435 0.000 0.927 0.935
## .SERA 0.940 0.126 7.446 0.000 0.940 0.949
## .ARS 0.358 0.061 5.886 0.000 0.358 0.361
## .PRS 0.319 0.058 5.480 0.000 0.319 0.322
## .SERS 0.127 0.053 2.401 0.016 0.127 0.128
## gOTH 1.000 1.000 1.000
OTHSO.model <- '
gOTH =~ ARA + PRA + SERA'
OTHSO.fit <- cfa(OTHSO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
summary(OTHSO.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 15 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 6
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Model Test Baseline Model:
##
## Test statistic 78.425
## Degrees of freedom 3
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000
## Tucker-Lewis Index (TLI) 1.000
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -436.044
## Loglikelihood unrestricted model (H1) -436.044
##
## Akaike (AIC) 884.089
## Bayesian (BIC) 900.400
## Sample-size adjusted Bayesian (BIC) 881.437
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.000
## P-value RMSEA <= 0.05 NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.000
##
## 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
## gOTH =~
## ARA 0.430 0.103 4.169 0.000 0.430 0.432
## PRA 0.645 0.114 5.682 0.000 0.645 0.648
## SERA 0.968 0.134 7.224 0.000 0.968 0.972
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .ARA 0.806 0.116 6.926 0.000 0.806 0.813
## .PRA 0.575 0.125 4.584 0.000 0.575 0.580
## .SERA 0.055 0.223 0.244 0.807 0.055 0.055
## gOTH 1.000 1.000 1.000
OTHSO.model <- '
gOTH =~ ARS + PRS + SERS'
OTHSO.fit <- cfa(OTHSO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
summary(OTHSO.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 11 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 6
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Model Test Baseline Model:
##
## Test statistic 197.389
## Degrees of freedom 3
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000
## Tucker-Lewis Index (TLI) 1.000
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -376.562
## Loglikelihood unrestricted model (H1) -376.562
##
## Akaike (AIC) 765.124
## Bayesian (BIC) 781.435
## Sample-size adjusted Bayesian (BIC) 762.473
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.000
## P-value RMSEA <= 0.05 NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.000
##
## 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
## gOTH =~
## ARS 0.809 0.081 10.008 0.000 0.809 0.812
## PRS 0.809 0.081 10.008 0.000 0.809 0.812
## SERS 0.931 0.076 12.255 0.000 0.931 0.935
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .ARS 0.337 0.060 5.614 0.000 0.337 0.340
## .PRS 0.337 0.060 5.614 0.000 0.337 0.340
## .SERS 0.124 0.055 2.243 0.025 0.124 0.125
## gOTH 1.000 1.000 1.000
OTHSO.model <- '
ACC =~ ARA + PRA + SERA
SPE =~ ARS + PRS + SERS
gOTH =~ ACC + SPE'
OTHSO.fit <- cfa(OTHSO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING:
## Could not compute standard errors! The information matrix could
## not be inverted. This may be a symptom that the model is not
## identified.
summary(OTHSO.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 21 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 14
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 34.873
## Degrees of freedom 7
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 315.847
## Degrees of freedom 15
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.907
## Tucker-Lewis Index (TLI) 0.801
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -810.026
## Loglikelihood unrestricted model (H1) -792.590
##
## Akaike (AIC) 1648.053
## Bayesian (BIC) 1686.112
## Sample-size adjusted Bayesian (BIC) 1641.867
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.189
## 90 Percent confidence interval - lower 0.129
## 90 Percent confidence interval - upper 0.253
## P-value RMSEA <= 0.05 0.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.070
##
## 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
## ACC =~
## ARA 0.397 NA 0.455 0.457
## PRA 0.605 NA 0.691 0.695
## SERA 0.788 NA 0.901 0.905
## SPE =~
## ARS 0.690 NA 0.806 0.810
## PRS 0.699 NA 0.817 0.820
## SERS 0.793 NA 0.927 0.931
## gOTH =~
## ACC 0.555 NA 0.485 0.485
## SPE 0.605 NA 0.517 0.517
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .ARA 0.784 NA 0.784 0.791
## .PRA 0.513 NA 0.513 0.518
## .SERA 0.179 NA 0.179 0.181
## .ARS 0.341 NA 0.341 0.344
## .PRS 0.324 NA 0.324 0.327
## .SERS 0.132 NA 0.132 0.133
## .ACC 1.000 0.764 0.764
## .SPE 1.000 0.732 0.732
## gOTH 1.000 1.000 1.000
KAUFNO.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA + ARS + PRS + SERS
gPSY ~~ 0*gOTH'
KAUF.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA + ARS + PRS + SERS
gPSY ~~ gOTH'
KAUFID.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA + ARS + PRS + SERS
gPSY ~~ 1*gOTH'
KAUFNO.fit <- cfa(KAUFNO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUF.fit <- cfa(KAUF.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUFID.fit <- cfa(KAUFID.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
round(cbind("No Relationship" = fitMeasures(KAUFNO.fit, FITM),
"Free Relationship" = fitMeasures(KAUF.fit, FITM),
"Identical" = fitMeasures(KAUFID.fit, FITM)), 3)
## No Relationship Free Relationship Identical
## chisq 190.396 188.656 321.933
## df 54.000 53.000 54.000
## npar 24.000 25.000 24.000
## cfi 0.707 0.709 0.425
## rmsea 0.150 0.151 0.210
## rmsea.ci.lower 0.127 0.128 0.189
## rmsea.ci.upper 0.174 0.175 0.233
## aic 3508.705 3508.965 3640.242
## bic 3573.949 3576.928 3705.486
summary(KAUF.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 28 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 25
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 188.656
## Degrees of freedom 53
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 531.744
## Degrees of freedom 66
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.709
## Tucker-Lewis Index (TLI) 0.637
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -1729.483
## Loglikelihood unrestricted model (H1) -1635.155
##
## Akaike (AIC) 3508.965
## Bayesian (BIC) 3576.928
## Sample-size adjusted Bayesian (BIC) 3497.919
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.151
## 90 Percent confidence interval - lower 0.128
## 90 Percent confidence interval - upper 0.175
## P-value RMSEA <= 0.05 0.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.154
##
## 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
## gPSY =~
## AbsPR 0.826 0.089 9.287 0.000 0.826 0.830
## VerbR 0.624 0.093 6.707 0.000 0.624 0.627
## MentRA 0.766 0.090 8.501 0.000 0.766 0.769
## ExpAL 0.328 0.101 3.251 0.001 0.328 0.329
## WM 0.289 0.101 2.846 0.004 0.289 0.290
## PS 0.335 0.101 3.326 0.001 0.335 0.336
## gOTH =~
## ARA 0.201 0.097 2.062 0.039 0.201 0.202
## PRA 0.258 0.097 2.669 0.008 0.258 0.260
## SERA 0.236 0.097 2.433 0.015 0.236 0.237
## ARS 0.797 0.081 9.833 0.000 0.797 0.801
## PRS 0.824 0.080 10.303 0.000 0.824 0.828
## SERS 0.923 0.076 12.165 0.000 0.923 0.927
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## gPSY ~~
## gOTH 0.146 0.107 1.367 0.172 0.146 0.146
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AbsPR 0.309 0.086 3.572 0.000 0.309 0.311
## .VerbR 0.601 0.094 6.375 0.000 0.601 0.607
## .MentRA 0.404 0.086 4.717 0.000 0.404 0.408
## .ExpAL 0.884 0.121 7.287 0.000 0.884 0.892
## .WM 0.908 0.124 7.335 0.000 0.908 0.916
## .PS 0.879 0.121 7.277 0.000 0.879 0.887
## .ARA 0.951 0.128 7.452 0.000 0.951 0.959
## .PRA 0.924 0.124 7.430 0.000 0.924 0.933
## .SERA 0.935 0.126 7.440 0.000 0.935 0.944
## .ARS 0.356 0.061 5.864 0.000 0.356 0.359
## .PRS 0.311 0.058 5.398 0.000 0.311 0.314
## .SERS 0.139 0.053 2.636 0.008 0.139 0.140
## gPSY 1.000 1.000 1.000
## gOTH 1.000 1.000 1.000
KAUFNO.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA
gPSY ~~ 0*gOTH'
KAUF.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA
gPSY ~~ gOTH'
KAUFID.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARA + PRA + SERA
gPSY ~~ 1*gOTH'
KAUFNO.fit <- cfa(KAUFNO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUF.fit <- cfa(KAUF.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUFID.fit <- cfa(KAUFID.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
round(cbind("No Relationship" = fitMeasures(KAUFNO.fit, FITM),
"Free Relationship" = fitMeasures(KAUF.fit, FITM),
"Identical" = fitMeasures(KAUFID.fit, FITM)), 3)
## No Relationship Free Relationship Identical
## chisq 52.699 28.148 73.184
## df 27.000 26.000 27.000
## npar 18.000 19.000 18.000
## cfi 0.885 0.990 0.794
## rmsea 0.092 0.027 0.124
## rmsea.ci.lower 0.054 0.000 0.090
## rmsea.ci.upper 0.129 0.081 0.158
## aic 2679.902 2657.352 2700.388
## bic 2728.835 2709.003 2749.321
summary(KAUF.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 17 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 19
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 28.148
## Degrees of freedom 26
## P-value (Chi-square) 0.351
##
## Model Test Baseline Model:
##
## Test statistic 260.337
## Degrees of freedom 36
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.990
## Tucker-Lewis Index (TLI) 0.987
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -1309.676
## Loglikelihood unrestricted model (H1) -1295.602
##
## Akaike (AIC) 2657.352
## Bayesian (BIC) 2709.003
## Sample-size adjusted Bayesian (BIC) 2648.956
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.027
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.081
## P-value RMSEA <= 0.05 0.695
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.060
##
## 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
## gPSY =~
## AbsPR 0.815 0.087 9.358 0.000 0.815 0.818
## VerbR 0.637 0.092 6.898 0.000 0.637 0.639
## MentRA 0.754 0.089 8.497 0.000 0.754 0.758
## ExpAL 0.344 0.100 3.436 0.001 0.344 0.346
## WM 0.311 0.101 3.083 0.002 0.311 0.312
## PS 0.346 0.100 3.459 0.001 0.346 0.348
## gOTH =~
## ARA 0.452 0.098 4.628 0.000 0.452 0.454
## PRA 0.688 0.096 7.146 0.000 0.688 0.691
## SERA 0.907 0.097 9.347 0.000 0.907 0.911
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## gPSY ~~
## gOTH 0.537 0.090 5.969 0.000 0.537 0.537
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AbsPR 0.327 0.080 4.091 0.000 0.327 0.330
## .VerbR 0.586 0.092 6.346 0.000 0.586 0.591
## .MentRA 0.422 0.082 5.139 0.000 0.422 0.426
## .ExpAL 0.873 0.120 7.269 0.000 0.873 0.880
## .WM 0.895 0.122 7.313 0.000 0.895 0.903
## .PS 0.871 0.120 7.266 0.000 0.871 0.879
## .ARA 0.787 0.111 7.077 0.000 0.787 0.794
## .PRA 0.518 0.098 5.290 0.000 0.518 0.522
## .SERA 0.169 0.120 1.411 0.158 0.169 0.171
## gPSY 1.000 1.000 1.000
## gOTH 1.000 1.000 1.000
KAUFNO.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARS + PRS + SERS
gPSY ~~ 0*gOTH'
KAUF.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARS + PRS + SERS
gPSY ~~ gOTH'
KAUFID.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
gOTH =~ ARS + PRS + SERS
gPSY ~~ 1*gOTH'
KAUFNO.fit <- cfa(KAUFNO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUF.fit <- cfa(KAUF.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
KAUFID.fit <- cfa(KAUFID.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T)
round(cbind("No Relationship" = fitMeasures(KAUFNO.fit, FITM),
"Free Relationship" = fitMeasures(KAUF.fit, FITM),
"Identical" = fitMeasures(KAUFID.fit, FITM)), 3)
## No Relationship Free Relationship Identical
## chisq 49.090 47.914 164.689
## df 27.000 26.000 27.000
## npar 18.000 19.000 18.000
## cfi 0.935 0.935 0.595
## rmsea 0.085 0.087 0.213
## rmsea.ci.lower 0.046 0.046 0.183
## rmsea.ci.upper 0.123 0.125 0.245
## aic 2560.937 2561.762 2676.536
## bic 2609.870 2613.413 2725.469
summary(KAUF.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 18 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 19
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 47.914
## Degrees of freedom 26
## P-value (Chi-square) 0.006
##
## Model Test Baseline Model:
##
## Test statistic 375.692
## Degrees of freedom 36
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.935
## Tucker-Lewis Index (TLI) 0.911
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -1261.881
## Loglikelihood unrestricted model (H1) -1237.924
##
## Akaike (AIC) 2561.762
## Bayesian (BIC) 2613.413
## Sample-size adjusted Bayesian (BIC) 2553.367
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.087
## 90 Percent confidence interval - lower 0.046
## 90 Percent confidence interval - upper 0.125
## P-value RMSEA <= 0.05 0.064
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.076
##
## 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
## gPSY =~
## AbsPR 0.827 0.089 9.295 0.000 0.827 0.831
## VerbR 0.623 0.093 6.694 0.000 0.623 0.626
## MentRA 0.767 0.090 8.506 0.000 0.767 0.770
## ExpAL 0.327 0.101 3.242 0.001 0.327 0.328
## WM 0.287 0.101 2.830 0.005 0.287 0.288
## PS 0.333 0.101 3.312 0.001 0.333 0.335
## gOTH =~
## ARS 0.811 0.081 10.052 0.000 0.811 0.815
## PRS 0.811 0.081 10.046 0.000 0.811 0.814
## SERS 0.928 0.076 12.202 0.000 0.928 0.932
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## gPSY ~~
## gOTH 0.119 0.108 1.107 0.268 0.119 0.119
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AbsPR 0.307 0.087 3.542 0.000 0.307 0.310
## .VerbR 0.602 0.094 6.383 0.000 0.602 0.608
## .MentRA 0.403 0.086 4.700 0.000 0.403 0.407
## .ExpAL 0.884 0.121 7.289 0.000 0.884 0.892
## .WM 0.909 0.124 7.337 0.000 0.909 0.917
## .PS 0.880 0.121 7.279 0.000 0.880 0.888
## .ARS 0.333 0.060 5.586 0.000 0.333 0.336
## .PRS 0.334 0.060 5.592 0.000 0.334 0.337
## .SERS 0.130 0.055 2.370 0.018 0.130 0.131
## gPSY 1.000 1.000 1.000
## gOTH 1.000 1.000 1.000
KAUFNO.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
ACC =~ ARA + PRA + SERA
SPE =~ ARS + PRS + SERS
gOTH =~ ACC + SPE
gPSY ~~ 0*gOTH'
KAUF.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
ACC =~ ARA + PRA + SERA
SPE =~ ARS + PRS + SERS
gOTH =~ ACC + SPE
gPSY ~~ gOTH'
KAUFID.model <- '
gPSY =~ AbsPR + VerbR + MentRA + ExpAL + WM + PS
ACC =~ ARA + PRA + SERA
SPE =~ ARS + PRS + SERS
gOTH =~ ACC + SPE
gPSY ~~ 1*gOTH'
KAUFNO.fit <- cfa(KAUFNO.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T, check.gradient = F)
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING:
## Could not compute standard errors! The information matrix could
## not be inverted. This may be a symptom that the model is not
## identified.
KAUF.fit <- cfa(KAUF.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T, check.gradient = F)
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING:
## Could not compute standard errors! The information matrix could
## not be inverted. This may be a symptom that the model is not
## identified.
KAUFID.fit <- cfa(KAUFID.model, sample.cov = KAUF.cor, sample.nobs = nKAUF, std.lv = T, orthogonal = T, check.gradient = F)
round(cbind("No Relationship" = fitMeasures(KAUFNO.fit, FITM),
"Free Relationship" = fitMeasures(KAUF.fit, FITM),
"Identical" = fitMeasures(KAUFID.fit, FITM)), 3)
## No Relationship Free Relationship Identical
## chisq 121.557 96.532 100.256
## df 52.000 51.000 52.000
## npar 26.000 27.000 26.000
## cfi 0.851 0.902 0.896
## rmsea 0.109 0.089 0.091
## rmsea.ci.lower 0.084 0.062 0.064
## rmsea.ci.upper 0.135 0.116 0.118
## aic 3443.866 3420.841 3422.565
## bic 3514.547 3494.241 3493.246
summary(KAUF.fit, stand = T, fit = T)
## lavaan 0.6-7 ended normally after 907 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 27
##
## Number of observations 112
##
## Model Test User Model:
##
## Test statistic 96.532
## Degrees of freedom 51
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 531.744
## Degrees of freedom 66
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.902
## Tucker-Lewis Index (TLI) 0.873
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -1683.421
## Loglikelihood unrestricted model (H1) -1635.155
##
## Akaike (AIC) 3420.841
## Bayesian (BIC) 3494.241
## Sample-size adjusted Bayesian (BIC) 3408.911
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.089
## 90 Percent confidence interval - lower 0.062
## 90 Percent confidence interval - upper 0.116
## P-value RMSEA <= 0.05 0.013
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.076
##
## 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
## gPSY =~
## AbsPR 0.814 NA 0.814 0.818
## VerbR 0.638 NA 0.638 0.641
## MentRA 0.753 NA 0.753 0.756
## ExpAL 0.345 NA 0.345 0.347
## WM 0.312 NA 0.312 0.314
## PS 0.348 NA 0.348 0.349
## ACC =~
## ARA 0.002 NA 0.459 0.461
## PRA 0.004 NA 0.704 0.707
## SERA 0.004 NA 0.884 0.888
## SPE =~
## ARS 0.779 NA 0.806 0.810
## PRS 0.789 NA 0.816 0.820
## SERS 0.896 NA 0.927 0.931
## gOTH =~
## ACC 198.924 NA 1.000 1.000
## SPE 0.266 NA 0.257 0.257
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## gPSY ~~
## gOTH 0.547 NA 0.547 0.547
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AbsPR 0.329 NA 0.329 0.332
## .VerbR 0.584 NA 0.584 0.589
## .MentRA 0.425 NA 0.425 0.429
## .ExpAL 0.872 NA 0.872 0.880
## .WM 0.893 NA 0.893 0.902
## .PS 0.870 NA 0.870 0.878
## .ARA 0.780 NA 0.780 0.787
## .PRA 0.495 NA 0.495 0.500
## .SERA 0.209 NA 0.209 0.211
## .ARS 0.341 NA 0.341 0.344
## .PRS 0.325 NA 0.325 0.328
## .SERS 0.131 NA 0.131 0.133
## gPSY 1.000 1.000 1.000
## .ACC 1.000 0.000 0.000
## .SPE 1.000 0.934 0.934
## gOTH 1.000 1.000 1.000
The latent factor correlations from Kaufman et al. (2011) tended to be somewhat higher than their PAF-based analyses indicated. It would be interesting and useful to reassess their hypotheses with models that have less psychometric sampling error to grapple with.
Kaufman, S. B., DeYoung, C. G., Reis, D. L., & Gray, J. R. (2011). General intelligence predicts reasoning ability even for evolutionarily familiar content. Intelligence, 39(5), 311–322. https://doi.org/10.1016/j.intell.2011.05.002