source("funlibs.R")
TDados <- read.spss(file = "Banco de Dados AEC_Clarissa 07NOV_BanTod11.04.19.Mis.sav", to.data.frame = TRUE, use.value.labels = FALSE)
TDados<-as.data.frame(TDados)
data<-data.matrix(TDados[,c(234:237)])
psych::describe(data)
## vars n mean sd median trimmed mad min max range skew kurtosis se
## AEC01 1 789 4.08 1.25 4 4.05 1.48 1 7 6 0.16 0.43 0.04
## AEC02 2 789 4.28 1.25 4 4.25 1.48 1 7 6 0.14 0.31 0.04
## AEC03 3 789 4.03 1.27 4 4.00 1.48 1 7 6 0.24 0.19 0.05
## AEC04 4 789 4.13 1.24 4 4.09 1.48 1 7 6 0.21 0.26 0.04
data<-as.matrix(data)
dsc<-descript(data)
porcentagem<-as.data.frame(round(dsc$perc,2)*100)
names(porcentagem)<-c("% lv1","% lv2","% lv3","% lv4","% lv5","% lv6","% lv7")
porcentagem
## % lv1 % lv2 % lv3 % lv4 % lv5 % lv6 % lv7
## AEC01 2 6 20 39 22 5 5
## AEC02 2 6 14 41 23 7 7
## AEC03 2 7 23 35 21 5 5
## AEC04 2 6 21 37 23 6 5
lbs <- c("lv1","lv2","lv3","lv4","lv5","lv6","lv7")
survey <- TDados[,c(234:237)] %>%
dplyr::mutate_if(is.numeric, factor, levels = 1:7, labels = lbs)
plot(likert(survey[,1:4]), ordered = F, wrap= 60)
#TDados[,c(234)]<-car::Recode(TDados[,c(234)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#TDados[,c(235)]<-car::Recode(TDados[,c(235)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#TDados[,c(236)]<-car::Recode(TDados[,c(236)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#TDados[,c(237)]<-car::Recode(TDados[,c(237)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data<-data.matrix(TDados[,c(234:237)])
dta_long <- melt(as.data.frame(data))
colnames(dta_long) <- c("Item", "Response")
Histogram <- ggplot(dta_long, aes(x = Response, fill = Item))+
geom_histogram(bins = 5)+
facet_wrap(~Item)+
theme_default()
Histogram
DensityPlot <- ggplot(dta_long, aes(x = Response, fill = Item))+
geom_density()+
facet_wrap(~Item)+
theme_default()
DensityPlot
CorMat <- psych::polychoric(data, correct=T, smooth=T,global=T)$rho
corrplot(CorMat,order="hclust",type="upper",method="ellipse",
tl.pos = "lt",mar = c(2,2,2,2))
corrplot(CorMat,order="hclust",type="lower",method="number",
diag=FALSE,tl.pos="n", cl.pos="n",add=TRUE,mar = c(2,2,2,2))
#ggcorrplot(CorMat, hc.order = T,type = "lower", lab = TRUE,
#colors = c("#E46726", "white", "#6D9EC2"))
# Sorteio Aleatório
ss <- sample(1:2,size=nrow(TDados),replace=T,prob=c(0.3,0.7))
banco_EFA <- TDados[ss==1,]
banco_CFA <- TDados[ss==2,]
data<-as.data.frame(banco_EFA)
#data[,c(234)]<-car::Recode(data[,c(234)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(235)]<-car::Recode(data[,c(235)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(236)]<-car::Recode(data[,c(236)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(237)]<-car::Recode(data[,c(237)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data<-data.matrix(data[,c(234:237)])
data<-data[,234:237]
CorMat <- psych::polychoric(data, correct=T, smooth=T,global=T)$rho
bartlett<-psych::cortest.bartlett(CorMat, n = nrow(data),diag=TRUE)
#bartlett
kmo <-psych::KMO(CorMat)
#kmo
It was observed that the six items of CAEFF grouped a latent factor, Bartlett’s chi-square test 963.89; df= 6; p< 0 and KMO = 0.85
parallel<-pa.plot(CorMat,n.obs = nrow(data), fm="uls", cor="poly",n.iter=1000)
## Parallel analysis suggests that the number of factors = 1 and the number of components = 1
print(parallel)
## [[1]]
##
## [[2]]
## [1] 1
#parallel[[2]][1]
Number of factor by parallel analysis is equal to 1
NumericRule <- VSS(CorMat,n =parallel[[2]][1]+1, plot = F, n.obs =nrow(data),rotate="promax",cor="poly", fm="uls")
temp1 <- data.frame(nFactor = row.names(NumericRule$vss.stats),
VSS1 = NumericRule$cfit.1, VSS2 = NumericRule$cfit.2,
MAP = NumericRule$map)
temp2 <- NumericRule$vss.stats[,c(6:8,11)]
NumericRule <- cbind(temp1,temp2)
NumericRule
## nFactor VSS1 VSS2 MAP RMSEA BIC SABIC SRMR
## 1 1 0.9795 0.0000 0.1289 0.06531 -6.896 -0.5557 0.009646985
## 2 2 0.4045 0.7538 0.3695 NA NA NA 0.000001615
EGArst <- bootEGA(data = data, n = 1000, medianStructure = TRUE, plot.MedianStructure = TRUE, ncores = 4, layout = "spring")
## Note: bootnet will store only the following statistics: edge, strength, outStrength, inStrength
## model set to 'GGM'
## Estimating sample network...
## Estimating Network. Using package::function:
## - qgraph::EBICglasso for EBIC model selection
## - using glasso::glasso
## Note: Network with lowest lambda selected as best network: assumption of sparsity might be violated.
## Warning in EBICglassoCore(S = S, n = n, gamma = gamma, penalize.diagonal =
## penalize.diagonal, : A dense regularized network was selected (lambda < 0.1 *
## lambda.max). Recent work indicates a possible drop in specificity. Interpret the
## presence of the smallest edges with care. Setting threshold = TRUE will enforce
## higher specificity, at the cost of sensitivity.
## Bootstrapping...
## Computing statistics...
## Warning: `tbl_df()` was deprecated in dplyr 1.0.0.
## Please use `tibble::as_tibble()` instead.
#Figures
ega1 <- ega.object(CorMat,data)
## Note: Network with lowest lambda selected as best network: assumption of sparsity might be violated.
###
dim1 <- ega1$dim.variables
one <- which(dim1$dimension==1)
dim1$dimension[one] <- rep("AEC01",length(one))
two <- which(dim1$dimension==2)
dim1$dimension[two] <- rep("AEC02",length(two))
three <-which(dim1$dimension==3)
dim1$dimension[three] <- rep("AEC03",length(three))
four <-which(dim1$dimension==4)
dim1$dimension[four] <- rep("AEC04",length(four))
# BootEGA Function
boot.ega <- bootnet(data, nBoot = 1000, default = "EBICglasso",computeCentrality = T, type = "parametric", nCores = 4)
## Note: bootnet will store only the following statistics: edge, strength, outStrength, inStrength
## model set to 'GGM'
## Estimating sample network...
## Estimating Network. Using package::function:
## - qgraph::EBICglasso for EBIC model selection
## - using glasso::glasso
## Note: Network with lowest lambda selected as best network: assumption of sparsity might be violated.
## Warning in EBICglassoCore(S = S, n = n, gamma = gamma, penalize.diagonal =
## penalize.diagonal, : A dense regularized network was selected (lambda < 0.1 *
## lambda.max). Recent work indicates a possible drop in specificity. Interpret the
## presence of the smallest edges with care. Setting threshold = TRUE will enforce
## higher specificity, at the cost of sensitivity.
## Bootstrapping...
## Computing statistics...
boot.ega
## === bootnet Results ===
## Number of nodes: 4
## Number of non-zero edges in sample: 6 / 6
## Mean weight of sample: 0.2915
## Number of bootstrapped networks: 1000
## Results of original sample stored in x$sample
## Table of all statistics from original sample stored in x$sampleTable
## Results of bootstraps stored in x$boots
## Table of all statistics from bootstraps stored in x$bootTable
##
## Use plot(x$sample) to plot estimated network of original sample
## Use summary(x) to inspect summarized statistics (see ?summary.bootnet for details)
## Use plot(x) to plot summarized statistics (see ?plot.bootnet for details)
##
## Relevant references:
##
## Friedman, J. H., Hastie, T., & Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9 (3), 432-441.
## Foygel, R., & Drton, M. (2010). Extended Bayesian information criteria for Gaussian graphical models.
## Friedman, J. H., Hastie, T., & Tibshirani, R. (2014). glasso: Graphical lasso estimation of gaussian graphical models. Retrieved from https://CRAN.R-project.org/package=glasso
## Epskamp, S., Cramer, A., Waldorp, L., Schmittmann, V. D., & Borsboom, D. (2012). qgraph: Network visualizations of relationships in psychometric data. Journal of Statistical Software, 48 (1), 1-18.
## Epskamp, S., Borsboom, D., & Fried, E. I. (2016). Estimating psychological networks and their accuracy: a tutorial paper. arXiv preprint, arXiv:1604.08462.
plot(boot.ega$sample)
##### Summarized statistics
summary(boot.ega)
## Warning: `select_()` was deprecated in dplyr 0.7.0.
## Please use `select()` instead.
## Warning: `mutate_()` was deprecated in dplyr 0.7.0.
## Please use `mutate()` instead.
## See vignette('programming') for more help
## Warning: `summarise_()` was deprecated in dplyr 0.7.0.
## Please use `summarise()` instead.
## Warning: `group_by_()` was deprecated in dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## Warning: `filter_()` was deprecated in dplyr 0.7.0.
## Please use `filter()` instead.
## See vignette('programming') for more help
## # A tibble: 10 x 17
## # Groups: type, node1, node2 [10]
## type id node1 node2 sample mean sd CIlower CIupper q2.5 q97.5
## <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 edge AEC01-… AEC01 "AEC… 0.422 0.417 0.0481 0.326 0.519 3.18e-1 0.508
## 2 edge AEC01-… AEC01 "AEC… 0.184 0.184 0.0595 0.0649 0.303 5.97e-2 0.299
## 3 edge AEC01-… AEC01 "AEC… 0.291 0.292 0.0539 0.183 0.399 1.85e-1 0.392
## 4 edge AEC02-… AEC02 "AEC… 0.115 0.120 0.0589 -0.00318 0.233 2.18e-5 0.233
## 5 edge AEC02-… AEC02 "AEC… 0.460 0.453 0.0459 0.368 0.551 3.59e-1 0.537
## 6 edge AEC03-… AEC03 "AEC… 0.278 0.275 0.0539 0.170 0.385 1.69e-1 0.377
## 7 stren… AEC01 AEC01 "" 0.897 0.892 0.0589 0.779 1.01 7.82e-1 1.01
## 8 stren… AEC02 AEC02 "" 0.997 0.989 0.0609 0.875 1.12 8.66e-1 1.12
## 9 stren… AEC03 AEC03 "" 0.576 0.579 0.0449 0.487 0.666 4.86e-1 0.669
## 10 stren… AEC04 AEC04 "" 1.03 1.02 0.0602 0.908 1.15 9.01e-1 1.13
## # … with 6 more variables: q2.5_non0 <dbl>, mean_non0 <dbl>, q97.5_non0 <dbl>,
## # var_non0 <dbl>, sd_non0 <dbl>, prop0 <dbl>
plot(boot.ega)
## Warning: `arrange_()` was deprecated in dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
# Estimate EGA
EGA(data =CorMat,n=nrow(data), plot.EGA = T,uni.method = "LE")
## Warning in EGA(data = CorMat, n = nrow(data), plot.EGA = T, uni.method =
## "LE"): Previous versions of EGAnet (<= 0.9.8) checked unidimensionality using
## [4;muni.method = "expand"[0m as the default
## Network estimated with:
## • gamma = 0.5
## • lambda.min.ratio = 0.1
## EGA Results:
##
## Number of Dimensions:
## [1] 1
##
## Items per Dimension:
## items dimension
## AEC01 AEC01 1
## AEC02 AEC02 1
## AEC03 AEC03 1
## AEC04 AEC04 1
EFArst <- psych::fa(as.matrix(CorMat),1,n.obs=nrow(data), rotate = "promax",fm = "uls", n.iter =1000, alpha = T,correct = T)
The communalities were observed between 0.582 and 0.874, and the factor loadings between 0.763and 0.935 Table2. A factor was retained, with an eigenvalue of 3.16 that explained 0.79% of the variance.
EFArst
## Factor Analysis with confidence intervals using method = psych::fa(r = as.matrix(CorMat), nfactors = 1, n.obs = nrow(data),
## n.iter = 1000, rotate = "promax", fm = "uls", alpha = T,
## correct = T)
## Factor Analysis using method = uls
## Call: psych::fa(r = as.matrix(CorMat), nfactors = 1, n.obs = nrow(data),
## n.iter = 1000, rotate = "promax", fm = "uls", alpha = T,
## correct = T)
## Standardized loadings (pattern matrix) based upon correlation matrix
## ULS1 h2 u2 com
## AEC01 0.91 0.84 0.16 1
## AEC02 0.94 0.87 0.13 1
## AEC03 0.76 0.58 0.42 1
## AEC04 0.93 0.87 0.13 1
##
## ULS1
## SS loadings 3.16
## Proportion Var 0.79
##
## Mean item complexity = 1
## Test of the hypothesis that 1 factor is sufficient.
##
## The degrees of freedom for the null model are 6 and the objective function was 3.77 with Chi Square of 963.9
## The degrees of freedom for the model are 2 and the objective function was 0.02
##
## The root mean square of the residuals (RMSR) is 0.01
## The df corrected root mean square of the residuals is 0.02
##
## The harmonic number of observations is 259 with the empirical chi square 0.29 with prob < 0.87
## The total number of observations was 259 with Likelihood Chi Square = 4.22 with prob < 0.12
##
## Tucker Lewis Index of factoring reliability = 0.993
## RMSEA index = 0.065 and the 0 % confidence intervals are NA 0.078
## BIC = -6.9
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## ULS1
## Correlation of (regression) scores with factors 0.98
## Multiple R square of scores with factors 0.95
## Minimum correlation of possible factor scores 0.91
##
## Coefficients and bootstrapped confidence intervals
## low ULS1 upper
## AEC01 0.89 0.91 0.94
## AEC02 0.91 0.94 0.96
## AEC03 0.71 0.76 0.82
## AEC04 0.91 0.93 0.96
#fa_mod1 <- efaUnrotate(datas[,c(234:237)], nf = 1, estimator = "WLSMV",ordered=T,missing="pairwise")
#fa_mod1 <- efaUnrotate(data[,c(234:237)], nf = 1, estimator = "MLR",ordered=F,missing="MLR")
data<-banco_CFA
#data[,c(234)]<-car::Recode(data[,c(234)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(235)]<-car::Recode(data[,c(235)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(236)]<-car::Recode(data[,c(236)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data[,c(237)]<-car::Recode(data[,c(237)],"1=1;2=1;3=2;4=3;5=4;6=5;7=5")
#data<-data.matrix(data[,c(234:237)])
model <- 'AEC =~ AEC04 + AEC02 + AEC03 + AEC01'
fit <- lavaan::cfa(model, data =data,estimator="ULSMV",ordered=T,missing="pairwise")
summary(fit,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 12 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 28
##
## Number of observations 530
## Number of missing patterns 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 1.567 38.796
## Degrees of freedom 2 2
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.041
## Shift parameter 0.223
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 2004.344 8789.031
## Degrees of freedom 6 6
## P-value NA 0.000
## Scaling correction factor 0.228
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 0.996
## Tucker-Lewis Index (TLI) 1.001 0.987
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.186
## 90 Percent confidence interval - lower 0.000 0.138
## 90 Percent confidence interval - upper 0.080 0.240
## P-value RMSEA <= 0.05 0.779 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.017 0.017
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 0.975 0.975
## AEC02 0.950 0.008 120.057 0.000 0.926 0.926
## AEC03 0.788 0.016 48.010 0.000 0.768 0.768
## AEC01 0.913 0.010 87.304 0.000 0.890 0.890
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -2.348 0.166 -14.151 0.000 -2.348 -2.348
## AEC04|t2 -1.436 0.081 -17.787 0.000 -1.436 -1.436
## AEC04|t3 -0.591 0.058 -10.169 0.000 -0.591 -0.591
## AEC04|t4 0.383 0.056 6.839 0.000 0.383 0.383
## AEC04|t5 1.153 0.070 16.485 0.000 1.153 1.153
## AEC04|t6 1.521 0.085 17.917 0.000 1.521 1.521
## AEC02|t1 -2.220 0.146 -15.179 0.000 -2.220 -2.220
## AEC02|t2 -1.521 0.085 -17.917 0.000 -1.521 -1.521
## AEC02|t3 -0.835 0.062 -13.469 0.000 -0.835 -0.835
## AEC02|t4 0.337 0.056 6.064 0.000 0.337 0.337
## AEC02|t5 1.040 0.067 15.601 0.000 1.040 1.040
## AEC02|t6 1.450 0.081 17.815 0.000 1.450 1.450
## AEC03|t1 -2.168 0.139 -15.568 0.000 -2.168 -2.168
## AEC03|t2 -1.292 0.075 -17.294 0.000 -1.292 -1.292
## AEC03|t3 -0.424 0.056 -7.527 0.000 -0.424 -0.424
## AEC03|t4 0.439 0.056 7.784 0.000 0.439 0.439
## AEC03|t5 1.190 0.071 16.734 0.000 1.190 1.190
## AEC03|t6 1.552 0.087 17.936 0.000 1.552 1.552
## AEC01|t1 -2.121 0.133 -15.900 0.000 -2.121 -2.121
## AEC01|t2 -1.326 0.076 -17.439 0.000 -1.326 -1.326
## AEC01|t3 -0.596 0.058 -10.253 0.000 -0.596 -0.596
## AEC01|t4 0.476 0.057 8.383 0.000 0.476 0.476
## AEC01|t5 1.200 0.071 16.795 0.000 1.200 1.200
## AEC01|t6 1.521 0.085 17.917 0.000 1.521 1.521
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.049 0.049 0.049
## .AEC02 0.142 0.142 0.142
## .AEC03 0.410 0.410 0.410
## .AEC01 0.207 0.207 0.207
## AEC 0.951 0.010 97.740 0.000 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 1.000 1.000 1.000
## AEC02 1.000 1.000 1.000
## AEC03 1.000 1.000 1.000
## AEC01 1.000 1.000 1.000
##
## R-Square:
## Estimate
## AEC04 0.951
## AEC02 0.858
## AEC03 0.590
## AEC01 0.793
lavaan::fitMeasures(fit,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 38.796 2.000 NA
## srmr cfi.scaled tli.scaled
## 0.017 0.996 0.987
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.186 0.138 0.240
parameters<-lavaan::standardizedSolution(fit)
loadings<-parameters[parameters$op=="=~",]
loadings
## lhs op rhs est.std se z pvalue ci.lower ci.upper
## 1 AEC =~ AEC04 0.975 0.005 195.48 0 0.965 0.985
## 2 AEC =~ AEC02 0.926 0.006 142.80 0 0.913 0.939
## 3 AEC =~ AEC03 0.768 0.016 48.20 0 0.737 0.800
## 4 AEC =~ AEC01 0.890 0.009 98.06 0 0.873 0.908
modificationindices(fit, sort.=T)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 44 AEC04 ~~ AEC03 1.239 0.080 0.080 0.567 0.567
## 47 AEC02 ~~ AEC01 1.239 0.088 0.088 0.515 0.515
## 46 AEC02 ~~ AEC03 1.113 -0.073 -0.073 -0.301 -0.301
## 45 AEC04 ~~ AEC01 1.113 -0.089 -0.089 -0.879 -0.879
## 43 AEC04 ~~ AEC02 0.004 -0.006 -0.006 -0.066 -0.066
## 48 AEC03 ~~ AEC01 0.004 -0.004 -0.004 -0.014 -0.014
semTools::reliability(fit)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## AEC
## alpha 0.9261
## alpha.ord 0.9378
## omega 0.9202
## omega2 0.9202
## omega3 0.9201
## avevar 0.7980
data$SexoR<-as.factor(data$Sexo)
model <- 'AEC =~ AEC04 + AEC01 + AEC02 + AEC03'
invariance<- measurementInvarianceCat(model = model, data = data, group = "SexoR",parameterization = "theta", estimator = "ULSMV",ordered = c("AEC01", "AEC02", "AEC03", "AEC04"),missing="pairwise")
## Warning: The measurementInvarianceCat function is deprecated, and it will cease
## to be included in future versions of semTools. See help('semTools-deprecated)
## for details.
## Warning in lav_object_post_check(object): lavaan WARNING: some estimated ov
## variances are negative
##
## Measurement invariance models:
##
## Model 1 : fit.configural
## Model 2 : fit.loadings
## Model 3 : fit.thresholds
## Model 4 : fit.means
##
## Scaled Chi-Squared Difference Test (method = "satorra.2000")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.configural 4 2.54
## fit.loadings 7 3.71 2.05 3 0.5613
## fit.thresholds 26 31.82 17.17 19 0.5784
## fit.means 27 296.44 7.75 1 0.0054 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
##
## Fit measures:
##
## cfi.scaled rmsea.scaled cfi.scaled.delta rmsea.scaled.delta
## fit.configural 0.994 0.219 NA NA
## fit.loadings 1.000 0.024 0.006 0.195
## fit.thresholds 1.000 0.000 0.000 0.024
## fit.means 0.994 0.081 0.006 0.081
summary(invariance$fit.configural,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 378 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 61
## Number of equality constraints 5
##
## Number of observations per group:
## 2 371
## 1 159
## Number of missing patterns per group:
## 2 1
## 1 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 2.536 54.492
## Degrees of freedom 4 4
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.047
## Shift parameter for each group:
## 2 0.397
## 1 0.170
## simple second-order correction
## Test statistic for each group:
## 2 1.904 40.883
## 1 0.632 13.609
##
## Model Test Baseline Model:
##
## Test statistic 1975.357 8140.340
## Degrees of freedom 12 12
## P-value NA 0.000
## Scaling correction factor 0.243
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 0.994
## Tucker-Lewis Index (TLI) 1.002 0.981
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.219
## 90 Percent confidence interval - lower 0.000 0.169
## 90 Percent confidence interval - upper 0.075 0.272
## P-value RMSEA <= 0.05 0.845 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.022 0.022
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 4.663 0.978
## AEC01 0.436 0.075 5.801 0.000 2.033 0.897
## AEC02 0.486 0.081 5.996 0.000 2.264 0.915
## AEC03 0.244 0.039 6.348 0.000 1.140 0.752
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -10.958 2.028 -5.403 0.000 -10.958 -2.298
## AEC04|t2 -6.346 0.930 -6.825 0.000 -6.346 -1.331
## AEC04|t3 -2.292 0.403 -5.690 0.000 -2.292 -0.481
## AEC04|t4 2.256 0.474 4.765 0.000 2.256 0.473
## AEC04|t5 6.046 0.880 6.871 0.000 6.046 1.268
## AEC04|t6 7.788 1.064 7.320 0.000 7.788 1.633
## AEC01|t1 -4.708 0.307 -15.353 0.000 -4.708 -2.078
## AEC01|t2 -2.873 0.202 -14.215 0.000 -2.873 -1.268
## AEC01|t3 -1.176 0.162 -7.273 0.000 -1.176 -0.519
## AEC01|t4 1.229 0.155 7.934 0.000 1.229 0.542
## AEC01|t5 3.091 0.216 14.313 0.000 3.091 1.364
## AEC01|t6 3.760 0.255 14.761 0.000 3.760 1.659
## AEC02|t1 -5.476 0.440 -12.444 0.000 -5.476 -2.212
## AEC02|t2 -3.603 0.272 -13.229 0.000 -3.603 -1.455
## AEC02|t3 -1.771 0.188 -9.431 0.000 -1.771 -0.715
## AEC02|t4 1.115 0.173 6.446 0.000 1.115 0.451
## AEC02|t5 2.893 0.205 14.122 0.000 2.893 1.169
## AEC02|t6 3.863 0.206 18.745 0.000 3.863 1.561
## AEC03|t1 -3.245 0.215 -15.092 0.000 -3.245 -2.140
## AEC03|t2 -1.772 0.120 -14.705 0.000 -1.772 -1.169
## AEC03|t3 -0.506 0.101 -5.003 0.000 -0.506 -0.334
## AEC03|t4 0.787 0.102 7.706 0.000 0.787 0.519
## AEC03|t5 1.993 0.128 15.511 0.000 1.993 1.314
## AEC03|t6 2.601 0.163 15.921 0.000 2.601 1.716
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.044
## .AEC01 1.000 1.000 0.195
## .AEC02 1.000 1.000 0.163
## .AEC03 1.000 1.000 0.435
## AEC 21.739 6.675 3.257 0.001 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.210 0.210 1.000
## AEC01 0.441 0.441 1.000
## AEC02 0.404 0.404 1.000
## AEC03 0.660 0.660 1.000
##
## R-Square:
## Estimate
## AEC04 0.956
## AEC01 0.805
## AEC02 0.837
## AEC03 0.565
##
##
## Group 2 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 6.200 0.965
## AEC01 0.432 0.104 4.145 0.000 2.681 0.870
## AEC02 0.573 0.119 4.806 0.000 3.553 0.949
## AEC03 0.255 0.062 4.140 0.000 1.579 0.779
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 5.076 6.084 0.834 0.404 0.819 0.819
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -10.958 2.028 -5.403 0.000 -10.958 -1.706
## AEC04|t2 -6.346 0.930 -6.825 0.000 -6.346 -0.988
## AEC04|t3 -0.596 3.177 -0.188 0.851 -0.596 -0.093
## AEC04|t4 6.247 6.692 0.934 0.351 6.247 0.972
## AEC04|t5 11.053 9.225 1.198 0.231 11.053 1.720
## AEC04|t6 13.521 10.537 1.283 0.199 13.521 2.104
## AEC01|t1 -4.708 0.307 -15.353 0.000 -4.708 -1.527
## AEC01|t2 -2.374 0.575 -4.129 0.000 -2.374 -0.770
## AEC01|t3 -0.251 1.402 -0.179 0.858 -0.251 -0.081
## AEC01|t4 3.209 2.858 1.123 0.261 3.209 1.041
## AEC01|t5 4.989 3.624 1.377 0.169 4.989 1.618
## AEC01|t6 6.135 4.123 1.488 0.137 6.135 1.990
## AEC02|t1 -5.476 0.440 -12.444 0.000 -5.476 -1.462
## AEC02|t2 -3.479 0.651 -5.343 0.000 -3.479 -0.929
## AEC02|t3 -1.501 1.369 -1.096 0.273 -1.501 -0.401
## AEC02|t4 3.233 3.396 0.952 0.341 3.233 0.863
## AEC02|t5 5.879 4.576 1.285 0.199 5.879 1.570
## AEC02|t6 7.563 5.338 1.417 0.157 7.563 2.020
## AEC03|t1 -3.245 0.215 -15.092 0.000 -3.245 -1.601
## AEC03|t2 -2.164 0.362 -5.986 0.000 -2.164 -1.068
## AEC03|t3 -0.024 0.926 -0.026 0.979 -0.024 -0.012
## AEC03|t4 1.826 1.596 1.144 0.253 1.826 0.901
## AEC03|t5 3.228 2.132 1.514 0.130 3.228 1.593
## AEC03|t6 3.883 2.390 1.625 0.104 3.883 1.916
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 2.837 3.102 0.915 0.360 2.837 0.069
## .AEC01 2.317 2.042 1.135 0.256 2.317 0.244
## .AEC02 1.401 1.313 1.067 0.286 1.401 0.100
## .AEC03 1.613 1.243 1.298 0.194 1.613 0.393
## AEC 38.444 41.068 0.936 0.349 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.156 0.156 1.000
## AEC01 0.324 0.324 1.000
## AEC02 0.267 0.267 1.000
## AEC03 0.493 0.493 1.000
##
## R-Square:
## Estimate
## AEC04 0.931
## AEC01 0.756
## AEC02 0.900
## AEC03 0.607
lavaan::fitMeasures(invariance$fit.configural,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 54.492 4.000 NA
## srmr cfi.scaled tli.scaled
## 0.022 0.994 0.981
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.219 0.169 0.272
modificationindices(invariance$fit.configural, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 92 AEC04 ~~ AEC03 1 1 1 1.856 0.845 0.845 0.845 0.845
## 93 AEC01 ~~ AEC02 1 1 1 1.856 0.732 0.732 0.732 0.732
## 90 AEC04 ~~ AEC01 1 1 1 0.752 -0.965 -0.965 -0.965 -0.965
## 95 AEC02 ~~ AEC03 1 1 1 0.752 -0.263 -0.263 -0.263 -0.263
## 97 AEC04 ~~ AEC02 2 2 1 0.474 2.687 2.687 1.348 1.348
## 100 AEC01 ~~ AEC03 2 2 1 0.474 0.516 0.516 0.267 0.267
## 96 AEC04 ~~ AEC01 2 2 1 0.465 -1.989 -1.989 -0.776 -0.776
## 101 AEC02 ~~ AEC03 2 2 1 0.465 -0.671 -0.671 -0.447 -0.447
## 94 AEC01 ~~ AEC03 1 1 1 0.254 -0.137 -0.137 -0.137 -0.137
## 91 AEC04 ~~ AEC02 1 1 1 0.254 -0.626 -0.626 -0.626 -0.626
## 99 AEC01 ~~ AEC02 2 2 1 0.000 -0.001 -0.001 0.000 0.000
## 98 AEC04 ~~ AEC03 2 2 1 0.000 -0.001 -0.001 0.000 0.000
semTools::reliability(invariance$fit.configural)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`2`
## AEC
## alpha 0.9189
## alpha.ord 0.9347
## omega 0.9174
## omega2 0.9174
## omega3 0.9174
## avevar 0.8898
##
## $`1`
## AEC
## alpha 0.9351
## alpha.ord 0.9382
## omega 0.9197
## omega2 0.9197
## omega3 0.9194
## avevar 0.8815
summary(invariance$fit.loadings,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 322 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 61
## Number of equality constraints 8
##
## Number of observations per group:
## 2 371
## 1 159
## Number of missing patterns per group:
## 2 1
## 1 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 3.706 8.074
## Degrees of freedom 7 7
## P-value (Unknown) NA 0.326
## Scaling correction factor 0.645
## Shift parameter for each group:
## 2 1.633
## 1 0.700
## simple second-order correction
## Test statistic for each group:
## 2 2.099 4.886
## 1 1.606 3.189
##
## Model Test Baseline Model:
##
## Test statistic 1975.357 8140.340
## Degrees of freedom 12 12
## P-value NA 0.000
## Scaling correction factor 0.243
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 1.000
## Tucker-Lewis Index (TLI) 1.003 1.000
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.024
## 90 Percent confidence interval - lower 0.000 0.000
## 90 Percent confidence interval - upper 0.047 0.082
## P-value RMSEA <= 0.05 0.958 0.702
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.025 0.025
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 4.049 0.971
## AEC01 0.485 0.155 3.119 0.002 1.962 0.891
## AEC02 0.619 0.201 3.081 0.002 2.507 0.929
## AEC03 0.281 0.087 3.229 0.001 1.137 0.751
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -9.600 2.865 -3.351 0.001 -9.600 -2.302
## AEC04|t2 -5.550 1.509 -3.678 0.000 -5.550 -1.331
## AEC04|t3 -2.005 0.579 -3.462 0.001 -2.005 -0.481
## AEC04|t4 1.973 0.603 3.273 0.001 1.973 0.473
## AEC04|t5 5.288 1.423 3.716 0.000 5.288 1.268
## AEC04|t6 6.812 1.809 3.765 0.000 6.812 1.633
## AEC01|t1 -4.586 0.397 -11.557 0.000 -4.586 -2.082
## AEC01|t2 -2.792 0.238 -11.723 0.000 -2.792 -1.268
## AEC01|t3 -1.143 0.165 -6.929 0.000 -1.143 -0.519
## AEC01|t4 1.194 0.160 7.481 0.000 1.194 0.542
## AEC01|t5 3.004 0.247 12.179 0.000 3.004 1.364
## AEC01|t6 3.655 0.293 12.478 0.000 3.655 1.659
## AEC02|t1 -5.947 0.774 -7.680 0.000 -5.947 -2.204
## AEC02|t2 -3.928 0.484 -8.118 0.000 -3.928 -1.455
## AEC02|t3 -1.931 0.275 -7.015 0.000 -1.931 -0.715
## AEC02|t4 1.216 0.220 5.517 0.000 1.216 0.451
## AEC02|t5 3.154 0.368 8.573 0.000 3.154 1.169
## AEC02|t6 4.212 0.447 9.418 0.000 4.212 1.561
## AEC03|t1 -3.241 0.233 -13.910 0.000 -3.241 -2.141
## AEC03|t2 -1.769 0.127 -13.941 0.000 -1.769 -1.169
## AEC03|t3 -0.505 0.102 -4.967 0.000 -0.505 -0.334
## AEC03|t4 0.786 0.103 7.648 0.000 0.786 0.519
## AEC03|t5 1.990 0.133 14.908 0.000 1.990 1.314
## AEC03|t6 2.597 0.170 15.288 0.000 2.597 1.716
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.057
## .AEC01 1.000 1.000 0.206
## .AEC02 1.000 1.000 0.137
## .AEC03 1.000 1.000 0.436
## AEC 16.397 9.346 1.754 0.079 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.240 0.240 1.000
## AEC01 0.454 0.454 1.000
## AEC02 0.371 0.371 1.000
## AEC03 0.661 0.661 1.000
##
## R-Square:
## Estimate
## AEC04 0.943
## AEC01 0.794
## AEC02 0.863
## AEC03 0.564
##
##
## Group 2 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 5.660 0.987
## AEC01 0.485 0.155 3.119 0.002 2.743 0.892
## AEC02 0.619 0.201 3.081 0.002 3.504 0.901
## AEC03 0.281 0.087 3.229 0.001 1.589 0.782
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 4.646 5.726 0.811 0.417 0.821 0.821
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -9.600 2.865 -3.351 0.001 -9.600 -1.674
## AEC04|t2 -5.550 1.509 -3.678 0.000 -5.550 -0.968
## AEC04|t3 -0.417 2.629 -0.159 0.874 -0.417 -0.073
## AEC04|t4 5.692 6.386 0.891 0.373 5.692 0.992
## AEC04|t5 9.983 9.154 1.091 0.275 9.983 1.740
## AEC04|t6 12.187 10.585 1.151 0.250 12.187 2.124
## AEC01|t1 -4.586 0.397 -11.557 0.000 -4.586 -1.492
## AEC01|t2 -2.305 0.579 -3.979 0.000 -2.305 -0.750
## AEC01|t3 -0.187 1.362 -0.137 0.891 -0.187 -0.061
## AEC01|t4 3.263 2.815 1.159 0.246 3.263 1.061
## AEC01|t5 5.038 3.585 1.405 0.160 5.038 1.639
## AEC01|t6 6.181 4.086 1.513 0.130 6.181 2.010
## AEC02|t1 -5.947 0.774 -7.680 0.000 -5.947 -1.529
## AEC02|t2 -3.759 0.962 -3.908 0.000 -3.759 -0.966
## AEC02|t3 -1.704 1.384 -1.232 0.218 -1.704 -0.438
## AEC02|t4 3.214 3.049 1.054 0.292 3.214 0.826
## AEC02|t5 5.962 4.092 1.457 0.145 5.962 1.533
## AEC02|t6 7.712 4.774 1.615 0.106 7.712 1.982
## AEC03|t1 -3.241 0.233 -13.910 0.000 -3.241 -1.596
## AEC03|t2 -2.160 0.361 -5.993 0.000 -2.160 -1.064
## AEC03|t3 -0.016 0.907 -0.018 0.986 -0.016 -0.008
## AEC03|t4 1.839 1.567 1.173 0.241 1.839 0.905
## AEC03|t5 3.244 2.096 1.548 0.122 3.244 1.597
## AEC03|t6 3.900 2.351 1.659 0.097 3.900 1.920
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.868 4.064 0.213 0.831 0.868 0.026
## .AEC01 1.930 1.995 0.967 0.334 1.930 0.204
## .AEC02 2.856 2.651 1.077 0.281 2.856 0.189
## .AEC03 1.601 1.185 1.352 0.177 1.601 0.388
## AEC 32.037 39.548 0.810 0.418 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.174 0.174 1.000
## AEC01 0.325 0.325 1.000
## AEC02 0.257 0.257 1.000
## AEC03 0.492 0.492 1.000
##
## R-Square:
## Estimate
## AEC04 0.974
## AEC01 0.796
## AEC02 0.811
## AEC03 0.612
lavaan::fitMeasures(invariance$fit.loadings,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 8.074 7.000 NA
## srmr cfi.scaled tli.scaled
## 0.025 1.000 1.000
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.024 0.000 0.082
modificationindices(invariance$fit.loadings, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 95 AEC04 ~~ AEC03 1 1 1 2.021 0.704 0.704 0.704 0.704
## 99 AEC04 ~~ AEC01 2 2 1 1.283 -2.036 -2.036 -1.573 -1.573
## 98 AEC02 ~~ AEC03 1 1 1 1.187 -0.338 -0.338 -0.338 -0.338
## 36 AEC02 ~*~ AEC02 1 1 1 1.076 0.057 0.057 1.000 1.000
## 40 AEC02 ~1 1 1 1 1.076 0.909 0.909 0.337 0.337
## 78 AEC02 ~*~ AEC02 2 2 1 1.076 -0.026 -0.026 -1.000 -1.000
## 82 AEC02 ~1 2 2 1 1.075 -0.909 -0.909 -0.234 -0.234
## 96 AEC01 ~~ AEC02 1 1 1 1.034 0.523 0.523 0.523 0.523
## 100 AEC04 ~~ AEC02 2 2 1 0.748 1.970 1.970 1.251 1.251
## 94 AEC04 ~~ AEC02 1 1 1 0.485 -0.728 -0.728 -0.728 -0.728
## 81 AEC01 ~1 2 2 1 0.277 0.358 0.358 0.117 0.117
## 35 AEC01 ~*~ AEC01 1 1 1 0.277 -0.035 -0.035 -1.000 -1.000
## 39 AEC01 ~1 1 1 1 0.277 -0.358 -0.358 -0.163 -0.163
## 77 AEC01 ~*~ AEC01 2 2 1 0.277 0.017 0.017 1.000 1.000
## 80 AEC04 ~1 2 2 1 0.232 0.708 0.708 0.123 0.123
## 38 AEC04 ~1 1 1 1 0.232 -0.708 -0.708 -0.170 -0.170
## 76 AEC04 ~*~ AEC04 2 2 1 0.222 0.008 0.008 1.000 1.000
## 1 AEC =~ AEC04 1 1 1 0.215 0.068 0.276 0.066 0.066
## 34 AEC04 ~*~ AEC04 1 1 1 0.215 -0.016 -0.016 -1.000 -1.000
## 43 AEC =~ AEC04 2 2 1 0.215 -0.068 -0.386 -0.067 -0.067
## 93 AEC04 ~~ AEC01 1 1 1 0.118 -0.283 -0.283 -0.283 -0.283
## 102 AEC01 ~~ AEC02 2 2 1 0.108 0.381 0.381 0.162 0.162
## 97 AEC01 ~~ AEC03 1 1 1 0.100 -0.078 -0.078 -0.078 -0.078
## 101 AEC04 ~~ AEC03 2 2 1 0.091 -0.337 -0.337 -0.286 -0.286
## 103 AEC01 ~~ AEC03 2 2 1 0.057 0.141 0.141 0.080 0.080
## 37 AEC03 ~*~ AEC03 1 1 1 0.002 -0.005 -0.005 -1.000 -1.000
## 83 AEC03 ~1 2 2 1 0.002 0.024 0.024 0.012 0.012
## 41 AEC03 ~1 1 1 1 0.002 -0.024 -0.024 -0.016 -0.016
## 79 AEC03 ~*~ AEC03 2 2 1 0.002 0.003 0.003 1.000 1.000
## 104 AEC02 ~~ AEC03 2 2 1 0.001 0.017 0.017 0.008 0.008
semTools::reliability(invariance$fit.loadings)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`2`
## AEC
## alpha 0.9189
## alpha.ord 0.9347
## omega 0.9172
## omega2 0.9172
## omega3 0.9171
## avevar 0.8743
##
## $`1`
## AEC
## alpha 0.9351
## alpha.ord 0.9382
## omega 0.9190
## omega2 0.9190
## omega3 0.9182
## avevar 0.8823
summary(invariance$fit.thresholds,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 191 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 61
## Number of equality constraints 27
##
## Number of observations per group:
## 2 371
## 1 159
## Number of missing patterns per group:
## 2 1
## 1 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 31.817 22.649
## Degrees of freedom 26 26
## P-value (Unknown) NA 0.653
## Scaling correction factor 2.583
## Shift parameter for each group:
## 2 7.233
## 1 3.100
## simple second-order correction
## Test statistic for each group:
## 2 10.422 11.267
## 1 21.395 11.382
##
## Model Test Baseline Model:
##
## Test statistic 1975.357 8140.340
## Degrees of freedom 12 12
## P-value NA 0.000
## Scaling correction factor 0.243
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.997 1.000
## Tucker-Lewis Index (TLI) 0.999 1.000
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.029 0.000
## 90 Percent confidence interval - lower 0.000 0.000
## 90 Percent confidence interval - upper 0.059 0.041
## P-value RMSEA <= 0.05 0.853 0.985
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.026 0.026
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 3.399 0.959
## AEC01 0.573 0.120 4.766 0.000 1.948 0.890
## AEC02 0.716 0.146 4.904 0.000 2.432 0.925
## AEC03 0.354 0.066 5.399 0.000 1.203 0.769
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -8.017 1.446 -5.544 0.000 -8.017 -2.263
## AEC04|t2 -4.837 0.850 -5.688 0.000 -4.837 -1.365
## AEC04|t3 -1.765 0.384 -4.591 0.000 -1.765 -0.498
## AEC04|t4 1.746 0.354 4.936 0.000 1.746 0.493
## AEC04|t5 4.525 0.772 5.859 0.000 4.525 1.277
## AEC04|t6 5.845 0.968 6.040 0.000 5.845 1.650
## AEC01|t1 -4.546 0.352 -12.903 0.000 -4.546 -2.076
## AEC01|t2 -2.771 0.226 -12.252 0.000 -2.771 -1.266
## AEC01|t3 -1.138 0.159 -7.175 0.000 -1.138 -0.520
## AEC01|t4 1.271 0.155 8.188 0.000 1.271 0.580
## AEC01|t5 2.950 0.249 11.844 0.000 2.950 1.347
## AEC01|t6 3.658 0.296 12.361 0.000 3.658 1.671
## AEC02|t1 -5.688 0.562 -10.118 0.000 -5.688 -2.163
## AEC02|t2 -3.836 0.376 -10.202 0.000 -3.836 -1.459
## AEC02|t3 -2.020 0.243 -8.326 0.000 -2.020 -0.768
## AEC02|t4 1.174 0.188 6.258 0.000 1.174 0.446
## AEC02|t5 3.085 0.293 10.510 0.000 3.085 1.173
## AEC02|t6 4.178 0.372 11.236 0.000 4.178 1.589
## AEC03|t1 -3.293 0.215 -15.300 0.000 -3.293 -2.106
## AEC03|t2 -1.964 0.126 -15.580 0.000 -1.964 -1.255
## AEC03|t3 -0.545 0.100 -5.433 0.000 -0.545 -0.348
## AEC03|t4 0.828 0.100 8.272 0.000 0.828 0.530
## AEC03|t5 2.035 0.140 14.548 0.000 2.035 1.301
## AEC03|t6 2.632 0.175 15.061 0.000 2.632 1.683
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.080
## .AEC01 1.000 1.000 0.209
## .AEC02 1.000 1.000 0.145
## .AEC03 1.000 1.000 0.409
## AEC 11.553 4.010 2.881 0.004 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.282 0.282 1.000
## AEC01 0.457 0.457 1.000
## AEC02 0.380 0.380 1.000
## AEC03 0.639 0.639 1.000
##
## R-Square:
## Estimate
## AEC04 0.920
## AEC01 0.791
## AEC02 0.855
## AEC03 0.591
##
##
## Group 2 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 3.569 0.992
## AEC01 0.573 0.120 4.766 0.000 2.045 0.871
## AEC02 0.716 0.146 4.904 0.000 2.554 0.915
## AEC03 0.354 0.066 5.399 0.000 1.263 0.784
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 1.260 0.398 3.166 0.002 0.353 0.353
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -8.017 1.446 -5.544 0.000 -8.017 -2.229
## AEC04|t2 -4.837 0.850 -5.688 0.000 -4.837 -1.345
## AEC04|t3 -1.765 0.384 -4.591 0.000 -1.765 -0.491
## AEC04|t4 1.746 0.354 4.936 0.000 1.746 0.486
## AEC04|t5 4.525 0.772 5.859 0.000 4.525 1.258
## AEC04|t6 5.845 0.968 6.040 0.000 5.845 1.625
## AEC01|t1 -4.546 0.352 -12.903 0.000 -4.546 -1.935
## AEC01|t2 -2.771 0.226 -12.252 0.000 -2.771 -1.180
## AEC01|t3 -1.138 0.159 -7.175 0.000 -1.138 -0.484
## AEC01|t4 1.271 0.155 8.188 0.000 1.271 0.541
## AEC01|t5 2.950 0.249 11.844 0.000 2.950 1.256
## AEC01|t6 3.658 0.296 12.361 0.000 3.658 1.557
## AEC02|t1 -5.688 0.562 -10.118 0.000 -5.688 -2.038
## AEC02|t2 -3.836 0.376 -10.202 0.000 -3.836 -1.374
## AEC02|t3 -2.020 0.243 -8.326 0.000 -2.020 -0.723
## AEC02|t4 1.174 0.188 6.258 0.000 1.174 0.420
## AEC02|t5 3.085 0.293 10.510 0.000 3.085 1.105
## AEC02|t6 4.178 0.372 11.236 0.000 4.178 1.496
## AEC03|t1 -3.293 0.215 -15.300 0.000 -3.293 -2.045
## AEC03|t2 -1.964 0.126 -15.580 0.000 -1.964 -1.220
## AEC03|t3 -0.545 0.100 -5.433 0.000 -0.545 -0.338
## AEC03|t4 0.828 0.100 8.272 0.000 0.828 0.514
## AEC03|t5 2.035 0.140 14.548 0.000 2.035 1.264
## AEC03|t6 2.632 0.175 15.061 0.000 2.632 1.634
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.198 0.943 0.210 0.834 0.198 0.015
## .AEC01 1.335 0.409 3.260 0.001 1.335 0.242
## .AEC02 1.272 0.580 2.191 0.028 1.272 0.163
## .AEC03 0.998 0.231 4.313 0.000 0.998 0.385
## AEC 12.738 4.725 2.696 0.007 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.278 0.278 1.000
## AEC01 0.426 0.426 1.000
## AEC02 0.358 0.358 1.000
## AEC03 0.621 0.621 1.000
##
## R-Square:
## Estimate
## AEC04 0.985
## AEC01 0.758
## AEC02 0.837
## AEC03 0.615
lavaan::fitMeasures(invariance$fit.thresholds,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 22.649 26.000 NA
## srmr cfi.scaled tli.scaled
## 0.026 1.000 1.000
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.000 0.000 0.041
modificationindices(invariance$fit.thresholds, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 83 AEC03 ~1 2 2 1 3.105 0.128 0.128 0.080 0.080
## 41 AEC03 ~1 1 1 1 3.105 -0.128 -0.128 -0.082 -0.082
## 117 AEC02 ~~ AEC03 1 1 1 1.881 -0.398 -0.398 -0.398 -0.398
## 114 AEC04 ~~ AEC03 1 1 1 1.145 0.426 0.426 0.426 0.426
## 115 AEC01 ~~ AEC02 1 1 1 1.068 0.455 0.455 0.455 0.455
## 37 AEC03 ~*~ AEC03 1 1 1 0.881 0.059 0.059 1.000 1.000
## 34 AEC04 ~*~ AEC04 1 1 1 0.814 -0.024 -0.024 -1.000 -1.000
## 1 AEC =~ AEC04 1 1 1 0.814 0.086 0.292 0.083 0.083
## 43 AEC =~ AEC04 2 2 1 0.814 -0.086 -0.307 -0.085 -0.085
## 118 AEC04 ~~ AEC01 2 2 1 0.730 -0.722 -0.722 -1.404 -1.404
## 78 AEC02 ~*~ AEC02 2 2 1 0.520 -0.026 -0.026 -1.000 -1.000
## 116 AEC01 ~~ AEC03 1 1 1 0.466 -0.161 -0.161 -0.161 -0.161
## 39 AEC01 ~1 1 1 1 0.428 0.072 0.072 0.033 0.033
## 81 AEC01 ~1 2 2 1 0.428 -0.072 -0.072 -0.030 -0.030
## 76 AEC04 ~*~ AEC04 2 2 1 0.317 0.016 0.016 1.000 1.000
## 119 AEC04 ~~ AEC02 2 2 1 0.312 0.572 0.572 1.139 1.139
## 38 AEC04 ~1 1 1 1 0.298 0.098 0.098 0.028 0.028
## 80 AEC04 ~1 2 2 1 0.298 -0.098 -0.098 -0.027 -0.027
## 35 AEC01 ~*~ AEC01 1 1 1 0.208 -0.020 -0.020 -1.000 -1.000
## 122 AEC01 ~~ AEC03 2 2 1 0.207 0.160 0.160 0.139 0.139
## 36 AEC02 ~*~ AEC02 1 1 1 0.197 0.016 0.016 1.000 1.000
## 121 AEC01 ~~ AEC02 2 2 1 0.192 0.279 0.279 0.214 0.214
## 120 AEC04 ~~ AEC03 2 2 1 0.161 -0.225 -0.225 -0.505 -0.505
## 82 AEC02 ~1 2 2 1 0.159 -0.054 -0.054 -0.019 -0.019
## 40 AEC02 ~1 1 1 1 0.159 0.054 0.054 0.020 0.020
## 113 AEC04 ~~ AEC02 1 1 1 0.029 -0.128 -0.128 -0.128 -0.128
## 123 AEC02 ~~ AEC03 2 2 1 0.029 -0.072 -0.072 -0.064 -0.064
## 79 AEC03 ~*~ AEC03 2 2 1 0.014 0.008 0.008 1.000 1.000
## 77 AEC01 ~*~ AEC01 2 2 1 0.002 0.002 0.002 1.000 1.000
## 112 AEC04 ~~ AEC01 1 1 1 0.001 0.021 0.021 0.021 0.021
semTools::reliability(invariance$fit.thresholds)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`2`
## AEC
## alpha 0.9189
## alpha.ord 0.9347
## omega 0.9162
## omega2 0.9162
## omega3 0.9171
## avevar 0.8502
##
## $`1`
## AEC
## alpha 0.9351
## alpha.ord 0.9382
## omega 0.9217
## omega2 0.9217
## omega3 0.9209
## avevar 0.8682
summary(invariance$fit.means,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 194 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 60
## Number of equality constraints 27
##
## Number of observations per group:
## 2 371
## 1 159
## Number of missing patterns per group:
## 2 1
## 1 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 296.443 73.466
## Degrees of freedom 27 27
## P-value (Unknown) NA 0.000
## Scaling correction factor 4.932
## Shift parameter for each group:
## 2 9.350
## 1 4.007
## simple second-order correction
## Test statistic for each group:
## 2 88.835 27.363
## 1 207.607 46.103
##
## Model Test Baseline Model:
##
## Test statistic 1975.357 8140.340
## Degrees of freedom 12 12
## P-value NA 0.000
## Scaling correction factor 0.243
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.863 0.994
## Tucker-Lewis Index (TLI) 0.939 0.997
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.194 0.081
## 90 Percent confidence interval - lower 0.175 0.059
## 90 Percent confidence interval - upper 0.215 0.103
## P-value RMSEA <= 0.05 0.000 0.012
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.025 0.025
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 3.536 0.962
## AEC01 0.573 0.132 4.358 0.000 2.027 0.897
## AEC02 0.683 0.146 4.691 0.000 2.414 0.924
## AEC03 0.330 0.069 4.808 0.000 1.167 0.759
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -8.599 1.682 -5.113 0.000 -8.599 -2.340
## AEC04|t2 -5.349 1.015 -5.268 0.000 -5.349 -1.456
## AEC04|t3 -2.199 0.450 -4.886 0.000 -2.199 -0.599
## AEC04|t4 1.402 0.338 4.149 0.000 1.402 0.382
## AEC04|t5 4.249 0.825 5.148 0.000 4.249 1.156
## AEC04|t6 5.602 1.061 5.280 0.000 5.602 1.524
## AEC01|t1 -4.863 0.383 -12.681 0.000 -4.863 -2.152
## AEC01|t2 -3.044 0.242 -12.557 0.000 -3.044 -1.347
## AEC01|t3 -1.370 0.156 -8.781 0.000 -1.370 -0.606
## AEC01|t4 1.100 0.142 7.749 0.000 1.100 0.487
## AEC01|t5 2.818 0.235 11.995 0.000 2.818 1.247
## AEC01|t6 3.545 0.285 12.418 0.000 3.545 1.568
## AEC02|t1 -5.818 0.573 -10.153 0.000 -5.818 -2.227
## AEC02|t2 -4.009 0.392 -10.236 0.000 -4.009 -1.534
## AEC02|t3 -2.234 0.237 -9.414 0.000 -2.234 -0.855
## AEC02|t4 0.897 0.164 5.489 0.000 0.897 0.343
## AEC02|t5 2.770 0.269 10.306 0.000 2.770 1.060
## AEC02|t6 3.842 0.341 11.264 0.000 3.842 1.471
## AEC03|t1 -3.347 0.214 -15.660 0.000 -3.347 -2.178
## AEC03|t2 -2.048 0.119 -17.248 0.000 -2.048 -1.333
## AEC03|t3 -0.660 0.090 -7.325 0.000 -0.660 -0.429
## AEC03|t4 0.684 0.089 7.672 0.000 0.684 0.445
## AEC03|t5 1.863 0.127 14.722 0.000 1.863 1.212
## AEC03|t6 2.446 0.161 15.208 0.000 2.446 1.592
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.074
## .AEC01 1.000 1.000 0.196
## .AEC02 1.000 1.000 0.146
## .AEC03 1.000 1.000 0.423
## AEC 12.504 4.771 2.621 0.009 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.272 0.272 1.000
## AEC01 0.442 0.442 1.000
## AEC02 0.383 0.383 1.000
## AEC03 0.651 0.651 1.000
##
## R-Square:
## Estimate
## AEC04 0.926
## AEC01 0.804
## AEC02 0.854
## AEC03 0.577
##
##
## Group 2 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 3.588 1.001
## AEC01 0.573 0.132 4.358 0.000 2.056 0.870
## AEC02 0.683 0.146 4.691 0.000 2.449 0.928
## AEC03 0.330 0.069 4.808 0.000 1.184 0.761
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -8.599 1.682 -5.113 0.000 -8.599 -2.399
## AEC04|t2 -5.349 1.015 -5.268 0.000 -5.349 -1.492
## AEC04|t3 -2.199 0.450 -4.886 0.000 -2.199 -0.614
## AEC04|t4 1.402 0.338 4.149 0.000 1.402 0.391
## AEC04|t5 4.249 0.825 5.148 0.000 4.249 1.185
## AEC04|t6 5.602 1.061 5.280 0.000 5.602 1.563
## AEC01|t1 -4.863 0.383 -12.681 0.000 -4.863 -2.058
## AEC01|t2 -3.044 0.242 -12.557 0.000 -3.044 -1.288
## AEC01|t3 -1.370 0.156 -8.781 0.000 -1.370 -0.580
## AEC01|t4 1.100 0.142 7.749 0.000 1.100 0.465
## AEC01|t5 2.818 0.235 11.995 0.000 2.818 1.193
## AEC01|t6 3.545 0.285 12.418 0.000 3.545 1.501
## AEC02|t1 -5.818 0.573 -10.153 0.000 -5.818 -2.205
## AEC02|t2 -4.009 0.392 -10.236 0.000 -4.009 -1.519
## AEC02|t3 -2.234 0.237 -9.414 0.000 -2.234 -0.847
## AEC02|t4 0.897 0.164 5.489 0.000 0.897 0.340
## AEC02|t5 2.770 0.269 10.306 0.000 2.770 1.050
## AEC02|t6 3.842 0.341 11.264 0.000 3.842 1.456
## AEC03|t1 -3.347 0.214 -15.660 0.000 -3.347 -2.150
## AEC03|t2 -2.048 0.119 -17.248 0.000 -2.048 -1.316
## AEC03|t3 -0.660 0.090 -7.325 0.000 -0.660 -0.424
## AEC03|t4 0.684 0.089 7.672 0.000 0.684 0.439
## AEC03|t5 1.863 0.127 14.722 0.000 1.863 1.197
## AEC03|t6 2.446 0.161 15.208 0.000 2.446 1.571
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 -0.028 0.727 -0.039 0.969 -0.028 -0.002
## .AEC01 1.352 0.423 3.197 0.001 1.352 0.242
## .AEC02 0.965 0.497 1.941 0.052 0.965 0.139
## .AEC03 1.022 0.221 4.618 0.000 1.022 0.422
## AEC 12.872 5.270 2.443 0.015 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.279 0.279 1.000
## AEC01 0.423 0.423 1.000
## AEC02 0.379 0.379 1.000
## AEC03 0.642 0.642 1.000
##
## R-Square:
## Estimate
## AEC04 NA
## AEC01 0.758
## AEC02 0.861
## AEC03 0.578
lavaan::fitMeasures(invariance$fit.means,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 73.466 27.000 NA
## srmr cfi.scaled tli.scaled
## 0.025 0.994 0.997
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.081 0.059 0.103
modificationindices(invariance$fit.means, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 42 AEC ~1 1 1 1 262.788 -1.270 -0.359 -0.359 -0.359
## 84 AEC ~1 2 2 1 262.787 1.270 0.354 0.354 0.354
## 83 AEC03 ~1 2 2 1 74.972 0.521 0.521 0.335 0.335
## 41 AEC03 ~1 1 1 1 74.971 -0.521 -0.521 -0.339 -0.339
## 38 AEC04 ~1 1 1 1 72.205 -1.202 -1.202 -0.327 -0.327
## 80 AEC04 ~1 2 2 1 72.204 1.202 1.202 0.335 0.335
## 40 AEC02 ~1 1 1 1 62.927 -0.825 -0.825 -0.316 -0.316
## 82 AEC02 ~1 2 2 1 62.927 0.825 0.825 0.313 0.313
## 81 AEC01 ~1 2 2 1 55.898 0.678 0.678 0.287 0.287
## 39 AEC01 ~1 1 1 1 55.898 -0.678 -0.678 -0.300 -0.300
## 114 AEC04 ~~ AEC03 1 1 1 1.631 0.527 0.527 0.527 0.527
## 117 AEC02 ~~ AEC03 1 1 1 1.287 -0.325 -0.325 -0.325 -0.325
## 118 AEC04 ~~ AEC01 2 2 1 0.991 -0.863 -0.863 -4.413 -4.413
## 115 AEC01 ~~ AEC02 1 1 1 0.809 0.419 0.419 0.419 0.419
## 43 AEC =~ AEC04 2 2 1 0.630 -0.082 -0.296 -0.082 -0.082
## 76 AEC04 ~*~ AEC04 2 2 1 0.630 0.023 0.023 1.000 1.000
## 1 AEC =~ AEC04 1 1 1 0.630 0.082 0.291 0.079 0.079
## 34 AEC04 ~*~ AEC04 1 1 1 0.630 -0.022 -0.022 -1.000 -1.000
## 122 AEC01 ~~ AEC03 2 2 1 0.587 0.263 0.263 0.224 0.224
## 116 AEC01 ~~ AEC03 1 1 1 0.376 -0.150 -0.150 -0.150 -0.150
## 79 AEC03 ~*~ AEC03 2 2 1 0.207 -0.031 -0.031 -1.000 -1.000
## 37 AEC03 ~*~ AEC03 1 1 1 0.207 0.031 0.031 1.000 1.000
## 36 AEC02 ~*~ AEC02 1 1 1 0.185 0.017 0.017 1.000 1.000
## 78 AEC02 ~*~ AEC02 2 2 1 0.185 -0.017 -0.017 -1.000 -1.000
## 121 AEC01 ~~ AEC02 2 2 1 0.073 0.167 0.167 0.146 0.146
## 112 AEC04 ~~ AEC01 1 1 1 0.062 -0.167 -0.167 -0.167 -0.167
## 113 AEC04 ~~ AEC02 1 1 1 0.053 -0.182 -0.182 -0.182 -0.182
## 119 AEC04 ~~ AEC02 2 2 1 0.049 0.220 0.220 1.330 1.330
## 120 AEC04 ~~ AEC03 2 2 1 0.021 -0.079 -0.079 -0.463 -0.463
## 35 AEC01 ~*~ AEC01 1 1 1 0.008 -0.004 -0.004 -1.000 -1.000
## 77 AEC01 ~*~ AEC01 2 2 1 0.008 0.004 0.004 1.000 1.000
## 123 AEC02 ~~ AEC03 2 2 1 0.000 0.001 0.001 0.001 0.001
semTools::reliability(invariance$fit.means)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`2`
## AEC
## alpha 0.9189
## alpha.ord 0.9347
## omega 0.9169
## omega2 0.9169
## omega3 0.9173
## avevar 0.8561
##
## $`1`
## AEC
## alpha 0.9351
## alpha.ord 0.9382
## omega 0.9235
## omega2 0.9235
## omega3 0.9215
## avevar 0.8809
partial<-partialInvarianceCat(invariance,type="means",return.fit = F)
## Warning in lav_object_post_check(object): lavaan WARNING: some estimated ov
## variances are negative
partial
## $estimates
## poolest mean:2 mean:1 std:2 std:1 diff_std:1 vs. 2
## AEC~1 0 0 1.26 0 0.3652 0.3652
##
## $results
## free.chi free.df free.p free.cfi fix.chi fix.df fix.p fix.cfi wald.chi
## AEC~1 4.01 1 0.04524 -0.1343 4.01 1 0.04524 -0.1343 NA
## wald.df wald.p
## AEC~1 NA NA
data$EscClasseR<-as.factor(data$EscClasse)
model <- 'AEC =~ AEC04 + AEC02 + AEC03 + AEC01'
invariance<- measurementInvarianceCat(model = model, data = data, group = "EscClasseR",parameterization = "theta", estimator = "ULSMV",ordered = c("AEC01", "AEC02", "AEC03", "AEC04"),missing="pairwise")
## Warning: The measurementInvarianceCat function is deprecated, and it will cease
## to be included in future versions of semTools. See help('semTools-deprecated)
## for details.
## Warning in lav_object_post_check(object): lavaan WARNING: some estimated ov
## variances are negative
##
## Measurement invariance models:
##
## Model 1 : fit.configural
## Model 2 : fit.loadings
## Model 3 : fit.thresholds
## Model 4 : fit.means
##
## Scaled Chi-Squared Difference Test (method = "satorra.2000")
##
## lavaan NOTE:
## The "Chisq" column contains standard test statistics, not the
## robust test that should be reported per model. A robust difference
## test is a function of two standard (not robust) statistics.
##
## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)
## fit.configural 6 2.26
## fit.loadings 12 5.35 4.5 6 0.61
## fit.thresholds 50 60.30 34.5 38 0.63
## fit.means 52 108.21 2.0 2 0.37
##
##
## Fit measures:
##
## cfi.scaled rmsea.scaled cfi.scaled.delta rmsea.scaled.delta
## fit.configural 0.995 0.2 NA NA
## fit.loadings 1.000 0.0 0.005 0.2
## fit.thresholds 1.000 0.0 0.000 0.0
## fit.means 1.000 0.0 0.000 0.0
summary(invariance$fit.configural,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 453 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 94
## Number of equality constraints 10
##
## Number of observations per group:
## 1 90
## 2 190
## 3 250
## Number of missing patterns per group:
## 1 1
## 2 1
## 3 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 2.257 48.158
## Degrees of freedom 6 6
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.048
## Shift parameter for each group:
## 1 0.151
## 2 0.320
## 3 0.421
## simple second-order correction
## Test statistic for each group:
## 1 1.200 25.281
## 2 0.218 4.890
## 3 0.839 17.986
##
## Model Test Baseline Model:
##
## Test statistic 2009.846 8858.756
## Degrees of freedom 18 18
## P-value NA 0.000
## Scaling correction factor 0.227
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 0.995
## Tucker-Lewis Index (TLI) 1.006 0.986
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.200
## 90 Percent confidence interval - lower 0.000 0.150
## 90 Percent confidence interval - upper 0.044 0.254
## P-value RMSEA <= 0.05 0.960 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.019 0.019
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 3.657 0.965
## AEC02 0.721 0.182 3.965 0.000 2.636 0.935
## AEC03 0.321 0.076 4.227 0.000 1.174 0.761
## AEC01 0.538 0.122 4.407 0.000 1.969 0.892
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.953 1.763 -3.944 0.000 -6.953 -1.834
## AEC04|t2 -4.628 1.047 -4.418 0.000 -4.628 -1.221
## AEC04|t3 -1.070 0.475 -2.254 0.024 -1.070 -0.282
## AEC04|t4 1.868 0.646 2.891 0.004 1.868 0.493
## AEC04|t5 4.859 1.040 4.671 0.000 4.859 1.282
## AEC04|t6 5.691 1.141 4.986 0.000 5.691 1.501
## AEC02|t1 -5.666 0.996 -5.686 0.000 -5.666 -2.010
## AEC02|t2 -3.613 0.640 -5.643 0.000 -3.613 -1.282
## AEC02|t3 -1.569 0.424 -3.700 0.000 -1.569 -0.557
## AEC02|t4 1.044 0.401 2.602 0.009 1.044 0.370
## AEC02|t5 2.727 0.459 5.939 0.000 2.727 0.967
## AEC02|t6 4.232 0.415 10.206 0.000 4.232 1.501
## AEC03|t1 -2.624 0.268 -9.789 0.000 -2.624 -1.701
## AEC03|t2 -1.977 0.225 -8.792 0.000 -1.977 -1.282
## AEC03|t3 -0.303 0.207 -1.459 0.144 -0.303 -0.196
## AEC03|t4 0.809 0.209 3.879 0.000 0.809 0.524
## AEC03|t5 1.636 0.245 6.676 0.000 1.636 1.061
## AEC03|t6 2.079 0.278 7.478 0.000 2.079 1.348
## AEC01|t1 -4.439 0.653 -6.801 0.000 -4.439 -2.010
## AEC01|t2 -2.237 0.353 -6.329 0.000 -2.237 -1.013
## AEC01|t3 -0.752 0.299 -2.513 0.012 -0.752 -0.341
## AEC01|t4 1.019 0.310 3.286 0.001 1.019 0.461
## AEC01|t5 2.696 0.376 7.166 0.000 2.696 1.221
## AEC01|t6 3.757 0.404 9.305 0.000 3.757 1.701
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.070
## .AEC02 1.000 1.000 0.126
## .AEC03 1.000 1.000 0.420
## .AEC01 1.000 1.000 0.205
## AEC 13.374 5.839 2.291 0.022 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.264 0.264 1.000
## AEC02 0.355 0.355 1.000
## AEC03 0.648 0.648 1.000
## AEC01 0.453 0.453 1.000
##
## R-Square:
## Estimate
## AEC04 0.930
## AEC02 0.874
## AEC03 0.580
## AEC01 0.795
##
##
## Group 2 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 1.926 0.978
## AEC02 0.884 0.211 4.184 0.000 1.703 0.922
## AEC03 0.344 0.081 4.242 0.000 0.662 0.777
## AEC01 0.688 0.151 4.552 0.000 1.326 0.864
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC -1.916 1.506 -1.272 0.203 -0.995 -0.995
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.953 1.763 -3.944 0.000 -6.953 -3.531
## AEC04|t2 -4.628 1.047 -4.418 0.000 -4.628 -2.350
## AEC04|t3 -3.163 1.101 -2.874 0.004 -3.163 -1.606
## AEC04|t4 -1.309 1.759 -0.744 0.457 -1.309 -0.665
## AEC04|t5 0.103 2.420 0.043 0.966 0.103 0.052
## AEC04|t6 1.095 2.915 0.376 0.707 1.095 0.556
## AEC02|t1 -5.666 0.996 -5.686 0.000 -5.666 -3.066
## AEC02|t2 -4.443 0.809 -5.491 0.000 -4.443 -2.404
## AEC02|t3 -3.082 0.936 -3.294 0.001 -3.082 -1.668
## AEC02|t4 -1.099 1.629 -0.674 0.500 -1.099 -0.594
## AEC02|t5 0.201 2.181 0.092 0.927 0.201 0.109
## AEC02|t6 1.131 2.594 0.436 0.663 1.131 0.612
## AEC03|t1 -2.624 0.268 -9.789 0.000 -2.624 -3.080
## AEC03|t2 -1.725 0.304 -5.675 0.000 -1.725 -2.025
## AEC03|t3 -1.017 0.478 -2.126 0.034 -1.017 -1.194
## AEC03|t4 -0.336 0.699 -0.480 0.631 -0.336 -0.394
## AEC03|t5 0.274 0.910 0.301 0.763 0.274 0.322
## AEC03|t6 0.644 1.043 0.618 0.537 0.644 0.756
## AEC01|t1 -4.439 0.653 -6.801 0.000 -4.439 -2.892
## AEC01|t2 -3.433 0.536 -6.407 0.000 -3.433 -2.237
## AEC01|t3 -2.267 0.741 -3.061 0.002 -2.267 -1.477
## AEC01|t4 -0.443 1.442 -0.308 0.758 -0.443 -0.289
## AEC01|t5 0.517 1.853 0.279 0.780 0.517 0.337
## AEC01|t6 1.028 2.077 0.495 0.621 1.028 0.670
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.168 0.190 0.885 0.376 0.168 0.043
## .AEC02 0.515 0.477 1.080 0.280 0.515 0.151
## .AEC03 0.288 0.211 1.364 0.173 0.288 0.397
## .AEC01 0.598 0.532 1.123 0.261 0.598 0.254
## AEC 3.709 3.975 0.933 0.351 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.508 0.508 1.000
## AEC02 0.541 0.541 1.000
## AEC03 1.174 1.174 1.000
## AEC01 0.651 0.651 1.000
##
## R-Square:
## Estimate
## AEC04 0.957
## AEC02 0.849
## AEC03 0.603
## AEC01 0.746
##
##
## Group 3 [3]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.139 0.978
## AEC02 0.847 0.204 4.148 0.000 1.810 0.929
## AEC03 0.334 0.082 4.071 0.000 0.714 0.769
## AEC01 0.690 0.151 4.577 0.000 1.475 0.914
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC -1.151 1.874 -0.614 0.539 -0.538 -0.538
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.953 1.763 -3.944 0.000 -6.953 -3.178
## AEC04|t2 -4.628 1.047 -4.418 0.000 -4.628 -2.115
## AEC04|t3 -2.640 1.266 -2.085 0.037 -2.640 -1.207
## AEC04|t4 -0.272 2.291 -0.119 0.905 -0.272 -0.125
## AEC04|t5 1.509 3.196 0.472 0.637 1.509 0.690
## AEC04|t6 2.179 3.548 0.614 0.539 2.179 0.996
## AEC02|t1 -5.666 0.996 -5.686 0.000 -5.666 -2.909
## AEC02|t2 -4.217 0.810 -5.204 0.000 -4.217 -2.165
## AEC02|t3 -2.976 0.938 -3.173 0.002 -2.976 -1.528
## AEC02|t4 -0.318 1.918 -0.166 0.868 -0.318 -0.163
## AEC02|t5 1.130 2.553 0.443 0.658 1.130 0.580
## AEC02|t6 1.711 2.815 0.608 0.543 1.711 0.878
## AEC03|t1 -2.624 0.268 -9.789 0.000 -2.624 -2.822
## AEC03|t2 -1.620 0.324 -5.003 0.000 -1.620 -1.742
## AEC03|t3 -0.861 0.524 -1.643 0.100 -0.861 -0.927
## AEC03|t4 0.040 0.825 0.048 0.961 0.040 0.043
## AEC03|t5 0.851 1.116 0.762 0.446 0.851 0.915
## AEC03|t6 1.163 1.231 0.945 0.345 1.163 1.251
## AEC01|t1 -4.439 0.653 -6.801 0.000 -4.439 -2.749
## AEC01|t2 -3.107 0.561 -5.538 0.000 -3.107 -1.924
## AEC01|t3 -1.893 0.892 -2.122 0.034 -1.893 -1.173
## AEC01|t4 -0.128 1.620 -0.079 0.937 -0.128 -0.079
## AEC01|t5 1.136 2.183 0.520 0.603 1.136 0.703
## AEC01|t6 1.565 2.379 0.658 0.511 1.565 0.969
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.212 0.236 0.900 0.368 0.212 0.044
## .AEC02 0.516 0.488 1.057 0.290 0.516 0.136
## .AEC03 0.354 0.264 1.341 0.180 0.354 0.409
## .AEC01 0.430 0.405 1.064 0.287 0.430 0.165
## AEC 4.574 5.011 0.913 0.361 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.457 0.457 1.000
## AEC02 0.513 0.513 1.000
## AEC03 1.076 1.076 1.000
## AEC01 0.619 0.619 1.000
##
## R-Square:
## Estimate
## AEC04 0.956
## AEC02 0.864
## AEC03 0.591
## AEC01 0.835
lavaan::fitMeasures(invariance$fit.configural,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 48.158 6.000 NA
## srmr cfi.scaled tli.scaled
## 0.019 0.995 0.986
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.200 0.150 0.254
modificationindices(invariance$fit.configural, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 141 AEC02 ~~ AEC01 1 1 1 1.185 1.329 1.329 1.329 1.329
## 138 AEC04 ~~ AEC03 1 1 1 1.185 1.099 1.099 1.099 1.099
## 151 AEC04 ~~ AEC01 3 3 1 0.754 -0.380 -0.380 -1.258 -1.258
## 152 AEC02 ~~ AEC03 3 3 1 0.754 -0.156 -0.156 -0.365 -0.365
## 150 AEC04 ~~ AEC03 3 3 1 0.468 0.144 0.144 0.527 0.527
## 153 AEC02 ~~ AEC01 3 3 1 0.468 0.252 0.252 0.535 0.535
## 139 AEC04 ~~ AEC01 1 1 1 0.339 -0.988 -0.988 -0.988 -0.988
## 140 AEC02 ~~ AEC03 1 1 1 0.339 -0.425 -0.425 -0.425 -0.425
## 142 AEC03 ~~ AEC01 1 1 1 0.262 -0.281 -0.281 -0.281 -0.281
## 137 AEC04 ~~ AEC02 1 1 1 0.262 -1.170 -1.170 -1.170 -1.170
## 146 AEC02 ~~ AEC03 2 2 1 0.201 -0.082 -0.082 -0.214 -0.214
## 145 AEC04 ~~ AEC01 2 2 1 0.201 -0.187 -0.187 -0.588 -0.588
## 143 AEC04 ~~ AEC02 2 2 1 0.109 0.178 0.178 0.605 0.605
## 148 AEC03 ~~ AEC01 2 2 1 0.109 0.048 0.048 0.115 0.115
## 149 AEC04 ~~ AEC02 3 3 1 0.033 0.098 0.098 0.296 0.296
## 154 AEC03 ~~ AEC01 3 3 1 0.033 0.027 0.027 0.068 0.068
## 144 AEC04 ~~ AEC03 2 2 1 0.014 0.025 0.025 0.113 0.113
## 147 AEC02 ~~ AEC01 2 2 1 0.014 0.044 0.044 0.079 0.079
semTools::reliability(invariance$fit.configural)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`1`
## AEC
## alpha 0.9251
## alpha.ord 0.9365
## omega 0.9198
## omega2 0.9198
## omega3 0.9198
## avevar 0.8648
##
## $`2`
## AEC
## alpha 0.9191
## alpha.ord 0.9347
## omega 0.9134
## omega2 0.9134
## omega3 0.9133
## avevar 0.8487
##
## $`3`
## AEC
## alpha 0.9327
## alpha.ord 0.9423
## omega 0.9233
## omega2 0.9233
## omega3 0.9232
## avevar 0.8745
summary(invariance$fit.loadings,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 363 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 94
## Number of equality constraints 16
##
## Number of observations per group:
## 1 90
## 2 190
## 3 250
## Number of missing patterns per group:
## 1 1
## 2 1
## 3 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 5.353 11.559
## Degrees of freedom 12 12
## P-value (Unknown) NA 0.482
## Scaling correction factor 0.602
## Shift parameter for each group:
## 1 0.453
## 2 0.957
## 3 1.259
## simple second-order correction
## Test statistic for each group:
## 1 3.739 6.662
## 2 0.525 1.828
## 3 1.089 3.069
##
## Model Test Baseline Model:
##
## Test statistic 2009.846 8858.756
## Degrees of freedom 18 18
## P-value NA 0.000
## Scaling correction factor 0.227
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 1.000
## Tucker-Lewis Index (TLI) 1.005 1.000
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.000
## 90 Percent confidence interval - lower 0.000 0.000
## 90 Percent confidence interval - upper 0.012 0.075
## P-value RMSEA <= 0.05 0.990 0.797
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.025 0.025
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 1.854 0.880
## AEC02 2.238 1.664 1.345 0.179 4.150 0.972
## AEC03 0.564 0.161 3.500 0.000 1.045 0.723
## AEC01 2.093 1.471 1.423 0.155 3.881 0.968
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -3.951 0.872 -4.533 0.000 -3.951 -1.876
## AEC04|t2 -2.614 0.589 -4.440 0.000 -2.614 -1.241
## AEC04|t3 -0.595 0.296 -2.005 0.045 -0.595 -0.282
## AEC04|t4 1.038 0.338 3.073 0.002 1.038 0.493
## AEC04|t5 2.700 0.569 4.745 0.000 2.700 1.282
## AEC04|t6 3.162 0.645 4.901 0.000 3.162 1.501
## AEC02|t1 -8.479 5.547 -1.529 0.126 -8.479 -1.986
## AEC02|t2 -5.471 3.324 -1.646 0.100 -5.471 -1.282
## AEC02|t3 -2.376 1.485 -1.600 0.110 -2.376 -0.557
## AEC02|t4 1.581 1.101 1.436 0.151 1.581 0.370
## AEC02|t5 4.130 2.464 1.676 0.094 4.130 0.967
## AEC02|t6 6.408 3.656 1.753 0.080 6.408 1.501
## AEC03|t1 -2.501 0.336 -7.444 0.000 -2.501 -1.729
## AEC03|t2 -1.854 0.288 -6.429 0.000 -1.854 -1.282
## AEC03|t3 -0.284 0.196 -1.452 0.147 -0.284 -0.196
## AEC03|t4 0.759 0.202 3.749 0.000 0.759 0.524
## AEC03|t5 1.534 0.249 6.158 0.000 1.534 1.061
## AEC03|t6 1.950 0.287 6.791 0.000 1.950 1.348
## AEC01|t1 -7.843 4.663 -1.682 0.093 -7.843 -1.957
## AEC01|t2 -4.059 2.238 -1.814 0.070 -4.059 -1.013
## AEC01|t3 -1.365 0.873 -1.564 0.118 -1.365 -0.341
## AEC01|t4 1.850 1.114 1.660 0.097 1.850 0.461
## AEC01|t5 4.892 2.570 1.903 0.057 4.892 1.221
## AEC01|t6 6.818 3.432 1.986 0.047 6.818 1.701
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.225
## .AEC02 1.000 1.000 0.055
## .AEC03 1.000 1.000 0.478
## .AEC01 1.000 1.000 0.062
## AEC 3.438 1.579 2.177 0.029 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.475 0.475 1.000
## AEC02 0.234 0.234 1.000
## AEC03 0.691 0.691 1.000
## AEC01 0.250 0.250 1.000
##
## R-Square:
## Estimate
## AEC04 0.775
## AEC02 0.945
## AEC03 0.522
## AEC01 0.938
##
##
## Group 2 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 1.143 1.001
## AEC02 2.238 1.664 1.345 0.179 2.558 0.901
## AEC03 0.564 0.161 3.500 0.000 0.644 0.777
## AEC01 2.093 1.471 1.423 0.155 2.392 0.860
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC -1.044 0.814 -1.283 0.199 -0.914 -0.914
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -3.951 0.872 -4.533 0.000 -3.951 -3.463
## AEC04|t2 -2.614 0.589 -4.440 0.000 -2.614 -2.291
## AEC04|t3 -1.767 0.617 -2.863 0.004 -1.767 -1.549
## AEC04|t4 -0.693 0.939 -0.737 0.461 -0.693 -0.607
## AEC04|t5 0.126 1.273 0.099 0.921 0.126 0.110
## AEC04|t6 0.700 1.527 0.458 0.647 0.700 0.614
## AEC02|t1 -8.479 5.547 -1.529 0.126 -8.479 -2.985
## AEC02|t2 -6.563 4.279 -1.534 0.125 -6.563 -2.311
## AEC02|t3 -4.470 2.974 -1.503 0.133 -4.470 -1.574
## AEC02|t4 -1.423 2.229 -0.638 0.523 -1.423 -0.501
## AEC02|t5 0.574 2.991 0.192 0.848 0.574 0.202
## AEC02|t6 2.005 3.874 0.517 0.605 2.005 0.706
## AEC03|t1 -2.501 0.336 -7.444 0.000 -2.501 -3.017
## AEC03|t2 -1.627 0.302 -5.387 0.000 -1.627 -1.962
## AEC03|t3 -0.938 0.411 -2.279 0.023 -0.938 -1.131
## AEC03|t4 -0.275 0.594 -0.464 0.643 -0.275 -0.332
## AEC03|t5 0.319 0.778 0.409 0.682 0.319 0.384
## AEC03|t6 0.678 0.898 0.756 0.450 0.678 0.819
## AEC01|t1 -7.843 4.663 -1.682 0.093 -7.843 -2.820
## AEC01|t2 -6.016 3.553 -1.693 0.090 -6.016 -2.163
## AEC01|t3 -3.903 2.382 -1.639 0.101 -3.903 -1.404
## AEC01|t4 -0.600 2.255 -0.266 0.790 -0.600 -0.216
## AEC01|t5 1.141 3.149 0.362 0.717 1.141 0.410
## AEC01|t6 2.066 3.735 0.553 0.580 2.066 0.743
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 -0.004 0.108 -0.035 0.972 -0.004 -0.003
## .AEC02 1.524 2.551 0.597 0.550 1.524 0.189
## .AEC03 0.272 0.192 1.414 0.157 0.272 0.396
## .AEC01 2.013 3.175 0.634 0.526 2.013 0.260
## AEC 1.306 1.220 1.070 0.284 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.876 0.876 1.000
## AEC02 0.352 0.352 1.000
## AEC03 1.206 1.206 1.000
## AEC01 0.360 0.360 1.000
##
## R-Square:
## Estimate
## AEC04 NA
## AEC02 0.811
## AEC03 0.604
## AEC01 0.740
##
##
## Group 3 [3]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 1.232 0.982
## AEC02 2.238 1.664 1.345 0.179 2.758 0.936
## AEC03 0.564 0.161 3.500 0.000 0.695 0.777
## AEC01 2.093 1.471 1.423 0.155 2.579 0.895
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC -0.623 0.981 -0.635 0.526 -0.505 -0.505
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -3.951 0.872 -4.533 0.000 -3.951 -3.148
## AEC04|t2 -2.614 0.589 -4.440 0.000 -2.614 -2.083
## AEC04|t3 -1.477 0.687 -2.150 0.032 -1.477 -1.177
## AEC04|t4 -0.119 1.189 -0.100 0.920 -0.119 -0.095
## AEC04|t5 0.903 1.646 0.549 0.583 0.903 0.720
## AEC04|t6 1.287 1.824 0.706 0.480 1.287 1.026
## AEC02|t1 -8.479 5.547 -1.529 0.126 -8.479 -2.878
## AEC02|t2 -6.298 4.141 -1.521 0.128 -6.298 -2.138
## AEC02|t3 -4.422 2.962 -1.493 0.135 -4.422 -1.501
## AEC02|t4 -0.401 2.579 -0.155 0.877 -0.401 -0.136
## AEC02|t5 1.789 3.821 0.468 0.640 1.789 0.607
## AEC02|t6 2.668 4.428 0.603 0.547 2.668 0.906
## AEC03|t1 -2.501 0.336 -7.444 0.000 -2.501 -2.796
## AEC03|t2 -1.539 0.315 -4.881 0.000 -1.539 -1.721
## AEC03|t3 -0.810 0.455 -1.781 0.075 -0.810 -0.906
## AEC03|t4 0.057 0.712 0.080 0.936 0.057 0.064
## AEC03|t5 0.837 0.971 0.862 0.389 0.837 0.936
## AEC03|t6 1.138 1.075 1.058 0.290 1.138 1.272
## AEC01|t1 -7.843 4.663 -1.682 0.093 -7.843 -2.722
## AEC01|t2 -5.432 3.165 -1.716 0.086 -5.432 -1.885
## AEC01|t3 -3.266 2.140 -1.526 0.127 -3.266 -1.133
## AEC01|t4 -0.115 2.530 -0.045 0.964 -0.115 -0.040
## AEC01|t5 2.141 3.853 0.556 0.578 2.141 0.743
## AEC01|t6 2.907 4.370 0.665 0.506 2.907 1.009
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.057 0.137 0.416 0.678 0.057 0.036
## .AEC02 1.074 1.863 0.576 0.564 1.074 0.124
## .AEC03 0.317 0.225 1.411 0.158 0.317 0.397
## .AEC01 1.654 2.541 0.651 0.515 1.654 0.199
## AEC 1.518 1.452 1.045 0.296 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.797 0.797 1.000
## AEC02 0.339 0.339 1.000
## AEC03 1.118 1.118 1.000
## AEC01 0.347 0.347 1.000
##
## R-Square:
## Estimate
## AEC04 0.964
## AEC02 0.876
## AEC03 0.603
## AEC01 0.801
lavaan::fitMeasures(invariance$fit.loadings,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 11.559 12.000 NA
## srmr cfi.scaled tli.scaled
## 0.025 1.000 1.000
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.000 0.000 0.075
modificationindices(invariance$fit.loadings, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 144 AEC04 ~~ AEC03 1 1 1 3.347 0.677 0.677 0.677 0.677
## 38 AEC04 ~1 1 1 1 1.837 -0.703 -0.703 -0.334 -0.334
## 34 AEC04 ~*~ AEC04 1 1 1 1.508 -0.078 -0.078 -1.000 -1.000
## 1 AEC =~ AEC04 1 1 1 1.508 0.164 0.304 0.144 0.144
## 37 AEC01 ~*~ AEC01 1 1 1 1.504 0.041 0.041 1.000 1.000
## 41 AEC01 ~1 1 1 1 1.504 1.283 1.283 0.320 0.320
## 158 AEC02 ~~ AEC03 3 3 1 0.961 -0.212 -0.212 -0.363 -0.363
## 159 AEC02 ~~ AEC01 3 3 1 0.569 0.555 0.555 0.416 0.416
## 121 AEC01 ~*~ AEC01 3 3 1 0.447 -0.023 -0.023 -1.000 -1.000
## 125 AEC01 ~1 3 3 1 0.447 -0.425 -0.425 -0.148 -0.148
## 80 AEC04 ~1 2 2 1 0.425 0.207 0.207 0.182 0.182
## 151 AEC04 ~~ AEC01 2 2 1 0.423 -0.211 -0.211 -2.407 -2.407
## 148 AEC03 ~~ AEC01 1 1 1 0.404 -0.464 -0.464 -0.464 -0.464
## 43 AEC =~ AEC04 2 2 1 0.398 -0.052 -0.059 -0.052 -0.052
## 76 AEC04 ~*~ AEC04 2 2 1 0.384 0.060 0.060 1.000 1.000
## 36 AEC03 ~*~ AEC03 1 1 1 0.368 -0.061 -0.061 -1.000 -1.000
## 40 AEC03 ~1 1 1 1 0.368 -0.219 -0.219 -0.151 -0.151
## 81 AEC02 ~1 2 2 1 0.336 -0.400 -0.400 -0.141 -0.141
## 77 AEC02 ~*~ AEC02 2 2 1 0.336 -0.023 -0.023 -1.000 -1.000
## 39 AEC02 ~1 1 1 1 0.310 0.628 0.628 0.147 0.147
## 35 AEC02 ~*~ AEC02 1 1 1 0.310 0.017 0.017 1.000 1.000
## 147 AEC02 ~~ AEC01 1 1 1 0.307 -1.302 -1.302 -1.302 -1.302
## 153 AEC02 ~~ AEC01 2 2 1 0.231 0.366 0.366 0.209 0.209
## 146 AEC02 ~~ AEC03 1 1 1 0.111 -0.260 -0.260 -0.260 -0.260
## 124 AEC03 ~1 3 3 1 0.110 0.072 0.072 0.081 0.081
## 120 AEC03 ~*~ AEC03 3 3 1 0.110 0.037 0.037 1.000 1.000
## 154 AEC03 ~~ AEC01 2 2 1 0.100 0.066 0.066 0.089 0.089
## 156 AEC04 ~~ AEC03 3 3 1 0.099 0.029 0.029 0.218 0.218
## 157 AEC04 ~~ AEC01 3 3 1 0.090 -0.097 -0.097 -0.317 -0.317
## 145 AEC04 ~~ AEC01 1 1 1 0.085 -0.330 -0.330 -0.330 -0.330
## 160 AEC03 ~~ AEC01 3 3 1 0.085 0.060 0.060 0.083 0.083
## 150 AEC04 ~~ AEC03 2 2 1 0.062 -0.023 -0.023 -0.708 -0.708
## 123 AEC02 ~1 3 3 1 0.056 0.163 0.163 0.055 0.055
## 119 AEC02 ~*~ AEC02 3 3 1 0.056 0.008 0.008 1.000 1.000
## 143 AEC04 ~~ AEC02 1 1 1 0.053 0.276 0.276 0.276 0.276
## 149 AEC04 ~~ AEC02 2 2 1 0.049 0.075 0.075 0.983 0.983
## 122 AEC04 ~1 3 3 1 0.031 0.056 0.056 0.044 0.044
## 85 AEC =~ AEC04 3 3 1 0.014 -0.010 -0.012 -0.010 -0.010
## 118 AEC04 ~*~ AEC04 3 3 1 0.012 0.008 0.008 1.000 1.000
## 155 AEC04 ~~ AEC02 3 3 1 0.011 -0.036 -0.036 -0.144 -0.144
## 152 AEC02 ~~ AEC03 2 2 1 0.006 -0.018 -0.018 -0.027 -0.027
## 83 AEC01 ~1 2 2 1 0.006 -0.050 -0.050 -0.018 -0.018
## 79 AEC01 ~*~ AEC01 2 2 1 0.006 -0.003 -0.003 -1.000 -1.000
## 78 AEC03 ~*~ AEC03 2 2 1 0.001 0.004 0.004 1.000 1.000
## 82 AEC03 ~1 2 2 1 0.001 0.007 0.007 0.009 0.009
semTools::reliability(invariance$fit.loadings)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`1`
## AEC
## alpha 0.9251
## alpha.ord 0.9365
## omega 0.9193
## omega2 0.9193
## omega3 0.9145
## avevar 0.9020
##
## $`2`
## AEC
## alpha 0.9191
## alpha.ord 0.9347
## omega 0.9175
## omega2 0.9175
## omega3 0.9170
## avevar 0.7861
##
## $`3`
## AEC
## alpha 0.9327
## alpha.ord 0.9423
## omega 0.9233
## omega2 0.9233
## omega3 0.9231
## avevar 0.8398
summary(invariance$fit.thresholds,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 200 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 94
## Number of equality constraints 54
##
## Number of observations per group:
## 1 90
## 2 190
## 3 250
## Number of missing patterns per group:
## 1 1
## 2 1
## 3 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 60.295 42.772
## Degrees of freedom 50 50
## P-value (Unknown) NA 0.756
## Scaling correction factor 2.735
## Shift parameter for each group:
## 1 3.520
## 2 7.431
## 3 9.778
## simple second-order correction
## Test statistic for each group:
## 1 28.927 14.095
## 2 18.803 14.305
## 3 12.565 14.372
##
## Model Test Baseline Model:
##
## Test statistic 2009.846 8858.756
## Degrees of freedom 18 18
## P-value NA 0.000
## Scaling correction factor 0.227
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.995 1.000
## Tucker-Lewis Index (TLI) 0.998 1.000
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.034 0.000
## 90 Percent confidence interval - lower 0.000 0.000
## 90 Percent confidence interval - upper 0.062 0.036
## P-value RMSEA <= 0.05 0.799 0.992
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.025 0.025
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.822 0.943
## AEC02 0.997 0.452 2.206 0.027 2.814 0.942
## AEC03 0.366 0.126 2.894 0.004 1.033 0.718
## AEC01 1.010 0.522 1.935 0.053 2.851 0.944
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.005 1.843 -3.259 0.001 -6.005 -2.006
## AEC04|t2 -3.328 1.140 -2.919 0.004 -3.328 -1.111
## AEC04|t3 -1.127 0.513 -2.197 0.028 -1.127 -0.377
## AEC04|t4 1.416 0.559 2.533 0.011 1.416 0.473
## AEC04|t5 3.415 1.145 2.983 0.003 3.415 1.141
## AEC04|t6 4.353 1.423 3.059 0.002 4.353 1.454
## AEC02|t1 -5.732 1.461 -3.924 0.000 -5.732 -1.920
## AEC02|t2 -3.786 1.019 -3.714 0.000 -3.786 -1.268
## AEC02|t3 -1.917 0.622 -3.080 0.002 -1.917 -0.642
## AEC02|t4 1.344 0.423 3.180 0.001 1.344 0.450
## AEC02|t5 3.272 0.780 4.196 0.000 3.272 1.096
## AEC02|t6 4.381 1.019 4.298 0.000 4.381 1.467
## AEC03|t1 -2.583 0.255 -10.114 0.000 -2.583 -1.797
## AEC03|t2 -1.404 0.180 -7.801 0.000 -1.404 -0.976
## AEC03|t3 -0.366 0.134 -2.721 0.007 -0.366 -0.254
## AEC03|t4 0.689 0.155 4.447 0.000 0.689 0.480
## AEC03|t5 1.618 0.212 7.641 0.000 1.618 1.125
## AEC03|t6 2.057 0.246 8.346 0.000 2.057 1.431
## AEC01|t1 -5.711 1.525 -3.746 0.000 -5.711 -1.890
## AEC01|t2 -3.437 0.968 -3.550 0.000 -3.437 -1.138
## AEC01|t3 -1.309 0.506 -2.587 0.010 -1.309 -0.433
## AEC01|t4 1.790 0.541 3.306 0.001 1.790 0.592
## AEC01|t5 3.866 1.016 3.807 0.000 3.866 1.280
## AEC01|t6 4.795 1.250 3.836 0.000 4.795 1.587
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.112
## .AEC02 1.000 1.000 0.112
## .AEC03 1.000 1.000 0.484
## .AEC01 1.000 1.000 0.110
## AEC 7.964 5.379 1.481 0.139 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.334 0.334 1.000
## AEC02 0.335 0.335 1.000
## AEC03 0.696 0.696 1.000
## AEC01 0.331 0.331 1.000
##
## R-Square:
## Estimate
## AEC04 0.888
## AEC02 0.888
## AEC03 0.516
## AEC01 0.890
##
##
## Group 2 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.557 0.982
## AEC02 0.997 0.452 2.206 0.027 2.549 0.909
## AEC03 0.366 0.126 2.894 0.004 0.935 0.762
## AEC01 1.010 0.522 1.935 0.053 2.583 0.886
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.429 0.408 1.051 0.293 0.168 0.168
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.005 1.843 -3.259 0.001 -6.005 -2.307
## AEC04|t2 -3.328 1.140 -2.919 0.004 -3.328 -1.278
## AEC04|t3 -1.127 0.513 -2.197 0.028 -1.127 -0.433
## AEC04|t4 1.416 0.559 2.533 0.011 1.416 0.544
## AEC04|t5 3.415 1.145 2.983 0.003 3.415 1.312
## AEC04|t6 4.353 1.423 3.059 0.002 4.353 1.672
## AEC02|t1 -5.732 1.461 -3.924 0.000 -5.732 -2.044
## AEC02|t2 -3.786 1.019 -3.714 0.000 -3.786 -1.350
## AEC02|t3 -1.917 0.622 -3.080 0.002 -1.917 -0.683
## AEC02|t4 1.344 0.423 3.180 0.001 1.344 0.479
## AEC02|t5 3.272 0.780 4.196 0.000 3.272 1.167
## AEC02|t6 4.381 1.019 4.298 0.000 4.381 1.562
## AEC03|t1 -2.583 0.255 -10.114 0.000 -2.583 -2.104
## AEC03|t2 -1.404 0.180 -7.801 0.000 -1.404 -1.143
## AEC03|t3 -0.366 0.134 -2.721 0.007 -0.366 -0.298
## AEC03|t4 0.689 0.155 4.447 0.000 0.689 0.561
## AEC03|t5 1.618 0.212 7.641 0.000 1.618 1.317
## AEC03|t6 2.057 0.246 8.346 0.000 2.057 1.675
## AEC01|t1 -5.711 1.525 -3.746 0.000 -5.711 -1.960
## AEC01|t2 -3.437 0.968 -3.550 0.000 -3.437 -1.180
## AEC01|t3 -1.309 0.506 -2.587 0.010 -1.309 -0.449
## AEC01|t4 1.790 0.541 3.306 0.001 1.790 0.614
## AEC01|t5 3.866 1.016 3.807 0.000 3.866 1.327
## AEC01|t6 4.795 1.250 3.836 0.000 4.795 1.646
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.241 0.437 0.552 0.581 0.241 0.036
## .AEC02 1.371 0.838 1.636 0.102 1.371 0.174
## .AEC03 0.633 0.171 3.708 0.000 0.633 0.420
## .AEC01 1.818 1.151 1.579 0.114 1.818 0.214
## AEC 6.537 4.239 1.542 0.123 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.384 0.384 1.000
## AEC02 0.357 0.357 1.000
## AEC03 0.814 0.814 1.000
## AEC01 0.343 0.343 1.000
##
## R-Square:
## Estimate
## AEC04 0.964
## AEC02 0.826
## AEC03 0.580
## AEC01 0.786
##
##
## Group 3 [3]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.439 0.993
## AEC02 0.997 0.452 2.206 0.027 2.432 0.932
## AEC03 0.366 0.126 2.894 0.004 0.893 0.781
## AEC01 1.010 0.522 1.935 0.053 2.464 0.883
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.540 0.409 1.322 0.186 0.222 0.222
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -6.005 1.843 -3.259 0.001 -6.005 -2.444
## AEC04|t2 -3.328 1.140 -2.919 0.004 -3.328 -1.354
## AEC04|t3 -1.127 0.513 -2.197 0.028 -1.127 -0.459
## AEC04|t4 1.416 0.559 2.533 0.011 1.416 0.576
## AEC04|t5 3.415 1.145 2.983 0.003 3.415 1.390
## AEC04|t6 4.353 1.423 3.059 0.002 4.353 1.771
## AEC02|t1 -5.732 1.461 -3.924 0.000 -5.732 -2.198
## AEC02|t2 -3.786 1.019 -3.714 0.000 -3.786 -1.452
## AEC02|t3 -1.917 0.622 -3.080 0.002 -1.917 -0.735
## AEC02|t4 1.344 0.423 3.180 0.001 1.344 0.515
## AEC02|t5 3.272 0.780 4.196 0.000 3.272 1.255
## AEC02|t6 4.381 1.019 4.298 0.000 4.381 1.680
## AEC03|t1 -2.583 0.255 -10.114 0.000 -2.583 -2.262
## AEC03|t2 -1.404 0.180 -7.801 0.000 -1.404 -1.229
## AEC03|t3 -0.366 0.134 -2.721 0.007 -0.366 -0.320
## AEC03|t4 0.689 0.155 4.447 0.000 0.689 0.603
## AEC03|t5 1.618 0.212 7.641 0.000 1.618 1.416
## AEC03|t6 2.057 0.246 8.346 0.000 2.057 1.801
## AEC01|t1 -5.711 1.525 -3.746 0.000 -5.711 -2.046
## AEC01|t2 -3.437 0.968 -3.550 0.000 -3.437 -1.231
## AEC01|t3 -1.309 0.506 -2.587 0.010 -1.309 -0.469
## AEC01|t4 1.790 0.541 3.306 0.001 1.790 0.641
## AEC01|t5 3.866 1.016 3.807 0.000 3.866 1.385
## AEC01|t6 4.795 1.250 3.836 0.000 4.795 1.717
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.088 0.300 0.293 0.770 0.088 0.015
## .AEC02 0.888 0.526 1.688 0.091 0.888 0.130
## .AEC03 0.508 0.127 4.013 0.000 0.508 0.389
## .AEC01 1.722 0.934 1.844 0.065 1.722 0.221
## AEC 5.951 3.845 1.548 0.122 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.407 0.407 1.000
## AEC02 0.383 0.383 1.000
## AEC03 0.875 0.875 1.000
## AEC01 0.358 0.358 1.000
##
## R-Square:
## Estimate
## AEC04 0.985
## AEC02 0.870
## AEC03 0.611
## AEC01 0.779
lavaan::fitMeasures(invariance$fit.thresholds,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 42.772 50.000 NA
## srmr cfi.scaled tli.scaled
## 0.025 1.000 1.000
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.000 0.000 0.036
modificationindices(invariance$fit.thresholds, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 124 AEC03 ~1 3 3 1 5.708 -0.115 -0.115 -0.101 -0.101
## 81 AEC02 ~1 2 2 1 4.955 -0.271 -0.271 -0.096 -0.096
## 80 AEC04 ~1 2 2 1 3.699 0.224 0.224 0.086 0.086
## 38 AEC04 ~1 1 1 1 3.190 -0.294 -0.294 -0.098 -0.098
## 82 AEC03 ~1 2 2 1 2.906 0.086 0.086 0.070 0.070
## 123 AEC02 ~1 3 3 1 2.119 0.169 0.169 0.065 0.065
## 182 AEC04 ~~ AEC03 1 1 1 1.907 0.719 0.719 0.719 0.719
## 125 AEC01 ~1 3 3 1 1.789 0.159 0.159 0.057 0.057
## 83 AEC01 ~1 2 2 1 1.734 -0.164 -0.164 -0.056 -0.056
## 40 AEC03 ~1 1 1 1 1.311 0.083 0.083 0.058 0.058
## 197 AEC02 ~~ AEC01 3 3 1 1.097 0.646 0.646 0.523 0.523
## 121 AEC01 ~*~ AEC01 3 3 1 1.081 -0.035 -0.035 -1.000 -1.000
## 196 AEC02 ~~ AEC03 3 3 1 0.985 -0.238 -0.238 -0.354 -0.354
## 39 AEC02 ~1 1 1 1 0.909 0.158 0.158 0.053 0.053
## 37 AEC01 ~*~ AEC01 1 1 1 0.670 0.034 0.034 1.000 1.000
## 189 AEC04 ~~ AEC01 2 2 1 0.602 -0.563 -0.563 -0.850 -0.850
## 183 AEC04 ~~ AEC01 1 1 1 0.518 -0.854 -0.854 -0.854 -0.854
## 36 AEC03 ~*~ AEC03 1 1 1 0.500 -0.065 -0.065 -1.000 -1.000
## 85 AEC =~ AEC04 3 3 1 0.477 -0.062 -0.151 -0.062 -0.062
## 122 AEC04 ~1 3 3 1 0.403 -0.071 -0.071 -0.029 -0.029
## 79 AEC01 ~*~ AEC01 2 2 1 0.382 0.021 0.021 1.000 1.000
## 43 AEC =~ AEC04 2 2 1 0.309 0.052 0.134 0.051 0.051
## 120 AEC03 ~*~ AEC03 3 3 1 0.239 0.041 0.041 1.000 1.000
## 118 AEC04 ~*~ AEC04 3 3 1 0.185 0.016 0.016 1.000 1.000
## 78 AEC03 ~*~ AEC03 2 2 1 0.183 -0.035 -0.035 -1.000 -1.000
## 198 AEC03 ~~ AEC01 3 3 1 0.154 0.099 0.099 0.105 0.105
## 187 AEC04 ~~ AEC02 2 2 1 0.143 0.267 0.267 0.464 0.464
## 186 AEC03 ~~ AEC01 1 1 1 0.141 -0.197 -0.197 -0.197 -0.197
## 77 AEC02 ~*~ AEC02 2 2 1 0.100 -0.011 -0.011 -1.000 -1.000
## 188 AEC04 ~~ AEC03 2 2 1 0.082 0.082 0.082 0.211 0.211
## 193 AEC04 ~~ AEC02 3 3 1 0.063 -0.144 -0.144 -0.517 -0.517
## 195 AEC04 ~~ AEC01 3 3 1 0.058 -0.145 -0.145 -0.372 -0.372
## 34 AEC04 ~*~ AEC04 1 1 1 0.052 -0.010 -0.010 -1.000 -1.000
## 1 AEC =~ AEC04 1 1 1 0.052 0.029 0.082 0.028 0.028
## 192 AEC03 ~~ AEC01 2 2 1 0.036 0.059 0.059 0.055 0.055
## 181 AEC04 ~~ AEC02 1 1 1 0.024 -0.180 -0.180 -0.180 -0.180
## 119 AEC02 ~*~ AEC02 3 3 1 0.017 0.005 0.005 1.000 1.000
## 76 AEC04 ~*~ AEC04 2 2 1 0.014 0.004 0.004 1.000 1.000
## 41 AEC01 ~1 1 1 1 0.012 -0.018 -0.018 -0.006 -0.006
## 35 AEC02 ~*~ AEC02 1 1 1 0.009 0.004 0.004 1.000 1.000
## 191 AEC02 ~~ AEC01 2 2 1 0.007 -0.061 -0.061 -0.039 -0.039
## 185 AEC02 ~~ AEC01 1 1 1 0.007 0.095 0.095 0.095 0.095
## 190 AEC02 ~~ AEC03 2 2 1 0.003 0.016 0.016 0.017 0.017
## 184 AEC02 ~~ AEC03 1 1 1 0.002 -0.022 -0.022 -0.022 -0.022
## 194 AEC04 ~~ AEC03 3 3 1 0.002 0.010 0.010 0.046 0.046
semTools::reliability(invariance$fit.thresholds)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`1`
## AEC
## alpha 0.9251
## alpha.ord 0.9365
## omega 0.9183
## omega2 0.9183
## omega3 0.9138
## avevar 0.8624
##
## $`2`
## AEC
## alpha 0.9191
## alpha.ord 0.9347
## omega 0.9169
## omega2 0.9169
## omega3 0.9162
## avevar 0.8351
##
## $`3`
## AEC
## alpha 0.9327
## alpha.ord 0.9423
## omega 0.9246
## omega2 0.9246
## omega3 0.9242
## avevar 0.8539
summary(invariance$fit.means,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 167 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 92
## Number of equality constraints 54
##
## Number of observations per group:
## 1 90
## 2 190
## 3 250
## Number of missing patterns per group:
## 1 1
## 2 1
## 3 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 108.205 47.965
## Degrees of freedom 52 52
## P-value (Unknown) NA 0.633
## Scaling correction factor 5.025
## Shift parameter for each group:
## 1 4.488
## 2 9.475
## 3 12.467
## simple second-order correction
## Test statistic for each group:
## 1 67.255 17.873
## 2 18.063 13.070
## 3 22.886 17.022
##
## Model Test Baseline Model:
##
## Test statistic 2009.846 8858.756
## Degrees of freedom 18 18
## P-value NA 0.000
## Scaling correction factor 0.227
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.972 1.000
## Tucker-Lewis Index (TLI) 0.990 1.000
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.078 0.000
## 90 Percent confidence interval - lower 0.057 0.000
## 90 Percent confidence interval - upper 0.099 0.042
## P-value RMSEA <= 0.05 0.015 0.984
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.025 0.025
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
##
## Group 1 [1]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.564 0.932
## AEC02 1.075 0.435 2.474 0.013 2.757 0.940
## AEC03 0.417 0.127 3.282 0.001 1.070 0.731
## AEC01 1.139 0.547 2.083 0.037 2.920 0.946
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -5.778 1.451 -3.982 0.000 -5.778 -2.099
## AEC04|t2 -3.375 0.929 -3.631 0.000 -3.375 -1.226
## AEC04|t3 -1.402 0.405 -3.466 0.001 -1.402 -0.510
## AEC04|t4 0.881 0.277 3.176 0.001 0.881 0.320
## AEC04|t5 2.673 0.756 3.533 0.000 2.673 0.971
## AEC04|t6 3.514 0.976 3.600 0.000 3.514 1.277
## AEC02|t1 -5.917 1.455 -4.066 0.000 -5.917 -2.018
## AEC02|t2 -4.048 1.002 -4.039 0.000 -4.048 -1.380
## AEC02|t3 -2.253 0.573 -3.929 0.000 -2.253 -0.768
## AEC02|t4 0.883 0.262 3.371 0.001 0.883 0.301
## AEC02|t5 2.736 0.687 3.982 0.000 2.736 0.933
## AEC02|t6 3.799 0.940 4.040 0.000 3.799 1.295
## AEC03|t1 -2.772 0.277 -10.011 0.000 -2.772 -1.893
## AEC03|t2 -1.580 0.173 -9.117 0.000 -1.580 -1.079
## AEC03|t3 -0.531 0.085 -6.280 0.000 -0.531 -0.363
## AEC03|t4 0.535 0.086 6.208 0.000 0.535 0.365
## AEC03|t5 1.473 0.163 9.044 0.000 1.473 1.006
## AEC03|t6 1.917 0.205 9.337 0.000 1.917 1.309
## AEC01|t1 -6.187 1.663 -3.721 0.000 -6.187 -2.004
## AEC01|t2 -3.896 1.057 -3.687 0.000 -3.896 -1.262
## AEC01|t3 -1.749 0.497 -3.518 0.000 -1.749 -0.567
## AEC01|t4 1.377 0.395 3.486 0.000 1.377 0.446
## AEC01|t5 3.471 0.946 3.670 0.000 3.471 1.124
## AEC01|t6 4.407 1.199 3.674 0.000 4.407 1.428
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 1.000 1.000 0.132
## .AEC02 1.000 1.000 0.116
## .AEC03 1.000 1.000 0.466
## .AEC01 1.000 1.000 0.105
## AEC 6.575 3.761 1.748 0.080 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.363 0.363 1.000
## AEC02 0.341 0.341 1.000
## AEC03 0.683 0.683 1.000
## AEC01 0.324 0.324 1.000
##
## R-Square:
## Estimate
## AEC04 0.868
## AEC02 0.884
## AEC03 0.534
## AEC01 0.895
##
##
## Group 2 [2]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.282 0.977
## AEC02 1.075 0.435 2.474 0.013 2.454 0.910
## AEC03 0.417 0.127 3.282 0.001 0.952 0.767
## AEC01 1.139 0.547 2.083 0.037 2.599 0.885
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -5.778 1.451 -3.982 0.000 -5.778 -2.475
## AEC04|t2 -3.375 0.929 -3.631 0.000 -3.375 -1.445
## AEC04|t3 -1.402 0.405 -3.466 0.001 -1.402 -0.601
## AEC04|t4 0.881 0.277 3.176 0.001 0.881 0.377
## AEC04|t5 2.673 0.756 3.533 0.000 2.673 1.145
## AEC04|t6 3.514 0.976 3.600 0.000 3.514 1.505
## AEC02|t1 -5.917 1.455 -4.066 0.000 -5.917 -2.195
## AEC02|t2 -4.048 1.002 -4.039 0.000 -4.048 -1.502
## AEC02|t3 -2.253 0.573 -3.929 0.000 -2.253 -0.836
## AEC02|t4 0.883 0.262 3.371 0.001 0.883 0.328
## AEC02|t5 2.736 0.687 3.982 0.000 2.736 1.015
## AEC02|t6 3.799 0.940 4.040 0.000 3.799 1.410
## AEC03|t1 -2.772 0.277 -10.011 0.000 -2.772 -2.232
## AEC03|t2 -1.580 0.173 -9.117 0.000 -1.580 -1.272
## AEC03|t3 -0.531 0.085 -6.280 0.000 -0.531 -0.428
## AEC03|t4 0.535 0.086 6.208 0.000 0.535 0.431
## AEC03|t5 1.473 0.163 9.044 0.000 1.473 1.186
## AEC03|t6 1.917 0.205 9.337 0.000 1.917 1.544
## AEC01|t1 -6.187 1.663 -3.721 0.000 -6.187 -2.107
## AEC01|t2 -3.896 1.057 -3.687 0.000 -3.896 -1.327
## AEC01|t3 -1.749 0.497 -3.518 0.000 -1.749 -0.596
## AEC01|t4 1.377 0.395 3.486 0.000 1.377 0.469
## AEC01|t5 3.471 0.946 3.670 0.000 3.471 1.182
## AEC01|t6 4.407 1.199 3.674 0.000 4.407 1.501
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.243 0.363 0.669 0.503 0.243 0.045
## .AEC02 1.244 0.786 1.583 0.113 1.244 0.171
## .AEC03 0.636 0.177 3.600 0.000 0.636 0.412
## .AEC01 1.869 1.227 1.523 0.128 1.869 0.217
## AEC 5.209 2.896 1.798 0.072 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.428 0.428 1.000
## AEC02 0.371 0.371 1.000
## AEC03 0.805 0.805 1.000
## AEC01 0.341 0.341 1.000
##
## R-Square:
## Estimate
## AEC04 0.955
## AEC02 0.829
## AEC03 0.588
## AEC01 0.783
##
##
## Group 3 [3]:
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC =~
## AEC04 1.000 2.168 0.989
## AEC02 1.075 0.435 2.474 0.013 2.331 0.935
## AEC03 0.417 0.127 3.282 0.001 0.904 0.785
## AEC01 1.139 0.547 2.083 0.037 2.469 0.880
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.000 0.000 0.000
## .AEC02 0.000 0.000 0.000
## .AEC03 0.000 0.000 0.000
## .AEC01 0.000 0.000 0.000
## AEC 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04|t1 -5.778 1.451 -3.982 0.000 -5.778 -2.636
## AEC04|t2 -3.375 0.929 -3.631 0.000 -3.375 -1.539
## AEC04|t3 -1.402 0.405 -3.466 0.001 -1.402 -0.640
## AEC04|t4 0.881 0.277 3.176 0.001 0.881 0.402
## AEC04|t5 2.673 0.756 3.533 0.000 2.673 1.219
## AEC04|t6 3.514 0.976 3.600 0.000 3.514 1.603
## AEC02|t1 -5.917 1.455 -4.066 0.000 -5.917 -2.375
## AEC02|t2 -4.048 1.002 -4.039 0.000 -4.048 -1.625
## AEC02|t3 -2.253 0.573 -3.929 0.000 -2.253 -0.904
## AEC02|t4 0.883 0.262 3.371 0.001 0.883 0.354
## AEC02|t5 2.736 0.687 3.982 0.000 2.736 1.098
## AEC02|t6 3.799 0.940 4.040 0.000 3.799 1.525
## AEC03|t1 -2.772 0.277 -10.011 0.000 -2.772 -2.408
## AEC03|t2 -1.580 0.173 -9.117 0.000 -1.580 -1.372
## AEC03|t3 -0.531 0.085 -6.280 0.000 -0.531 -0.461
## AEC03|t4 0.535 0.086 6.208 0.000 0.535 0.464
## AEC03|t5 1.473 0.163 9.044 0.000 1.473 1.279
## AEC03|t6 1.917 0.205 9.337 0.000 1.917 1.665
## AEC01|t1 -6.187 1.663 -3.721 0.000 -6.187 -2.205
## AEC01|t2 -3.896 1.057 -3.687 0.000 -3.896 -1.388
## AEC01|t3 -1.749 0.497 -3.518 0.000 -1.749 -0.623
## AEC01|t4 1.377 0.395 3.486 0.000 1.377 0.491
## AEC01|t5 3.471 0.946 3.670 0.000 3.471 1.237
## AEC01|t6 4.407 1.199 3.674 0.000 4.407 1.570
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEC04 0.107 0.234 0.457 0.647 0.107 0.022
## .AEC02 0.776 0.486 1.597 0.110 0.776 0.125
## .AEC03 0.508 0.130 3.920 0.000 0.508 0.383
## .AEC01 1.779 1.010 1.761 0.078 1.779 0.226
## AEC 4.700 2.603 1.806 0.071 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEC04 0.456 0.456 1.000
## AEC02 0.401 0.401 1.000
## AEC03 0.868 0.868 1.000
## AEC01 0.356 0.356 1.000
##
## R-Square:
## Estimate
## AEC04 0.978
## AEC02 0.875
## AEC03 0.617
## AEC01 0.774
lavaan::fitMeasures(invariance$fit.means,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 47.965 52.000 NA
## srmr cfi.scaled tli.scaled
## 0.025 1.000 1.000
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.000 0.000 0.042
modificationindices(invariance$fit.means, sort.=T)
## lhs op rhs block group level mi epc sepc.lv sepc.all sepc.nox
## 42 AEC ~1 1 1 1 43.429 -0.444 -0.173 -0.173 -0.173
## 38 AEC04 ~1 1 1 1 24.934 -0.639 -0.639 -0.232 -0.232
## 126 AEC ~1 3 3 1 20.067 0.204 0.094 0.094 0.094
## 123 AEC02 ~1 3 3 1 13.045 0.345 0.345 0.138 0.138
## 41 AEC01 ~1 1 1 1 12.745 -0.517 -0.517 -0.168 -0.168
## 125 AEC01 ~1 3 3 1 12.341 0.363 0.363 0.129 0.129
## 39 AEC02 ~1 1 1 1 6.995 -0.367 -0.367 -0.125 -0.125
## 81 AEC02 ~1 2 2 1 3.582 -0.190 -0.190 -0.071 -0.071
## 122 AEC04 ~1 3 3 1 3.300 0.152 0.152 0.069 0.069
## 40 AEC03 ~1 1 1 1 2.791 -0.113 -0.113 -0.077 -0.077
## 80 AEC04 ~1 2 2 1 2.257 0.131 0.131 0.056 0.056
## 82 AEC03 ~1 2 2 1 2.082 0.066 0.066 0.053 0.053
## 182 AEC04 ~~ AEC03 1 1 1 1.810 0.657 0.657 0.657 0.657
## 121 AEC01 ~*~ AEC01 3 3 1 1.354 -0.039 -0.039 -1.000 -1.000
## 196 AEC02 ~~ AEC03 3 3 1 1.257 -0.261 -0.261 -0.416 -0.416
## 197 AEC02 ~~ AEC01 3 3 1 1.111 0.628 0.628 0.535 0.535
## 83 AEC01 ~1 2 2 1 1.031 -0.110 -0.110 -0.037 -0.037
## 37 AEC01 ~*~ AEC01 1 1 1 0.699 0.035 0.035 1.000 1.000
## 189 AEC04 ~~ AEC01 2 2 1 0.458 -0.444 -0.444 -0.659 -0.659
## 120 AEC03 ~*~ AEC03 3 3 1 0.409 0.053 0.053 1.000 1.000
## 183 AEC04 ~~ AEC01 1 1 1 0.390 -0.694 -0.694 -0.694 -0.694
## 79 AEC01 ~*~ AEC01 2 2 1 0.326 0.019 0.019 1.000 1.000
## 186 AEC03 ~~ AEC01 1 1 1 0.271 -0.286 -0.286 -0.286 -0.286
## 36 AEC03 ~*~ AEC03 1 1 1 0.241 -0.044 -0.044 -1.000 -1.000
## 187 AEC04 ~~ AEC02 2 2 1 0.181 0.259 0.259 0.471 0.471
## 34 AEC04 ~*~ AEC04 1 1 1 0.175 -0.019 -0.019 -1.000 -1.000
## 1 AEC =~ AEC04 1 1 1 0.175 0.053 0.137 0.050 0.050
## 198 AEC03 ~~ AEC01 3 3 1 0.137 0.095 0.095 0.100 0.100
## 118 AEC04 ~*~ AEC04 3 3 1 0.094 0.013 0.013 1.000 1.000
## 85 AEC =~ AEC04 3 3 1 0.094 -0.029 -0.063 -0.029 -0.029
## 78 AEC03 ~*~ AEC03 2 2 1 0.087 -0.024 -0.024 -1.000 -1.000
## 124 AEC03 ~1 3 3 1 0.087 -0.013 -0.013 -0.011 -0.011
## 77 AEC02 ~*~ AEC02 2 2 1 0.080 -0.010 -0.010 -1.000 -1.000
## 188 AEC04 ~~ AEC03 2 2 1 0.070 0.069 0.069 0.177 0.177
## 193 AEC04 ~~ AEC02 3 3 1 0.056 -0.117 -0.117 -0.407 -0.407
## 119 AEC02 ~*~ AEC02 3 3 1 0.051 0.009 0.009 1.000 1.000
## 184 AEC02 ~~ AEC03 1 1 1 0.023 -0.078 -0.078 -0.078 -0.078
## 192 AEC03 ~~ AEC01 2 2 1 0.019 0.044 0.044 0.040 0.040
## 195 AEC04 ~~ AEC01 3 3 1 0.011 -0.057 -0.057 -0.131 -0.131
## 191 AEC02 ~~ AEC01 2 2 1 0.007 -0.061 -0.061 -0.040 -0.040
## 185 AEC02 ~~ AEC01 1 1 1 0.006 0.093 0.093 0.093 0.093
## 35 AEC02 ~*~ AEC02 1 1 1 0.003 0.003 0.003 1.000 1.000
## 190 AEC02 ~~ AEC03 2 2 1 0.002 -0.012 -0.012 -0.014 -0.014
## 194 AEC04 ~~ AEC03 3 3 1 0.001 0.005 0.005 0.023 0.023
## 84 AEC ~1 2 2 1 0.001 -0.001 -0.001 -0.001 -0.001
## 181 AEC04 ~~ AEC02 1 1 1 0.000 -0.011 -0.011 -0.011 -0.011
## 43 AEC =~ AEC04 2 2 1 0.000 0.000 -0.001 0.000 0.000
## 76 AEC04 ~*~ AEC04 2 2 1 0.000 0.000 0.000 1.000 1.000
semTools::reliability(invariance$fit.means)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## $`1`
## AEC
## alpha 0.9251
## alpha.ord 0.9365
## omega 0.9189
## omega2 0.9189
## omega3 0.9154
## avevar 0.8564
##
## $`2`
## AEC
## alpha 0.9191
## alpha.ord 0.9347
## omega 0.9168
## omega2 0.9168
## omega3 0.9164
## avevar 0.8256
##
## $`3`
## AEC
## alpha 0.9327
## alpha.ord 0.9423
## omega 0.9241
## omega2 0.9241
## omega3 0.9238
## avevar 0.8432
partial<-partialInvarianceCat(invariance,type="means",return.fit = F)
partial
## $estimates
## poolest mean:1 mean:2 mean:3 std:1 std:2 std:3 diff_std:2 vs. 1
## AEC~1 0 0 0.4292 0.5404 0 0.1683 0.212 0.1683
## diff_std:3 vs. 1
## AEC~1 0.212
##
## $results
## free.chi free.df free.p free.cfi fix.chi fix.df fix.p fix.cfi wald.chi
## AEC~1 0.7696 2 0.6806 -0.02305 0.7696 2 0.6806 -0.02305 NA
## wald.df wald.p
## AEC~1 NA NA
data<-TDados
model <- 'AEG =~ AEG01 + AEG02 + AEG03 + AEG04 + AEG05 + AEG06 + AEG07 + AEG08 + AEG09 + AEG10'
fit <- lavaan::cfa(model, data =data,estimator="ULSMV",ordered=T,missing="pairwise")
## Warning in lav_data_full(data = data, group = group, cluster = cluster, : lavaan WARNING: some cases are empty and will be ignored:
## 1 12 13 14 15 16 17 18 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789
summary(fit,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 17 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 40
##
## Used Total
## Number of observations 586 789
## Number of missing patterns 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 95.335 241.884
## Degrees of freedom 35 35
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.402
## Shift parameter 4.927
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 7763.930 5152.575
## Degrees of freedom 45 45
## P-value NA 0.000
## Scaling correction factor 1.514
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.992 0.959
## Tucker-Lewis Index (TLI) 0.990 0.948
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.054 0.101
## 90 Percent confidence interval - lower 0.041 0.089
## 90 Percent confidence interval - upper 0.067 0.113
## P-value RMSEA <= 0.05 0.278 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.054 0.054
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEG =~
## AEG01 1.000 0.754 0.754
## AEG02 0.852 0.048 17.899 0.000 0.642 0.642
## AEG03 1.077 0.044 24.544 0.000 0.812 0.812
## AEG04 1.023 0.049 20.828 0.000 0.771 0.771
## AEG05 1.001 0.048 20.668 0.000 0.754 0.754
## AEG06 0.969 0.047 20.612 0.000 0.731 0.731
## AEG07 0.857 0.048 17.816 0.000 0.646 0.646
## AEG08 1.045 0.044 23.539 0.000 0.788 0.788
## AEG09 0.850 0.045 18.820 0.000 0.641 0.641
## AEG10 1.043 0.044 23.499 0.000 0.786 0.786
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEG01 0.000 0.000 0.000
## .AEG02 0.000 0.000 0.000
## .AEG03 0.000 0.000 0.000
## .AEG04 0.000 0.000 0.000
## .AEG05 0.000 0.000 0.000
## .AEG06 0.000 0.000 0.000
## .AEG07 0.000 0.000 0.000
## .AEG08 0.000 0.000 0.000
## .AEG09 0.000 0.000 0.000
## .AEG10 0.000 0.000 0.000
## AEG 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEG01|t1 -2.568 0.200 -12.850 0.000 -2.568 -2.568
## AEG01|t2 -1.780 0.096 -18.534 0.000 -1.780 -1.780
## AEG01|t3 -0.026 0.052 -0.495 0.620 -0.026 -0.026
## AEG02|t1 -2.259 0.144 -15.645 0.000 -2.259 -2.259
## AEG02|t2 -1.213 0.068 -17.743 0.000 -1.213 -1.213
## AEG02|t3 0.499 0.054 9.202 0.000 0.499 0.499
## AEG03|t1 -2.080 0.122 -17.005 0.000 -2.080 -2.080
## AEG03|t2 -1.120 0.066 -17.086 0.000 -1.120 -1.120
## AEG03|t3 0.470 0.054 8.714 0.000 0.470 0.470
## AEG04|t1 -2.466 0.179 -13.808 0.000 -2.466 -2.466
## AEG04|t2 -1.702 0.091 -18.736 0.000 -1.702 -1.702
## AEG04|t3 -0.060 0.052 -1.156 0.248 -0.060 -0.060
## AEG05|t1 -1.979 0.112 -17.637 0.000 -1.979 -1.979
## AEG05|t2 -1.088 0.065 -16.829 0.000 -1.088 -1.088
## AEG05|t3 0.437 0.054 8.144 0.000 0.437 0.437
## AEG06|t1 -2.161 0.132 -16.424 0.000 -2.161 -2.161
## AEG06|t2 -1.370 0.074 -18.511 0.000 -1.370 -1.370
## AEG06|t3 0.220 0.052 4.207 0.000 0.220 0.220
## AEG07|t1 -1.633 0.087 -18.838 0.000 -1.633 -1.633
## AEG07|t2 -0.938 0.061 -15.375 0.000 -0.938 -0.938
## AEG07|t3 0.381 0.053 7.164 0.000 0.381 0.381
## AEG08|t1 -2.044 0.119 -17.243 0.000 -2.044 -2.044
## AEG08|t2 -0.979 0.062 -15.806 0.000 -0.979 -0.979
## AEG08|t3 0.578 0.055 10.495 0.000 0.578 0.578
## AEG09|t1 -1.502 0.080 -18.822 0.000 -1.502 -1.502
## AEG09|t2 -0.504 0.054 -9.283 0.000 -0.504 -0.504
## AEG09|t3 0.721 0.057 12.642 0.000 0.721 0.721
## AEG10|t1 -1.823 0.099 -18.384 0.000 -1.823 -1.823
## AEG10|t2 -0.789 0.058 -13.575 0.000 -0.789 -0.789
## AEG10|t3 0.710 0.057 12.485 0.000 0.710 0.710
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEG01 0.432 0.432 0.432
## .AEG02 0.588 0.588 0.588
## .AEG03 0.340 0.340 0.340
## .AEG04 0.405 0.405 0.405
## .AEG05 0.431 0.431 0.431
## .AEG06 0.466 0.466 0.466
## .AEG07 0.582 0.582 0.582
## .AEG08 0.379 0.379 0.379
## .AEG09 0.589 0.589 0.589
## .AEG10 0.382 0.382 0.382
## AEG 0.568 0.042 13.487 0.000 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEG01 1.000 1.000 1.000
## AEG02 1.000 1.000 1.000
## AEG03 1.000 1.000 1.000
## AEG04 1.000 1.000 1.000
## AEG05 1.000 1.000 1.000
## AEG06 1.000 1.000 1.000
## AEG07 1.000 1.000 1.000
## AEG08 1.000 1.000 1.000
## AEG09 1.000 1.000 1.000
## AEG10 1.000 1.000 1.000
##
## R-Square:
## Estimate
## AEG01 0.568
## AEG02 0.412
## AEG03 0.660
## AEG04 0.595
## AEG05 0.569
## AEG06 0.534
## AEG07 0.418
## AEG08 0.621
## AEG09 0.411
## AEG10 0.618
lavaan::fitMeasures(fit,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 241.884 35.000 NA
## srmr cfi.scaled tli.scaled
## 0.054 0.959 0.948
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.101 0.089 0.113
parameters<-lavaan::standardizedSolution(fit)
loadings<-parameters[parameters$op=="=~",]
loadings
## lhs op rhs est.std se z pvalue ci.lower ci.upper
## 1 AEG =~ AEG01 0.754 0.028 26.97 0 0.699 0.809
## 2 AEG =~ AEG02 0.642 0.029 22.25 0 0.586 0.699
## 3 AEG =~ AEG03 0.812 0.018 44.55 0 0.776 0.848
## 4 AEG =~ AEG04 0.771 0.025 30.40 0 0.721 0.821
## 5 AEG =~ AEG05 0.754 0.024 31.97 0 0.708 0.800
## 6 AEG =~ AEG06 0.731 0.027 27.46 0 0.679 0.783
## 7 AEG =~ AEG07 0.646 0.030 21.68 0 0.588 0.705
## 8 AEG =~ AEG08 0.788 0.020 38.94 0 0.748 0.828
## 9 AEG =~ AEG09 0.641 0.027 23.61 0 0.588 0.694
## 10 AEG =~ AEG10 0.786 0.020 38.73 0 0.746 0.826
modificationindices(fit, sort.=T)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 98 AEG04 ~~ AEG06 25.998 0.241 0.241 0.553 0.553
## 88 AEG02 ~~ AEG09 11.988 -0.157 -0.157 -0.266 -0.266
## 117 AEG09 ~~ AEG10 10.863 0.153 0.153 0.323 0.323
## 110 AEG06 ~~ AEG09 10.770 -0.151 -0.151 -0.288 -0.288
## 115 AEG08 ~~ AEG09 7.608 0.128 0.128 0.271 0.271
## 94 AEG03 ~~ AEG08 6.982 0.128 0.128 0.355 0.355
## 95 AEG03 ~~ AEG09 6.833 0.122 0.122 0.273 0.273
## 100 AEG04 ~~ AEG08 5.832 -0.115 -0.115 -0.294 -0.294
## 86 AEG02 ~~ AEG07 4.277 0.094 0.094 0.160 0.160
## 101 AEG04 ~~ AEG09 4.252 -0.096 -0.096 -0.195 -0.195
## 97 AEG04 ~~ AEG05 3.446 0.088 0.088 0.211 0.211
## 90 AEG03 ~~ AEG04 2.846 -0.081 -0.081 -0.218 -0.218
## 103 AEG05 ~~ AEG06 2.382 0.073 0.073 0.162 0.162
## 91 AEG03 ~~ AEG05 2.180 -0.071 -0.071 -0.185 -0.185
## 92 AEG03 ~~ AEG06 1.957 -0.067 -0.067 -0.167 -0.167
## 111 AEG06 ~~ AEG10 1.895 -0.065 -0.065 -0.154 -0.154
## 109 AEG06 ~~ AEG08 1.613 -0.060 -0.060 -0.143 -0.143
## 104 AEG05 ~~ AEG07 1.570 -0.058 -0.058 -0.116 -0.116
## 82 AEG02 ~~ AEG03 1.491 0.057 0.057 0.128 0.128
## 102 AEG04 ~~ AEG10 1.350 -0.056 -0.056 -0.141 -0.141
## 73 AEG01 ~~ AEG02 1.243 0.051 0.051 0.102 0.102
## 87 AEG02 ~~ AEG08 1.207 -0.051 -0.051 -0.108 -0.108
## 96 AEG03 ~~ AEG10 0.835 -0.044 -0.044 -0.122 -0.122
## 79 AEG01 ~~ AEG08 0.345 -0.028 -0.028 -0.069 -0.069
## 108 AEG06 ~~ AEG07 0.331 0.026 0.026 0.051 0.051
## 93 AEG03 ~~ AEG07 0.265 -0.024 -0.024 -0.054 -0.054
## 80 AEG01 ~~ AEG09 0.264 -0.024 -0.024 -0.047 -0.047
## 75 AEG01 ~~ AEG04 0.241 0.023 0.023 0.056 0.056
## 106 AEG05 ~~ AEG09 0.149 -0.018 -0.018 -0.035 -0.035
## 114 AEG07 ~~ AEG10 0.146 -0.018 -0.018 -0.038 -0.038
## 107 AEG05 ~~ AEG10 0.128 0.017 0.017 0.042 0.042
## 116 AEG08 ~~ AEG10 0.123 0.017 0.017 0.044 0.044
## 84 AEG02 ~~ AEG05 0.115 -0.016 -0.016 -0.031 -0.031
## 105 AEG05 ~~ AEG08 0.085 -0.014 -0.014 -0.034 -0.034
## 77 AEG01 ~~ AEG06 0.041 -0.010 -0.010 -0.021 -0.021
## 113 AEG07 ~~ AEG09 0.030 0.008 0.008 0.013 0.013
## 81 AEG01 ~~ AEG10 0.029 0.008 0.008 0.020 0.020
## 76 AEG01 ~~ AEG05 0.027 -0.008 -0.008 -0.018 -0.018
## 99 AEG04 ~~ AEG07 0.025 -0.007 -0.007 -0.015 -0.015
## 83 AEG02 ~~ AEG04 0.017 0.006 0.006 0.013 0.013
## 74 AEG01 ~~ AEG03 0.016 -0.006 -0.006 -0.016 -0.016
## 78 AEG01 ~~ AEG07 0.012 -0.005 -0.005 -0.010 -0.010
## 89 AEG02 ~~ AEG10 0.006 0.004 0.004 0.008 0.008
## 85 AEG02 ~~ AEG06 0.002 0.002 0.002 0.004 0.004
## 112 AEG07 ~~ AEG08 0.002 -0.002 -0.002 -0.004 -0.004
semTools::reliability(fit)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## AEG
## alpha NA
## alpha.ord 0.9204
## omega 0.8824
## omega2 0.8824
## omega3 0.8817
## avevar 0.5405
model <- 'AEO =~ AEO01 + AEO02 + AEO03 + AEO04 + AEO05 + AEO06'
fit <- lavaan::cfa(model, data =data,estimator="ULSMV",ordered=T,missing="pairwise")
## Warning in lav_data_full(data = data, group = group, cluster = cluster, : lavaan WARNING: some cases are empty and will be ignored:
## 13 110 132 133 134 135 241 242 252 253 258 261 262 275 404 417 738 739 749 750 761 780
summary(fit,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 12 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 30
##
## Used Total
## Number of observations 767 789
## Number of missing patterns 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 52.580 152.110
## Degrees of freedom 9 9
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.348
## Shift parameter 0.826
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 3321.827 2868.879
## Degrees of freedom 15 15
## P-value NA 0.000
## Scaling correction factor 1.160
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.987 0.950
## Tucker-Lewis Index (TLI) 0.978 0.916
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.080 0.144
## 90 Percent confidence interval - lower 0.060 0.124
## 90 Percent confidence interval - upper 0.101 0.165
## P-value RMSEA <= 0.05 0.009 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.057 0.057
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEO =~
## AEO01 1.000 0.718 0.718
## AEO02 1.102 0.041 27.054 0.000 0.792 0.792
## AEO03 1.107 0.040 27.824 0.000 0.795 0.795
## AEO04 0.854 0.042 20.153 0.000 0.613 0.613
## AEO05 0.974 0.040 24.422 0.000 0.700 0.700
## AEO06 1.049 0.040 26.366 0.000 0.754 0.754
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEO01 0.000 0.000 0.000
## .AEO02 0.000 0.000 0.000
## .AEO03 0.000 0.000 0.000
## .AEO04 0.000 0.000 0.000
## .AEO05 0.000 0.000 0.000
## .AEO06 0.000 0.000 0.000
## AEO 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEO01|t1 -2.091 0.108 -19.369 0.000 -2.091 -2.091
## AEO01|t2 -1.137 0.058 -19.703 0.000 -1.137 -1.137
## AEO01|t3 -0.741 0.050 -14.783 0.000 -0.741 -0.741
## AEO01|t4 0.502 0.047 10.594 0.000 0.502 0.502
## AEO02|t1 -2.310 0.133 -17.404 0.000 -2.310 -2.310
## AEO02|t2 -1.408 0.066 -21.320 0.000 -1.408 -1.408
## AEO02|t3 -0.848 0.052 -16.396 0.000 -0.848 -0.848
## AEO02|t4 0.540 0.048 11.302 0.000 0.540 0.540
## AEO03|t1 -2.225 0.122 -18.219 0.000 -2.225 -2.225
## AEO03|t2 -1.195 0.059 -20.173 0.000 -1.195 -1.195
## AEO03|t3 -0.605 0.048 -12.498 0.000 -0.605 -0.605
## AEO03|t4 0.732 0.050 14.646 0.000 0.732 0.732
## AEO04|t1 -1.881 0.091 -20.762 0.000 -1.881 -1.881
## AEO04|t2 -1.349 0.064 -21.094 0.000 -1.349 -1.349
## AEO04|t3 -0.749 0.050 -14.919 0.000 -0.749 -0.749
## AEO04|t4 0.044 0.045 0.974 0.330 0.044 0.044
## AEO05|t1 -2.036 0.103 -19.787 0.000 -2.036 -2.036
## AEO05|t2 -1.302 0.062 -20.863 0.000 -1.302 -1.302
## AEO05|t3 -0.724 0.050 -14.509 0.000 -0.724 -0.724
## AEO05|t4 0.521 0.048 10.948 0.000 0.521 0.521
## AEO06|t1 -2.188 0.118 -18.556 0.000 -2.188 -2.188
## AEO06|t2 -1.399 0.066 -21.291 0.000 -1.399 -1.399
## AEO06|t3 -0.926 0.053 -17.435 0.000 -0.926 -0.926
## AEO06|t4 0.219 0.046 4.796 0.000 0.219 0.219
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .AEO01 0.484 0.484 0.484
## .AEO02 0.373 0.373 0.373
## .AEO03 0.368 0.368 0.368
## .AEO04 0.624 0.624 0.624
## .AEO05 0.510 0.510 0.510
## .AEO06 0.432 0.432 0.432
## AEO 0.516 0.033 15.616 0.000 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## AEO01 1.000 1.000 1.000
## AEO02 1.000 1.000 1.000
## AEO03 1.000 1.000 1.000
## AEO04 1.000 1.000 1.000
## AEO05 1.000 1.000 1.000
## AEO06 1.000 1.000 1.000
##
## R-Square:
## Estimate
## AEO01 0.516
## AEO02 0.627
## AEO03 0.632
## AEO04 0.376
## AEO05 0.490
## AEO06 0.568
lavaan::fitMeasures(fit,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 152.110 9.000 NA
## srmr cfi.scaled tli.scaled
## 0.057 0.950 0.916
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.144 0.124 0.165
parameters<-lavaan::standardizedSolution(fit)
loadings<-parameters[parameters$op=="=~",]
loadings
## lhs op rhs est.std se z pvalue ci.lower ci.upper
## 1 AEO =~ AEO01 0.718 0.023 31.23 0 0.673 0.764
## 2 AEO =~ AEO02 0.792 0.019 40.95 0 0.754 0.830
## 3 AEO =~ AEO03 0.795 0.018 44.15 0 0.760 0.830
## 4 AEO =~ AEO04 0.613 0.028 21.76 0 0.558 0.669
## 5 AEO =~ AEO05 0.700 0.023 30.94 0 0.656 0.744
## 6 AEO =~ AEO06 0.754 0.021 35.55 0 0.712 0.795
modificationindices(fit, sort.=T)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 65 AEO05 ~~ AEO06 25.384 0.234 0.234 0.499 0.499
## 56 AEO02 ~~ AEO03 9.623 0.155 0.155 0.419 0.419
## 59 AEO02 ~~ AEO06 7.941 -0.138 -0.138 -0.343 -0.343
## 51 AEO01 ~~ AEO02 7.679 0.133 0.133 0.312 0.312
## 63 AEO04 ~~ AEO05 7.303 0.118 0.118 0.209 0.209
## 54 AEO01 ~~ AEO05 7.127 -0.122 -0.122 -0.245 -0.245
## 58 AEO02 ~~ AEO05 6.231 -0.118 -0.118 -0.271 -0.271
## 61 AEO03 ~~ AEO05 4.631 -0.102 -0.102 -0.236 -0.236
## 52 AEO01 ~~ AEO03 3.486 0.090 0.090 0.212 0.212
## 60 AEO03 ~~ AEO04 2.791 -0.076 -0.076 -0.159 -0.159
## 62 AEO03 ~~ AEO06 2.182 -0.072 -0.072 -0.181 -0.181
## 55 AEO01 ~~ AEO06 1.692 -0.061 -0.061 -0.133 -0.133
## 53 AEO01 ~~ AEO04 1.141 -0.047 -0.047 -0.085 -0.085
## 64 AEO04 ~~ AEO06 0.988 0.044 0.044 0.085 0.085
## 57 AEO02 ~~ AEO04 0.602 -0.035 -0.035 -0.073 -0.073
semTools::reliability(fit)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## AEO
## alpha NA
## alpha.ord 0.8714
## omega 0.8312
## omega2 0.8312
## omega3 0.8304
## avevar 0.5349
model <- 'WAMI =~ WAMI01 + WAMI02 + WAMI03 + WAMI04 + WAMI05 + WAMI06 + WAMI07 + WAMI08 + WAMI09 + WAMI10'
fit <- lavaan::cfa(model, data =data,estimator="ULSMV",ordered=T,missing="pairwise")
## Warning in lav_data_full(data = data, group = group, cluster = cluster, : lavaan WARNING: some cases are empty and will be ignored:
## 12 13 15 16 105 109 110 119 132 133 134 135 241 242 252 253 258 261 262 263 275 282 404 410 413 417 715 733 738 739 744 749 750 751 761 767 778 779 780 781 786
summary(fit,rsquare=T,fit=T,standardized=T)
## lavaan 0.6-8 ended normally after 23 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 50
##
## Used Total
## Number of observations 748 789
## Number of missing patterns 1
##
## Model Test User Model:
## Standard Robust
## Test Statistic 65.674 528.629
## Degrees of freedom 35 35
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.126
## Shift parameter 8.928
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 17411.711 17316.740
## Degrees of freedom 45 45
## P-value NA 0.000
## Scaling correction factor 1.007
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.998 0.971
## Tucker-Lewis Index (TLI) 0.998 0.963
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.034 0.137
## 90 Percent confidence interval - lower 0.021 0.127
## 90 Percent confidence interval - upper 0.047 0.148
## P-value RMSEA <= 0.05 0.981 0.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.040 0.040
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## WAMI =~
## WAMI01 1.000 0.875 0.875
## WAMI02 0.974 0.016 61.902 0.000 0.852 0.852
## WAMI03 -0.770 0.027 -28.778 0.000 -0.674 -0.674
## WAMI04 1.016 0.014 72.576 0.000 0.889 0.889
## WAMI05 1.014 0.014 70.252 0.000 0.887 0.887
## WAMI06 0.963 0.016 60.277 0.000 0.843 0.843
## WAMI07 0.925 0.017 53.914 0.000 0.809 0.809
## WAMI08 1.066 0.013 80.601 0.000 0.933 0.933
## WAMI09 0.955 0.016 57.910 0.000 0.836 0.836
## WAMI10 0.980 0.015 65.929 0.000 0.857 0.857
##
## Intercepts:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .WAMI01 0.000 0.000 0.000
## .WAMI02 0.000 0.000 0.000
## .WAMI03 0.000 0.000 0.000
## .WAMI04 0.000 0.000 0.000
## .WAMI05 0.000 0.000 0.000
## .WAMI06 0.000 0.000 0.000
## .WAMI07 0.000 0.000 0.000
## .WAMI08 0.000 0.000 0.000
## .WAMI09 0.000 0.000 0.000
## .WAMI10 0.000 0.000 0.000
## WAMI 0.000 0.000 0.000
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## WAMI01|t1 -1.576 0.074 -21.319 0.000 -1.576 -1.576
## WAMI01|t2 -1.194 0.060 -19.911 0.000 -1.194 -1.194
## WAMI01|t3 -0.581 0.049 -11.903 0.000 -0.581 -0.581
## WAMI01|t4 0.352 0.047 7.511 0.000 0.352 0.352
## WAMI02|t1 -1.851 0.090 -20.650 0.000 -1.851 -1.851
## WAMI02|t2 -1.479 0.070 -21.233 0.000 -1.479 -1.479
## WAMI02|t3 -0.966 0.055 -17.705 0.000 -0.966 -0.966
## WAMI02|t4 0.000 0.046 0.000 1.000 0.000 0.000
## WAMI03|t1 0.158 0.046 3.433 0.001 0.158 0.158
## WAMI03|t2 0.743 0.051 14.642 0.000 0.743 0.743
## WAMI03|t3 1.311 0.063 20.650 0.000 1.311 1.311
## WAMI03|t4 1.781 0.085 20.939 0.000 1.781 1.781
## WAMI04|t1 -1.749 0.083 -21.045 0.000 -1.749 -1.749
## WAMI04|t2 -1.243 0.061 -20.255 0.000 -1.243 -1.243
## WAMI04|t3 -0.621 0.049 -12.613 0.000 -0.621 -0.621
## WAMI04|t4 0.327 0.047 7.003 0.000 0.327 0.327
## WAMI05|t1 -1.870 0.091 -20.559 0.000 -1.870 -1.870
## WAMI05|t2 -1.369 0.065 -20.912 0.000 -1.369 -1.369
## WAMI05|t3 -0.798 0.052 -15.465 0.000 -0.798 -0.798
## WAMI05|t4 0.168 0.046 3.652 0.000 0.168 0.168
## WAMI06|t1 -1.749 0.083 -21.045 0.000 -1.749 -1.749
## WAMI06|t2 -1.369 0.065 -20.912 0.000 -1.369 -1.369
## WAMI06|t3 -0.683 0.050 -13.669 0.000 -0.683 -0.683
## WAMI06|t4 0.138 0.046 2.995 0.003 0.138 0.138
## WAMI07|t1 -1.510 0.071 -21.279 0.000 -1.510 -1.510
## WAMI07|t2 -1.122 0.058 -19.323 0.000 -1.122 -1.122
## WAMI07|t3 -0.414 0.047 -8.743 0.000 -0.414 -0.414
## WAMI07|t4 0.443 0.048 9.321 0.000 0.443 0.443
## WAMI08|t1 -1.404 0.067 -21.039 0.000 -1.404 -1.404
## WAMI08|t2 -1.009 0.055 -18.205 0.000 -1.009 -1.009
## WAMI08|t3 -0.545 0.048 -11.261 0.000 -0.545 -0.545
## WAMI08|t4 0.392 0.047 8.309 0.000 0.392 0.392
## WAMI09|t1 -1.637 0.077 -21.283 0.000 -1.637 -1.637
## WAMI09|t2 -1.173 0.059 -19.756 0.000 -1.173 -1.173
## WAMI09|t3 -0.621 0.049 -12.613 0.000 -0.621 -0.621
## WAMI09|t4 0.306 0.047 6.567 0.000 0.306 0.306
## WAMI10|t1 -1.460 0.069 -21.193 0.000 -1.460 -1.460
## WAMI10|t2 -1.085 0.057 -18.982 0.000 -1.085 -1.085
## WAMI10|t3 -0.473 0.048 -9.898 0.000 -0.473 -0.473
## WAMI10|t4 0.282 0.047 6.058 0.000 0.282 0.282
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .WAMI01 0.234 0.234 0.234
## .WAMI02 0.274 0.274 0.274
## .WAMI03 0.546 0.546 0.546
## .WAMI04 0.210 0.210 0.210
## .WAMI05 0.213 0.213 0.213
## .WAMI06 0.290 0.290 0.290
## .WAMI07 0.345 0.345 0.345
## .WAMI08 0.129 0.129 0.129
## .WAMI09 0.301 0.301 0.301
## .WAMI10 0.265 0.265 0.265
## WAMI 0.766 0.019 40.098 0.000 1.000 1.000
##
## Scales y*:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## WAMI01 1.000 1.000 1.000
## WAMI02 1.000 1.000 1.000
## WAMI03 1.000 1.000 1.000
## WAMI04 1.000 1.000 1.000
## WAMI05 1.000 1.000 1.000
## WAMI06 1.000 1.000 1.000
## WAMI07 1.000 1.000 1.000
## WAMI08 1.000 1.000 1.000
## WAMI09 1.000 1.000 1.000
## WAMI10 1.000 1.000 1.000
##
## R-Square:
## Estimate
## WAMI01 0.766
## WAMI02 0.726
## WAMI03 0.454
## WAMI04 0.790
## WAMI05 0.787
## WAMI06 0.710
## WAMI07 0.655
## WAMI08 0.871
## WAMI09 0.699
## WAMI10 0.735
lavaan::fitMeasures(fit,c("chisq.scaled","df.scaled","pvalue","srmr","cfi.scaled","tli.scaled","rmsea.scaled","rmsea.ci.lower.scaled","rmsea.ci.upper.scaled"))
## chisq.scaled df.scaled pvalue
## 528.629 35.000 NA
## srmr cfi.scaled tli.scaled
## 0.040 0.971 0.963
## rmsea.scaled rmsea.ci.lower.scaled rmsea.ci.upper.scaled
## 0.137 0.127 0.148
parameters<-lavaan::standardizedSolution(fit)
loadings<-parameters[parameters$op=="=~",]
loadings
## lhs op rhs est.std se z pvalue ci.lower ci.upper
## 1 WAMI =~ WAMI01 0.875 0.011 80.20 0 0.854 0.896
## 2 WAMI =~ WAMI02 0.852 0.013 63.49 0 0.826 0.879
## 3 WAMI =~ WAMI03 -0.674 0.023 -29.04 0 -0.719 -0.628
## 4 WAMI =~ WAMI04 0.889 0.010 86.12 0 0.869 0.909
## 5 WAMI =~ WAMI05 0.887 0.011 82.78 0 0.866 0.908
## 6 WAMI =~ WAMI06 0.843 0.013 63.71 0 0.817 0.869
## 7 WAMI =~ WAMI07 0.809 0.015 55.74 0 0.781 0.838
## 8 WAMI =~ WAMI08 0.933 0.007 137.14 0 0.920 0.946
## 9 WAMI =~ WAMI09 0.836 0.013 62.31 0 0.810 0.862
## 10 WAMI =~ WAMI10 0.857 0.012 73.24 0 0.834 0.880
modificationindices(fit, sort.=T)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 102 WAMI03 ~~ WAMI06 12.497 -0.142 -0.142 -0.358 -0.358
## 123 WAMI07 ~~ WAMI09 12.258 0.144 0.144 0.446 0.446
## 83 WAMI01 ~~ WAMI02 9.615 0.129 0.129 0.511 0.511
## 103 WAMI03 ~~ WAMI07 6.151 0.099 0.099 0.229 0.229
## 121 WAMI06 ~~ WAMI10 4.313 0.086 0.086 0.311 0.311
## 118 WAMI06 ~~ WAMI07 3.685 -0.079 -0.079 -0.250 -0.250
## 107 WAMI04 ~~ WAMI05 3.518 0.079 0.079 0.374 0.374
## 127 WAMI09 ~~ WAMI10 3.115 0.073 0.073 0.259 0.259
## 90 WAMI01 ~~ WAMI09 2.931 -0.071 -0.071 -0.268 -0.268
## 113 WAMI05 ~~ WAMI06 2.485 0.066 0.066 0.265 0.265
## 95 WAMI02 ~~ WAMI06 2.251 -0.062 -0.062 -0.221 -0.221
## 99 WAMI02 ~~ WAMI10 2.006 -0.059 -0.059 -0.218 -0.218
## 89 WAMI01 ~~ WAMI08 1.883 0.058 0.058 0.334 0.334
## 87 WAMI01 ~~ WAMI06 1.773 -0.055 -0.055 -0.213 -0.213
## 94 WAMI02 ~~ WAMI05 1.418 -0.050 -0.050 -0.206 -0.206
## 116 WAMI05 ~~ WAMI09 1.202 -0.046 -0.046 -0.180 -0.180
## 88 WAMI01 ~~ WAMI07 1.178 -0.045 -0.045 -0.158 -0.158
## 91 WAMI01 ~~ WAMI10 1.102 -0.044 -0.044 -0.176 -0.176
## 106 WAMI03 ~~ WAMI10 1.063 -0.042 -0.042 -0.109 -0.109
## 112 WAMI04 ~~ WAMI10 1.006 -0.042 -0.042 -0.178 -0.178
## 105 WAMI03 ~~ WAMI09 0.783 0.036 0.036 0.088 0.088
## 100 WAMI03 ~~ WAMI04 0.778 0.036 0.036 0.106 0.106
## 114 WAMI05 ~~ WAMI07 0.759 -0.036 -0.036 -0.133 -0.133
## 122 WAMI07 ~~ WAMI08 0.727 0.036 0.036 0.169 0.169
## 96 WAMI02 ~~ WAMI07 0.688 0.034 0.034 0.111 0.111
## 109 WAMI04 ~~ WAMI07 0.648 0.033 0.033 0.124 0.124
## 119 WAMI06 ~~ WAMI08 0.634 -0.034 -0.034 -0.173 -0.173
## 120 WAMI06 ~~ WAMI09 0.565 -0.031 -0.031 -0.105 -0.105
## 117 WAMI05 ~~ WAMI10 0.363 -0.025 -0.025 -0.106 -0.106
## 92 WAMI02 ~~ WAMI03 0.298 -0.022 -0.022 -0.057 -0.057
## 104 WAMI03 ~~ WAMI08 0.281 0.022 0.022 0.082 0.082
## 111 WAMI04 ~~ WAMI09 0.241 -0.020 -0.020 -0.081 -0.081
## 86 WAMI01 ~~ WAMI05 0.168 0.017 0.017 0.077 0.077
## 85 WAMI01 ~~ WAMI04 0.157 0.017 0.017 0.075 0.075
## 84 WAMI01 ~~ WAMI03 0.150 0.016 0.016 0.044 0.044
## 126 WAMI08 ~~ WAMI10 0.129 -0.015 -0.015 -0.082 -0.082
## 110 WAMI04 ~~ WAMI08 0.109 -0.014 -0.014 -0.085 -0.085
## 108 WAMI04 ~~ WAMI06 0.082 -0.012 -0.012 -0.048 -0.048
## 93 WAMI02 ~~ WAMI04 0.071 -0.011 -0.011 -0.047 -0.047
## 115 WAMI05 ~~ WAMI08 0.052 -0.010 -0.010 -0.059 -0.059
## 125 WAMI08 ~~ WAMI09 0.025 -0.007 -0.007 -0.034 -0.034
## 124 WAMI07 ~~ WAMI10 0.010 -0.004 -0.004 -0.013 -0.013
## 97 WAMI02 ~~ WAMI08 0.009 0.004 0.004 0.022 0.022
## 98 WAMI02 ~~ WAMI09 0.009 -0.004 -0.004 -0.014 -0.014
## 101 WAMI03 ~~ WAMI05 0.002 -0.002 -0.002 -0.005 -0.005
semTools::reliability(fit)
## For constructs with categorical indicators, Zumbo et al.`s (2007) "ordinal alpha" is calculated in addition to the standard alpha, which treats ordinal variables as numeric. See Chalmers (2018) for a critique of "alpha.ord". Likewise, average variance extracted is calculated from polychoric (polyserial) not Pearson correlations.
## WAMI
## alpha NA
## alpha.ord 0.9028
## omega 0.9282
## omega2 0.9282
## omega3 0.9274
## avevar 0.7192
data<-TDados[,c(234:237)]
data<-as.matrix(data)
dsc<-descript(data)
dsc$alpha
## value
## All Items 0.9242
## Excluding AEC01 0.8978
## Excluding AEC02 0.8918
## Excluding AEC03 0.9326
## Excluding AEC04 0.8815
rcor.test(data, method = "kendall")
##
## AEC01 AEC02 AEC03 AEC04
## AEC01 ***** 0.730 0.556 0.721
## AEC02 <0.001 ***** 0.563 0.780
## AEC03 <0.001 <0.001 ***** 0.629
## AEC04 <0.001 <0.001 <0.001 *****
##
## upper diagonal part contains correlation coefficient estimates
## lower diagonal part contains corresponding p-values
empirical_plot(data, c(1,2,3,4), smooth = TRUE)
fit1<-ltm::grm(data,constrained = T, Hessian=T,IRT.param=T)
fit1
##
## Call:
## ltm::grm(data = data, constrained = T, IRT.param = T, Hessian = T)
##
## Coefficients:
## Extrmt1 Extrmt2 Extrmt3 Extrmt4 Extrmt5 Extrmt6 Dscrmn
## AEC01 -1.985 -1.308 -0.568 0.465 1.388 1.847 3.782
## AEC02 -2.180 -1.437 -0.782 0.333 1.203 1.733 3.782
## AEC03 -2.016 -1.273 -0.428 0.460 1.376 1.864 3.782
## AEC04 -2.121 -1.414 -0.553 0.432 1.352 1.834 3.782
##
## Log.Lik: -3819
margins(fit1)
##
## Call:
## ltm::grm(data = data, constrained = T, IRT.param = T, Hessian = T)
##
## Fit on the Two-Way Margins
##
## AEC01 AEC02 AEC03 AEC04
## AEC01 - 140.93 3307.38 105.33
## AEC02 - 2412.13 187.60
## AEC03 *** *** - 186.12
## AEC04 *** *** -
##
## '***' denotes pairs of items with lack-of-fit
margins(fit1, "three")
##
## Call:
## ltm::grm(data = data, constrained = T, IRT.param = T, Hessian = T)
##
## Fit on the Three-Way Margins
##
## Item i Item j Item k (O-E)^2/E
## 1 1 2 3 92867.3 ***
## 2 1 2 4 973.5
## 3 1 3 4 14885.4 ***
## 4 2 3 4 11192.0 ***
##
## '***' denotes triplets of items with lack-of-fit
fit2<-grm(data,constrained = F, Hessian=T,IRT.param=T)
fit2
##
## Call:
## grm(data = data, constrained = F, IRT.param = T, Hessian = T)
##
## Coefficients:
## Extrmt1 Extrmt2 Extrmt3 Extrmt4 Extrmt5 Extrmt6 Dscrmn
## AEC01 -2.460 -1.513 -0.691 0.461 1.464 1.961 3.745
## AEC02 -2.107 -1.485 -0.816 0.388 1.318 1.958 3.572
## AEC03 -2.371 -1.669 -0.643 0.512 1.671 2.210 2.089
## AEC04 -2.211 -1.521 -0.634 0.480 1.579 2.031 3.152
##
## Log.Lik: -3828
margins(fit1)
##
## Call:
## ltm::grm(data = data, constrained = T, IRT.param = T, Hessian = T)
##
## Fit on the Two-Way Margins
##
## AEC01 AEC02 AEC03 AEC04
## AEC01 - 140.93 3307.38 105.33
## AEC02 - 2412.13 187.60
## AEC03 *** *** - 186.12
## AEC04 *** *** -
##
## '***' denotes pairs of items with lack-of-fit
margins(fit1, "three")
##
## Call:
## ltm::grm(data = data, constrained = T, IRT.param = T, Hessian = T)
##
## Fit on the Three-Way Margins
##
## Item i Item j Item k (O-E)^2/E
## 1 1 2 3 92867.3 ***
## 2 1 2 4 973.5
## 3 1 3 4 14885.4 ***
## 4 2 3 4 11192.0 ***
##
## '***' denotes triplets of items with lack-of-fit
anova(fit1,fit2)
##
## Likelihood Ratio Table
## AIC BIC log.Lik LRT df p.value
## fit1 7688 7805 -3819
## fit2 7711 7842 -3828 -16.69 3 1
coef(fit2, simplify = TRUE,standardized=T,prob=T,order=T)
## Extrmt1 Extrmt2 Extrmt3 Extrmt4 Extrmt5 Extrmt6 Dscrmn
## AEC01 -2.460 -1.513 -0.691 0.461 1.464 1.961 3.745
## AEC02 -2.107 -1.485 -0.816 0.388 1.318 1.958 3.572
## AEC03 -2.371 -1.669 -0.643 0.512 1.671 2.210 2.089
## AEC04 -2.211 -1.521 -0.634 0.480 1.579 2.031 3.152
information(fit2, c(-4, 4), items = c(1:4))
##
## Call:
## grm(data = data, constrained = F, IRT.param = T, Hessian = T)
##
## Total Information = 57.36
## Information in (-4, 4) = 57.2 (99.73%)
## Based on items 1, 2, 3, 4
op <- par(mfrow = c(2,2))
plot(fit2, lwd = 2, legend = TRUE, ncol = 2)
plot(fit2, type = "IIC")
plot(fit2, type = "IIC",item=0,zrange = c(-4, 4))
vals <- plot(fit2, type = "IIC", items = 0, plot = FALSE)
plot(vals[,1], 1 / sqrt(vals[, 2]), type = "l", lwd = 2,
xlab = "Ability", ylab = "Standard Error",
main = "Standard Error of Measurement")
op <- par(mfrow = c(2,2))
plot(fit2, type = "OCCu")
op <- par(mfrow = c(2,2))
plot(fit2,type='OCCl')
f.scores<-ltm::factor.scores(fit2)
plot(f.scores, main = "KDE for Person Parameters")