## Necessary Libraries loaded.
library(ggplot2)
ggplot(DFvar, aes(x = Org, y = IWB, fill = Sector)) + ylim(1, 7) +
geom_violin(trim = FALSE) + ggtitle("Individual Innovative Work Behaviour (IWB) by Organisation") +
scale_fill_manual(values = c("lightblue", "pink")) +
xlab("") + ylab("") +
geom_boxplot(width = 0.2, fill = "lightgrey") +
geom_jitter(shape = 16, position = position_jitter(0.2)) +
stat_summary(fun.y = mean, geom = "point", shape = 15, size = 5, color = "red") +
theme(
plot.title = element_text(color = "black", size = 35, face = "bold", hjust = 0.5, margin = margin(30,0,30,0)),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text.x = element_text(color = "darkblue", size = 30, margin = margin(30,0,0,0)),
axis.text.y = element_text(color = "darkblue", size = 30, margin = margin(0,30,0,0)),
panel.background = element_rect(fill = "white", colour = "grey", size = 0.5, linetype = "solid"),
panel.grid.major = element_line(size = 0.5, linetype = 'solid', colour = "lightblue"),
plot.margin = margin(2, 2, 2, 2, "cm"),
legend.position = "top",
legend.title =element_blank(),
legend.text = element_text(size = 25))
library(RcmdrMisc)
## Loading required package: sandwich
##
## Attaching package: 'RcmdrMisc'
## The following object is masked from 'package:psych':
##
## reliability
numSummary(DFvar$IWB,
groups = DFvar$Org,
statistics = c("mean", "sd", "skewness", "kurtosis", "quantiles"),
quantiles = c(0.0, 0.25, 0.5, 0.75, 1.00))
## mean sd skewness kurtosis 0% 25% 50% 75% 100% data:n
## Private1 5.091 1.1254 -0.5235 -0.2731 2.111 4.472 5.111 6.000 7.000 90
## Private2 5.006 0.9753 -0.5676 -0.2870 1.778 4.222 5.167 5.889 6.444 128
## Private3 4.771 1.0767 -0.1944 0.5547 2.333 4.167 4.667 5.500 7.000 29
## Public1 4.731 1.1847 -0.6806 -0.4105 1.889 4.028 5.000 5.750 6.222 26
## Public2 4.453 1.0426 -0.2478 0.1286 1.778 3.889 4.556 5.111 7.000 155
## Public3 4.632 1.1316 -0.7535 1.0568 1.000 3.889 4.833 5.333 6.889 54
# Conduct a single-factor EFA
# install.packages("lavaan")
EFA_Pax <- fa(DFs, )
# View the results
# print(EFA_Pax)
# View the factor loadings
# EFA_Pax$loadings
# Plot factor scores
plot(density(EFA_Pax$scores, na.rm = TRUE), main = "Factor Scores", size = 2, col = "blue")
grid(nx = NULL, ny = NULL, col = "lightgray", lty = "dotted")
The plot of factor scores indicates the distribution of all survey
ratings assuming they all belong to a common factor.
Evaluating Model Structure with Indices: RMSR < 0.08, SRMR < 0.08, TLI > 0.90, CFI > 0.90, i.e. model fit is acceptable with seven factors. Scree Plot hints to eight factors instead of seven proposed by our variables. Therefore, we may need to split one less consistently structured factor into two.
# Calculate the correlation matrix first
DFS_EFA_corr <- cor(DFs, use = "pairwise.complete.obs")
# Then use that correlation matrix to calculate eigenvalues
eigenvals <- eigen(DFS_EFA_corr)
# Look at the eigenvalues returned
eigenvals$values
## [1] 28.4010 7.9071 3.9078 2.7397 1.4387 1.3085 1.1872 1.0916 1.0194
## [10] 1.0049 0.9391 0.9017 0.8229 0.7906 0.7537 0.7240 0.7033 0.6908
## [19] 0.6654 0.6556 0.6103 0.5983 0.5674 0.5527 0.5388 0.5356 0.5236
## [28] 0.5214 0.5022 0.4846 0.4771 0.4585 0.4528 0.4485 0.4445 0.4196
## [37] 0.4082 0.4014 0.3893 0.3809 0.3692 0.3630 0.3566 0.3505 0.3305
## [46] 0.3293 0.3212 0.3121 0.3103 0.2980 0.2890 0.2825 0.2779 0.2687
## [55] 0.2636 0.2573 0.2459 0.2381 0.2308 0.2226 0.2171 0.2110 0.2066
## [64] 0.1938 0.1889 0.1836 0.1830 0.1738 0.1686 0.1618 0.1549 0.1511
## [73] 0.1445 0.1378 0.1217 0.1158
# Prepare PDF
# pdf("ScreePlot.pdf", width = 25, height = 16)
# par(mai=c(2, 2, 2, 2))
# par(oma=c(2, 2, 2, 2))
# Plot Scree Plot
plot(eigenvals$values, log = "y",
main = "Scree Plot for Eigenvalues",
xlab = "Factor", xlim = c(0, 20),
ylab = "Eigenvalue of Factor", ylim = c(0.5, 25),
type = "o" # connect dots with line.
)
abline(h = 1, col = "red", lty = 5)
text(x = 12,
y = 1,
labels = "Eigenvalue of 1", cex = 1.0,
pos = 3,
col = "red")
grid(nx = NULL, ny = NULL, col = "lightgray", lty = "dotted")
# dev.off()
# Use the correlation matrix to create the scree plot
# scree(DFS_EFA_corr, factors = TRUE)
# Run the EFA with 7 factors (as indicated by scree plot)
library(psych)
EFA_model <- fa(DFs, nfactors = 7)
## Loading required namespace: GPArotation
print(EFA_model)
## Factor Analysis using method = minres
## Call: fa(r = DFs, nfactors = 7)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 MR4 MR5 MR6 MR7 h2 u2 com
## Q001 0.64 0.24 0.10 0.08 -0.19 -0.17 0.07 0.55 0.45 1.7
## Q002 0.66 0.25 0.07 0.00 -0.15 -0.12 0.00 0.54 0.46 1.5
## Q003 0.56 0.31 0.13 0.13 -0.17 -0.11 0.12 0.50 0.50 2.3
## Q004 0.62 0.19 0.14 0.04 0.01 -0.08 -0.08 0.46 0.54 1.4
## Q005 0.59 0.28 0.11 0.03 0.12 -0.19 -0.08 0.49 0.51 1.9
## Q006 0.67 0.29 0.07 0.05 0.02 -0.08 -0.15 0.57 0.43 1.6
## Q007 0.55 0.34 0.19 0.08 0.28 -0.14 0.05 0.56 0.44 2.8
## Q008 0.44 0.23 0.17 0.19 -0.04 0.02 0.20 0.35 0.65 2.8
## Q009 0.51 0.21 0.15 0.09 -0.02 -0.14 -0.01 0.36 0.64 1.8
## Q010 0.46 0.34 0.25 0.26 0.03 -0.13 0.00 0.47 0.53 3.4
## Q011 0.66 0.17 0.24 0.06 -0.03 -0.06 -0.14 0.55 0.45 1.5
## Q012 0.61 0.12 0.22 0.06 -0.06 -0.09 0.00 0.45 0.55 1.4
## Q013 0.64 -0.47 -0.07 0.10 0.08 -0.12 0.01 0.66 0.34 2.1
## Q014 0.58 -0.47 0.03 0.18 -0.08 0.05 -0.01 0.60 0.40 2.2
## Q015 0.62 -0.53 0.02 0.17 0.07 -0.07 -0.07 0.70 0.30 2.2
## Q016 0.61 -0.45 0.02 0.15 0.09 0.06 -0.03 0.61 0.39 2.1
## Q017 0.65 -0.45 -0.11 -0.01 0.03 -0.17 -0.03 0.67 0.33 2.0
## Q018 0.67 -0.50 -0.04 0.08 -0.03 0.04 0.01 0.71 0.29 1.9
## Q019 0.63 -0.43 0.02 0.22 -0.09 0.03 -0.06 0.64 0.36 2.1
## Q020 0.68 -0.42 0.00 0.19 -0.06 -0.02 -0.03 0.68 0.32 1.9
## Q021 0.66 -0.48 -0.03 0.09 -0.03 -0.06 -0.10 0.69 0.31 1.9
## Q022 0.65 -0.49 0.01 0.12 -0.06 0.01 -0.06 0.68 0.32 2.0
## Q023 0.66 -0.52 -0.02 0.06 0.03 -0.08 -0.07 0.71 0.29 2.0
## Q024 0.70 -0.48 -0.02 0.13 -0.04 -0.04 0.01 0.75 0.25 1.9
## Q025 0.56 -0.51 -0.05 0.09 -0.02 0.04 0.03 0.59 0.41 2.1
## Q026 0.59 -0.55 -0.02 0.07 -0.01 0.12 -0.04 0.68 0.32 2.1
## Q027 0.64 -0.49 -0.03 0.08 -0.02 0.00 -0.06 0.66 0.34 1.9
## Q028 0.64 -0.52 -0.10 0.05 0.06 0.00 -0.01 0.69 0.31 2.0
## Q029 0.51 -0.58 -0.10 -0.03 0.07 -0.10 0.03 0.62 0.38 2.2
## Q030 0.38 -0.18 -0.08 0.14 -0.02 0.06 0.11 0.22 0.78 2.1
## Q031 0.63 -0.21 -0.20 0.10 -0.01 -0.03 0.05 0.50 0.50 1.5
## Q032 0.66 -0.54 -0.03 0.01 0.11 -0.11 -0.03 0.76 0.24 2.1
## Q033 0.65 -0.06 0.33 -0.21 -0.03 0.25 0.04 0.64 0.36 2.1
## Q034 0.62 -0.11 0.35 -0.24 -0.07 0.18 0.05 0.62 0.38 2.3
## Q035 0.61 -0.20 0.34 -0.26 -0.03 0.23 0.04 0.65 0.35 2.6
## Q037 0.39 -0.17 0.23 -0.39 0.04 -0.10 0.02 0.40 0.60 3.2
## Q038 0.57 -0.14 0.33 -0.31 -0.01 0.01 0.07 0.56 0.44 2.4
## Q044 0.55 -0.15 0.32 -0.29 -0.08 0.07 0.15 0.55 0.45 2.7
## Q045 0.57 -0.07 0.37 -0.17 0.04 0.20 -0.09 0.55 0.45 2.3
## Q049 0.59 -0.12 0.23 -0.41 0.04 0.03 0.04 0.59 0.41 2.3
## Q050 0.43 -0.09 0.18 -0.48 0.15 0.00 0.02 0.48 0.52 2.6
## Q051 0.54 -0.04 0.18 -0.43 0.10 -0.12 -0.11 0.55 0.45 2.5
## Q054 0.53 -0.03 0.22 -0.31 0.02 -0.18 -0.03 0.46 0.54 2.3
## Q055 0.62 0.30 -0.03 0.00 -0.20 0.07 -0.12 0.54 0.46 1.8
## Q057 0.60 0.30 0.00 -0.04 -0.22 0.03 -0.15 0.52 0.48 2.0
## Q058 0.60 0.26 -0.03 -0.08 -0.06 0.02 -0.21 0.48 0.52 1.7
## Q059 0.65 0.39 0.05 0.07 -0.15 0.09 -0.15 0.63 0.37 2.0
## Q060 0.62 0.39 -0.09 -0.22 -0.04 -0.04 -0.14 0.61 0.39 2.1
## Q061 0.59 0.42 -0.09 -0.09 -0.06 -0.12 -0.07 0.56 0.44 2.1
## Q062 0.69 0.28 -0.18 0.08 0.08 0.18 -0.14 0.66 0.34 1.8
## Q063 0.51 0.17 -0.37 -0.12 0.12 0.07 -0.14 0.48 0.52 2.6
## Q064 0.65 0.25 -0.35 0.06 0.19 0.15 -0.12 0.69 0.31 2.4
## Q066 0.61 0.28 -0.26 0.03 0.15 0.19 -0.10 0.58 0.42 2.3
## Q067 0.68 0.27 -0.32 -0.08 0.11 0.16 -0.03 0.69 0.31 2.0
## Q068 0.67 0.29 -0.43 -0.02 0.08 0.06 -0.08 0.73 0.27 2.2
## Q069 0.45 0.11 -0.27 -0.02 0.05 0.13 -0.09 0.31 0.69 2.2
## Q070 0.58 0.17 0.18 0.11 -0.13 0.11 0.08 0.45 0.55 1.7
## Q071 0.67 0.08 0.18 0.04 -0.16 0.09 -0.02 0.52 0.48 1.4
## Q072 0.50 0.29 0.20 0.25 -0.18 0.07 0.09 0.48 0.52 3.1
## Q075 0.65 0.37 0.07 0.00 -0.12 -0.17 -0.07 0.61 0.39 1.9
## Q076 0.66 0.37 -0.02 -0.06 0.03 -0.09 -0.10 0.60 0.40 1.7
## Q077 0.55 0.22 0.15 0.23 -0.06 -0.07 0.03 0.44 0.56 2.0
## Q081 0.44 0.21 0.16 0.24 -0.18 0.17 0.07 0.39 0.61 3.2
## Q083 0.50 0.28 0.31 0.26 0.35 0.05 0.06 0.62 0.38 3.9
## Q084 0.53 0.34 0.23 0.22 0.32 0.01 0.12 0.62 0.38 3.5
## Q085 0.57 0.30 0.32 0.20 0.31 0.01 0.08 0.66 0.34 3.2
## Q086 0.47 0.23 0.31 0.29 0.14 0.10 0.09 0.50 0.50 3.6
## Q087 0.74 0.18 -0.34 -0.05 -0.05 0.02 0.11 0.70 0.30 1.6
## Q088 0.71 0.11 -0.33 -0.10 -0.04 -0.01 0.15 0.67 0.33 1.6
## Q089 0.72 0.17 -0.30 0.02 -0.09 0.05 0.07 0.65 0.35 1.5
## Q090 0.59 0.03 -0.21 -0.07 0.08 0.11 0.17 0.44 0.56 1.6
## Q091 0.72 0.15 -0.37 -0.16 0.00 -0.05 0.15 0.74 0.26 1.8
## Q092 0.72 0.13 -0.27 -0.05 -0.01 -0.05 0.09 0.62 0.38 1.4
## Q093 0.71 0.17 -0.37 -0.15 0.01 -0.09 0.22 0.74 0.26 2.0
## Q094 0.71 0.11 -0.33 -0.21 -0.03 -0.10 0.15 0.70 0.30 1.8
## Q095 0.67 0.08 -0.30 -0.05 -0.05 0.03 0.27 0.62 0.38 1.8
##
## MR1 MR2 MR3 MR4 MR5 MR6 MR7
## SS loadings 28.00 7.53 3.50 2.28 1.01 0.86 0.74
## Proportion Var 0.37 0.10 0.05 0.03 0.01 0.01 0.01
## Cumulative Var 0.37 0.47 0.51 0.54 0.56 0.57 0.58
## Proportion Explained 0.64 0.17 0.08 0.05 0.02 0.02 0.02
## Cumulative Proportion 0.64 0.81 0.89 0.94 0.96 0.98 1.00
##
## Mean item complexity = 2.1
## Test of the hypothesis that 7 factors are sufficient.
##
## The degrees of freedom for the null model are 2850 and the objective function was 61.91 with Chi Square of 28161
## The degrees of freedom for the model are 2339 and the objective function was 8.77
##
## The root mean square of the residuals (RMSR) is 0.02
## The df corrected root mean square of the residuals is 0.03
##
## The harmonic number of observations is 482 with the empirical chi square 1538 with prob < 1
## The total number of observations was 482 with Likelihood Chi Square = 3947 with prob < 6.2e-86
##
## Tucker Lewis Index of factoring reliability = 0.922
## RMSEA index = 0.038 and the 90 % confidence intervals are 0.036 0.04
## BIC = -10503
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## MR1 MR2 MR3 MR4 MR5 MR6
## Correlation of (regression) scores with factors 0.99 0.98 0.95 0.92 0.84 0.82
## Multiple R square of scores with factors 0.99 0.95 0.90 0.84 0.71 0.68
## Minimum correlation of possible factor scores 0.97 0.91 0.80 0.68 0.43 0.36
## MR7
## Correlation of (regression) scores with factors 0.81
## Multiple R square of scores with factors 0.65
## Minimum correlation of possible factor scores 0.30
Error plots give an idea of potential misfitting items (questions/statements) per factor (variable.)
# Create mean scores and confidence intervals
library(psych)
error.dots(Creativ, eyes = TRUE, sort = FALSE, main = "Creative Role Identity - CI Around Mean", xlim = c(1, 7), lcolor = "azure2")
error.dots(InnoReady, eyes = TRUE, sort = FALSE, main = "Individual Innovation Readyness - CI Around Mean", xlim = c(1, 7), lcolor = "pink")
error.dots(IRJP, eyes = TRUE, sort = FALSE, main = "In-Role Job Performance - CI Around Mean", xlim = c(1, 7), lcolor = "darkgoldenrod1")
error.dots(PsyCap, eyes = TRUE, sort = FALSE, main = "PsyCap - CI Around Mean", xlim = c(1, 7), lcolor = "lightblue")
error.dots(Support, eyes = TRUE, sort = FALSE, main = "Support for Innovation - CI Around Mean", xlim = c(1, 7), lcolor = "orange")
error.dots(Lead, eyes = TRUE, sort = FALSE, main = "Transformational Leadership - CI Around Mean", xlim = c(1, 7), lcolor = "lightgreen")
error.dots(IWB, eyes = TRUE, sort = FALSE, main = "Individual Innovative Work Behaviour - CI Around Mean", xlim = c(1, 7), lcolor = "cyan")
Support for innovation seems to have a less consistent item
structure.
Cronbach’s Alpha is an indicator for scale reliability. Raw alpha is sensitive to differences in the item variances. Standardized alpha is based upon the correlations rather than the covariances. A level of 0.7 and above is acceptable, whereas 0.8 should be achieved in research. When making important data driven decisions, 0.9 marks a minimum. If Guttman’s Lambda 6 (G6) is higher than Alpha, factor shows unequal item loadings.
# Cronbach Alpha
library(psych)
library(data.table)
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
# omega(Creativ, digits = 3)
cAlpha <- psych::alpha(x = Creativ)
## Number of categories should be increased in order to count frequencies.
alphaDF <- data.table(variable = "Individual Creative Role Identity", id = "ICR", cAlpha$total)
cAlpha <- psych::alpha(x = InnoReady)
## Number of categories should be increased in order to count frequencies.
alphaDF2 <- data.table(variable = "Individual Innovation Readiness", id = "IIR", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
cAlpha <- psych::alpha(x = IRJP)
alphaDF2 <- data.table(variable = "In-Role Job Performance", id = "IRJP", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
cAlpha <- psych::alpha(x = PsyCap)
## Number of categories should be increased in order to count frequencies.
alphaDF2 <- data.table(variable = "Psychological Capital", id = "PSY", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
cAlpha <- psych::alpha(x = Support)
## Number of categories should be increased in order to count frequencies.
alphaDF2 <- data.table(variable = "Support for Innovation", id = "SFI", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
cAlpha <- psych::alpha(x = Lead)
## Number of categories should be increased in order to count frequencies.
alphaDF2 <- data.table(variable = "Transformational Leadership", id = "TFL", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
cAlpha <- psych::alpha(x = IWB)
## Number of categories should be increased in order to count frequencies.
alphaDF2 <- data.table(variable = "Individual Innovative Work Behaviour", id = "IWB", cAlpha$total)
alphaDF <- rbind(alphaDF, alphaDF2)
alphaDF
## variable id raw_alpha std.alpha G6(smc)
## 1: Individual Creative Role Identity ICR 0.9286 0.9297 0.9361
## 2: Individual Innovation Readiness IIR 0.8526 0.8532 0.8433
## 3: In-Role Job Performance IRJP 0.8491 0.8526 0.8167
## 4: Psychological Capital PSY 0.9054 0.9061 0.9072
## 5: Support for Innovation SFI 0.9128 0.9145 0.9179
## 6: Transformational Leadership TFL 0.9678 0.9685 0.9714
## 7: Individual Innovative Work Behaviour IWB 0.9402 0.9403 0.9365
## average_r S/N ase mean sd median_r
## 1: 0.5041 13.215 0.004776 4.914 0.8973 0.5020
## 2: 0.4537 5.813 0.010227 5.506 0.7324 0.4487
## 3: 0.5911 5.783 0.011328 5.762 0.7654 0.5911
## 4: 0.4458 9.652 0.006361 5.360 0.7716 0.4469
## 5: 0.4930 10.698 0.005939 4.923 0.9511 0.4698
## 6: 0.6057 30.717 0.002109 5.047 1.0886 0.6360
## 7: 0.6365 15.757 0.004046 4.773 1.0880 0.6556
Individual Creative Role Identity, Support for Innovation and Transformational Leadership show indication of unequal factor loading by items.
par(mfrow=c(3, 3))
hist(DFvar$ICR, prob = T, xlim = c(1, 7), col = "azure", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$IIR, prob = T, xlim = c(1, 7), col = "pink", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$IRJ, prob = T, xlim = c(1, 7), col = "yellow", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$PSY, prob = T, xlim = c(1, 7), col = "lightblue", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$SFI, prob = T, xlim = c(1, 7), col = "orange", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$TFL, prob = T, xlim = c(1, 7), col = "lightgreen", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
hist(DFvar$IWB, prob = T, xlim = c(1, 7), col = "cyan", xlab= "", ylab="", , cex.lab = 2.5, cex.axis = 2.5, cex.main = 3.0)
library(RcmdrMisc)
numSummary(DFvar[,c("PSY", "TFL", "SFI", "ICR", "IIR", "IRJ", "IWB")],
groups = DFvar$Org,
statistics = c("mean", "sd", "skewness", "kurtosis", "quantiles"),
quantiles = c(0.0, 0.25, 0.5, 0.75, 1.00))
##
## Variable: PSY
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.395 0.7982 -0.80944 0.7569 3.250 5.083 5.542 5.896 7.000 90
## Private2 5.693 0.6389 -0.87454 1.1036 3.333 5.333 5.750 6.104 6.750 128
## Private3 5.545 0.6299 0.27186 0.2756 4.167 5.333 5.500 5.750 6.833 29
## Public1 5.516 0.5916 -0.17174 1.3777 3.917 5.250 5.458 5.875 6.833 26
## Public2 4.990 0.6846 -0.08597 0.2481 3.083 4.500 5.000 5.500 7.000 155
## Public3 5.404 0.9571 -1.93557 4.9623 2.000 5.021 5.583 6.000 6.833 54
##
## Variable: TFL
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.364 1.0871 -1.7026 4.1699 1.00 4.850 5.650 6.00 7.00 90
## Private2 5.002 1.1130 -0.6791 0.2834 1.65 4.375 5.100 5.90 6.90 128
## Private3 5.029 1.0490 -0.3276 -0.7175 2.85 4.050 5.200 5.80 6.90 29
## Public1 5.317 0.9582 -1.9878 5.0109 1.95 5.025 5.600 5.90 6.35 26
## Public2 4.859 1.0458 -0.6597 0.6068 1.95 4.350 5.000 5.55 7.00 155
## Public3 5.044 1.1381 -1.0379 2.3655 1.00 4.513 5.175 5.75 6.90 54
##
## Variable: SFI
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.107 0.9159 -1.1674 2.2492 1.545 4.750 5.273 5.795 6.545 90
## Private2 5.096 0.9435 -1.4131 2.9715 1.364 4.727 5.273 5.727 6.727 128
## Private3 4.851 0.9306 -0.9161 0.8079 2.500 4.364 5.182 5.455 6.455 29
## Public1 5.287 0.5579 -0.6276 1.3488 3.727 5.091 5.273 5.523 6.182 26
## Public2 4.681 0.8980 -0.6190 0.8620 1.273 4.091 4.727 5.364 7.000 155
## Public3 4.763 1.1513 -0.9790 1.3020 1.000 4.205 5.000 5.545 6.636 54
##
## Variable: ICR
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.199 0.8605 -0.47540 -0.2484 2.846 4.500 5.346 5.769 7.000 90
## Private2 5.276 0.7548 -0.35706 -0.3440 3.308 4.769 5.346 5.846 6.846 128
## Private3 4.729 0.9577 0.51991 0.3866 2.769 4.154 4.538 5.269 7.000 29
## Public1 4.947 0.8885 -0.61054 -0.4811 3.154 4.481 5.038 5.596 6.308 26
## Public2 4.513 0.8315 0.01644 0.4962 2.077 4.000 4.462 5.077 7.000 155
## Public3 4.812 0.9367 -0.70387 1.1393 2.000 4.231 4.885 5.462 6.538 54
##
## Variable: IIR
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.613 0.6857 -0.692813 1.3332 3.143 5.286 5.714 6.000 7.000 90
## Private2 5.765 0.6821 -0.981684 1.8367 3.286 5.429 5.857 6.143 7.000 128
## Private3 5.396 0.5212 0.237384 -0.3181 4.286 5.071 5.400 5.714 6.429 29
## Public1 5.714 0.5525 0.359473 -0.4587 4.857 5.286 5.714 6.107 7.000 26
## Public2 5.183 0.7060 -0.004028 -0.3551 3.571 4.643 5.171 5.643 7.000 155
## Public3 5.601 0.8401 -1.811214 5.7027 2.000 5.179 5.714 6.143 6.857 54
##
## Variable: IRJ
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.747 0.7749 -0.5938 0.3166 3.50 5.250 6.0 6.188 7 90
## Private2 5.963 0.7044 -0.6636 0.2451 3.75 5.500 6.0 6.500 7 128
## Private3 6.048 0.5968 0.0304 -0.6618 4.75 5.500 6.0 6.500 7 29
## Public1 5.942 0.7947 -0.5974 -0.1182 4.25 5.562 6.0 6.438 7 26
## Public2 5.468 0.7121 -0.2693 -0.3093 3.50 5.000 5.5 6.000 7 155
## Public3 5.917 0.8509 -2.0373 7.7973 2.00 5.500 6.0 6.500 7 54
##
## Variable: IWB
## mean sd skewness kurtosis 0% 25% 50% 75% 100% n
## Private1 5.091 1.1254 -0.5235 -0.2731 2.111 4.472 5.111 6.000 7.000 90
## Private2 5.006 0.9753 -0.5676 -0.2870 1.778 4.222 5.167 5.889 6.444 128
## Private3 4.771 1.0767 -0.1944 0.5547 2.333 4.167 4.667 5.500 7.000 29
## Public1 4.731 1.1847 -0.6806 -0.4105 1.889 4.028 5.000 5.750 6.222 26
## Public2 4.453 1.0426 -0.2478 0.1286 1.778 3.889 4.556 5.111 7.000 155
## Public3 4.632 1.1316 -0.7535 1.0568 1.000 3.889 4.833 5.333 6.889 54
All items (questions/statements) should be correlated with a p-value < 0.01. ## Correlation Matrix - Individual Creative Role Identity
# Plot Correlation Matrix
library(corrplot)
Mat <- cor(Creativ)
Res <- cor.mtest(Creativ, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - Individual Innovation Readyness
Mat <- cor(InnoReady)
Res <- cor.mtest(InnoReady, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - In-Role Job Performance
Mat <- cor(IRJP)
Res <- cor.mtest(IRJP, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - PsyCap
Mat <- cor(PsyCap)
Res <- cor.mtest(PsyCap, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - Support for Innovation
Mat <- cor(Support)
Res <- cor.mtest(Support, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - Transformational Leadership
Mat <- cor(Lead)
Res <- cor.mtest(Lead, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
## Correlation Matrix - Individdual Innovative Work Behaviour
Mat <- cor(IWB)
Res <- cor.mtest(IWB, conf.level = .95)
corrplot.mixed(Mat, lower.col = "black", number.cex = 2.0, upper = "pie", tl.col = "blue", tl.cex = 2.0, p.mat = Res$p, insig = "p-value", cl.ratio = 0.2, cl.align = "r", cl.lim = c(0, 1), cl.cex = 2.0)
Transformational Leadership
library(irr)
## Loading required package: lpSolve
ICC(Lead)
## Call: ICC(x = Lead)
##
## Intraclass correlation coefficients
## type ICC F df1 df2 p lower bound upper bound
## Single_raters_absolute ICC1 0.59 30 481 9158 0 0.56 0.62
## Single_random_raters ICC2 0.59 31 481 9139 0 0.56 0.62
## Single_fixed_raters ICC3 0.60 31 481 9139 0 0.57 0.63
## Average_raters_absolute ICC1k 0.97 30 481 9158 0 0.96 0.97
## Average_random_raters ICC2k 0.97 31 481 9139 0 0.96 0.97
## Average_fixed_raters ICC3k 0.97 31 481 9139 0 0.96 0.97
##
## Number of subjects = 482 Number of Judges = 20
## See the help file for a discussion of the other 4 McGraw and Wong estimates,
Support for Innovation
ICC(Support)
## Call: ICC(x = Support)
##
## Intraclass correlation coefficients
## type ICC F df1 df2 p lower bound upper bound
## Single_raters_absolute ICC1 0.44 9.7 481 4820 0 0.41 0.48
## Single_random_raters ICC2 0.45 11.5 481 4810 0 0.40 0.49
## Single_fixed_raters ICC3 0.49 11.5 481 4810 0 0.45 0.52
## Average_raters_absolute ICC1k 0.90 9.7 481 4820 0 0.88 0.91
## Average_random_raters ICC2k 0.90 11.5 481 4810 0 0.88 0.91
## Average_fixed_raters ICC3k 0.91 11.5 481 4810 0 0.90 0.92
##
## Number of subjects = 482 Number of Judges = 11
## See the help file for a discussion of the other 4 McGraw and Wong estimates,
Individual Innovation Readiness
ICC(InnoReady)
## Call: ICC(x = InnoReady)
##
## Intraclass correlation coefficients
## type ICC F df1 df2 p lower bound
## Single_raters_absolute ICC1 0.42 6.1 481 2892 2.3e-212 0.38
## Single_random_raters ICC2 0.42 6.8 481 2886 2.9e-243 0.38
## Single_fixed_raters ICC3 0.45 6.8 481 2886 2.9e-243 0.41
## Average_raters_absolute ICC1k 0.83 6.1 481 2892 2.3e-212 0.81
## Average_random_raters ICC2k 0.84 6.8 481 2886 2.9e-243 0.81
## Average_fixed_raters ICC3k 0.85 6.8 481 2886 2.9e-243 0.83
## upper bound
## Single_raters_absolute 0.46
## Single_random_raters 0.47
## Single_fixed_raters 0.49
## Average_raters_absolute 0.86
## Average_random_raters 0.86
## Average_fixed_raters 0.87
##
## Number of subjects = 482 Number of Judges = 7
## See the help file for a discussion of the other 4 McGraw and Wong estimates,
Individual Innovative Work Behaviour
ICC(IWB)
## Call: ICC(x = IWB)
##
## Intraclass correlation coefficients
## type ICC F df1 df2 p lower bound upper bound
## Single_raters_absolute ICC1 0.63 16 481 3856 0 0.59 0.66
## Single_random_raters ICC2 0.63 17 481 3848 0 0.59 0.66
## Single_fixed_raters ICC3 0.64 17 481 3848 0 0.60 0.67
## Average_raters_absolute ICC1k 0.94 16 481 3856 0 0.93 0.95
## Average_random_raters ICC2k 0.94 17 481 3848 0 0.93 0.95
## Average_fixed_raters ICC3k 0.94 17 481 3848 0 0.93 0.95
##
## Number of subjects = 482 Number of Judges = 9
## See the help file for a discussion of the other 4 McGraw and Wong estimates,
Intraclass correlation is evaluated against the following thresholds (Koo and Li, 2016): * below 0.50: poor * between 0.50 and 0.75: moderate * between 0.75 and 0.90: good * above 0.90: excellent
Variance Inflation Factors (VIF) have been studied.
lmModel <- lm(IWB ~ ICR + IIR + IRJ + PSY + SFI + TFL, data = DFvar)
# Check variance inflation factors
library(car)
vif <- (vif(lmModel))
vif
## ICR IIR IRJ PSY SFI TFL
## 2.513 3.724 2.190 4.447 1.929 1.609
All VIF are found to be lower than 5, i.e. this model is not inflated. It is ok.
IIR and SFI are removed step by step.
# TFI on IWB
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ ICR + IIR + IRJ + PSY + SFI + TFL, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9692 -0.2752 0.0537 0.3222 1.7225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.65526 0.20942 -3.13 0.0019 **
## ICR 0.83829 0.04384 19.12 <2e-16 ***
## IIR 0.00961 0.06539 0.15 0.8832
## IRJ -0.14944 0.04798 -3.11 0.0020 **
## PSY 0.14326 0.06782 2.11 0.0352 *
## SFI 0.01273 0.03624 0.35 0.7255
## TFL 0.25501 0.02891 8.82 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.544 on 475 degrees of freedom
## Multiple R-squared: 0.753, Adjusted R-squared: 0.75
## F-statistic: 241 on 6 and 475 DF, p-value: <2e-16
# Remove IIR due to insignificance
lmModel <- lm(IWB ~ ICR + IRJ + PSY + SFI + TFL, data = DFvar)
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ ICR + IRJ + PSY + SFI + TFL, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9677 -0.2744 0.0511 0.3201 1.7275
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.6470 0.2016 -3.21 0.0014 **
## ICR 0.8403 0.0416 20.22 <2e-16 ***
## IRJ -0.1479 0.0468 -3.16 0.0017 **
## PSY 0.1475 0.0612 2.41 0.0163 *
## SFI 0.0131 0.0361 0.36 0.7174
## TFL 0.2552 0.0288 8.85 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.544 on 476 degrees of freedom
## Multiple R-squared: 0.753, Adjusted R-squared: 0.75
## F-statistic: 290 on 5 and 476 DF, p-value: <2e-16
# Remove SFI due to insignificance
lmModel <- lm(IWB ~ ICR + IRJ + PSY + TFL, data = DFvar)
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ ICR + IRJ + PSY + TFL, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9727 -0.2768 0.0481 0.3214 1.6920
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.6426 0.2011 -3.20 0.0015 **
## ICR 0.8407 0.0415 20.25 <2e-16 ***
## IRJ -0.1472 0.0467 -3.15 0.0017 **
## PSY 0.1532 0.0591 2.59 0.0098 **
## TFL 0.2599 0.0258 10.07 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.543 on 477 degrees of freedom
## Multiple R-squared: 0.753, Adjusted R-squared: 0.751
## F-statistic: 363 on 4 and 477 DF, p-value: <2e-16
# Remove SFI due to insignificance
lmModel <- lm(IWB ~ IIR + SFI + TFL, data = DFvar)
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ IIR + SFI + TFL, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.533 -0.423 0.103 0.509 2.653
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.0673 0.2664 -4.01 7.1e-05 ***
## IIR 0.6854 0.0567 12.10 < 2e-16 ***
## SFI 0.0770 0.0486 1.58 0.11
## TFL 0.3345 0.0396 8.44 3.7e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.753 on 478 degrees of freedom
## Multiple R-squared: 0.524, Adjusted R-squared: 0.521
## F-statistic: 176 on 3 and 478 DF, p-value: <2e-16
# Prepare PDF
# pdf("Model01.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Plot model
library(semPlot)
semPaths(lmModel, intAtSide = FALSE, what = "stand", whatLabels = "stand", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.9, edge.color = "blue", layout = "tree", rotation = 2, curve = 1, curvePivot = TRUE, mar = c(3,2,7,2), sizeLat = 10, sizeMan = 10, color = colorlist)
title(main = "Model of ICR, IRJ, PSY, TFL Influencing IWB - Model 01\nIIR and SFI are not significant", cex.main = 2.5, col.main = "darkblue", font.main = 3, cex.sub = 1.4)
# # dev.off()
Strongest driver seems to be Individual Creative Role Identity. In the following, the impact of TFI on IWB under different models with SFI and IIR are studied.
# Add Sector as Moderator
lmModel <- lm(IWB ~ ICR + IRJ + PSY + TFL + Sector, data = DFvar)
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ ICR + IRJ + PSY + TFL + Sector, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.9403 -0.2805 0.0503 0.3278 1.6949
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.7251 0.2133 -3.40 0.00073 ***
## ICR 0.8492 0.0421 20.15 < 2e-16 ***
## IRJ -0.1491 0.0467 -3.19 0.00150 **
## PSY 0.1595 0.0593 2.69 0.00739 **
## TFL 0.2577 0.0259 9.96 < 2e-16 ***
## SectorPublic Service 0.0605 0.0523 1.16 0.24825
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.543 on 476 degrees of freedom
## Multiple R-squared: 0.754, Adjusted R-squared: 0.751
## F-statistic: 291 on 5 and 476 DF, p-value: <2e-16
# Add Org as Moderator
lmModel <- lm(IWB ~ ICR + IRJ + PSY + TFL + Org, data = DFvar)
summary(lmModel)
##
## Call:
## lm(formula = IWB ~ ICR + IRJ + PSY + TFL + Org, data = DFvar)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8687 -0.2697 0.0522 0.3348 1.6292
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.8199 0.2185 -3.75 0.0002 ***
## ICR 0.8629 0.0427 20.19 <2e-16 ***
## IRJ -0.1505 0.0467 -3.22 0.0014 **
## PSY 0.1730 0.0600 2.88 0.0041 **
## TFL 0.2529 0.0261 9.68 <2e-16 ***
## OrgPrivate2 -0.0789 0.0764 -1.03 0.3024
## OrgPrivate3 0.1895 0.1185 1.60 0.1106
## OrgPublic1 -0.1225 0.1211 -1.01 0.3124
## OrgPublic2 0.1095 0.0743 1.47 0.1414
## OrgPublic3 -0.0206 0.0948 -0.22 0.8283
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.539 on 472 degrees of freedom
## Multiple R-squared: 0.759, Adjusted R-squared: 0.755
## F-statistic: 165 on 9 and 472 DF, p-value: <2e-16
Both, Sector and Org do not have significant moderating effect on the multiple linear model.
Chisq: The model Chi-squared assesses overall fit and the discrepancy between the sample and fitted covariance matrices. Its p-value should be > .05 (i.e., the hypothesis of a perfect fit cannot be rejected). However, it is quite sensitive to sample size. Commonly, Chisq/DF < 3 is used as criteria.
GFI/AGFI: The (Adjusted) Goodness of Fit is the proportion of variance accounted for by the estimated population covariance. Analogous to R2. The GFI and the AGFI should be > .95 and > .90, respectively.
NFI/NNFI/TLI: The (Non) Normed Fit Index. An NFI of 0.95, indicates the model of interest improves the fit by 95% relative to the null model. The NNFI (also called the Tucker Lewis index; TLI) is preferable for smaller samples. They should be > .90 (Byrne, 1994) or > .95 (Schumacker & Lomax, 2004). TLI > .90. TLI: < .85(poor); .85-.90 (mediocre); .90-.95 (acceptable); .95-.99 (close); 1.00 (perfect)
CFI: The Comparative Fit Index is a revised form of NFI. Not very sensitive to sample size (Fan, Thompson, & Wang, 1999). Compares the fit of a target model to the fit of an independent, or null, model. CFI: < .85(poor); .85-.90 (mediocre); .90-.95 (acceptable); .95-.99 (close); 1.00 (perfect)
RMSEA: The Root Mean Square Error of Approximation is a parsimony-adjusted index. Values closer to 0 represent a good fit. It should be < .08 or < .05. The p-value printed with it tests the hypothesis that RMSEA is less than or equal to .05 (a cutoff sometimes used for good fit), and thus should be not significant. RMSEA: > .10 (poor); .08-.10 (mediocre); .05-.08 (acceptable); .01-.05 (close); .00 (perfect)
RMR/SRMR: the (Standardized) Root Mean Square Residual represents the square-root of the difference between the residuals of the sample covariance matrix and the hypothesized model. As the RMR can be sometimes hard to interpret, better to use SRMR. SRMR: > .10 (poor); .08-.10 (mediocre); .05-.08 (acceptable); .01-.05 (close); .00 (perfect)
RFI: the Relative Fit Index, also known as RHO1, is not guaranteed to vary from 0 to 1. However, RFI close to 1 indicates a good fit.
IFI: the Incremental Fit Index (IFI) adjusts the Normed Fit Index (NFI) for sample size and degrees of freedom (Bollen’s, 1989). Over 0.90 is a good fit, but the index can exceed 1.
PNFI: the Parsimony-Adjusted Measures Index. There is no commonly agreed-upon cutoff value for an acceptable model for this index. Should be > 0.50.
To Report: chi-square, RMSEA, CFI, RMSEA and SRMR.
# Building model for linear regression
library(lavaan)
## This is lavaan 0.6-12
## lavaan is FREE software! Please report any bugs.
##
## Attaching package: 'lavaan'
## The following object is masked from 'package:psych':
##
## cor2cov
model11 <- '
# latent variables
TFL =~ Q013 + Q014 + Q015 + Q016 + Q017 + Q018 + Q019 + Q020 + Q021 + Q022 + Q023 + Q024 + Q025 + Q026 + Q027 + Q028 + Q029 + Q030 + Q031 + Q032
IWB =~ Q087 + Q088 + Q089 + Q090 + Q091 + Q092 + Q093 + Q094 + Q095
# direct effect
IWB ~ a * TFL
DirEff := a
TotEff := a
'
# Calculate fit
fit11 <- sem(model11, data = DFs)
# Print results (fit indices, parameters, hypothesis tests)
summary(fit11, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 33 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 59
##
## Number of observations 482
##
## Model Test User Model:
##
## Test statistic 1040.564
## Degrees of freedom 376
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 12232.254
## Degrees of freedom 406
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.944
## Tucker-Lewis Index (TLI) 0.939
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -18516.795
## Loglikelihood unrestricted model (H1) -17996.513
##
## Akaike (AIC) 37151.589
## Bayesian (BIC) 37398.088
## Sample-size adjusted Bayesian (BIC) 37210.827
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.061
## 90 Percent confidence interval - lower 0.056
## 90 Percent confidence interval - upper 0.065
## P-value RMSEA <= 0.05 0.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.044
##
## Parameter Estimates:
##
## Standard errors Standard
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## TFL =~
## Q013 1.000
## Q014 0.903 0.048 18.823 0.000
## Q015 0.939 0.044 21.270 0.000
## Q016 0.858 0.045 19.226 0.000
## Q017 0.989 0.049 20.076 0.000
## Q018 0.976 0.045 21.763 0.000
## Q019 0.842 0.043 19.539 0.000
## Q020 0.957 0.046 20.971 0.000
## Q021 0.952 0.044 21.412 0.000
## Q022 0.918 0.043 21.115 0.000
## Q023 1.006 0.046 21.952 0.000
## Q024 0.931 0.041 22.774 0.000
## Q025 0.843 0.045 18.897 0.000
## Q026 0.914 0.045 20.468 0.000
## Q027 0.937 0.045 20.702 0.000
## Q028 0.941 0.044 21.380 0.000
## Q029 1.002 0.053 18.814 0.000
## Q030 0.542 0.057 9.497 0.000
## Q031 0.744 0.048 15.399 0.000
## Q032 1.040 0.047 22.254 0.000
## IWB =~
## Q087 1.000
## Q088 1.043 0.047 22.228 0.000
## Q089 0.933 0.044 21.123 0.000
## Q090 0.776 0.049 15.669 0.000
## Q091 1.089 0.045 24.408 0.000
## Q092 0.919 0.043 21.153 0.000
## Q093 1.086 0.045 24.095 0.000
## Q094 1.104 0.050 22.224 0.000
## Q095 0.939 0.046 20.516 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IWB ~
## TFL (a) 0.530 0.043 12.413 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 0.770 0.052 14.753 0.000
## .Q014 0.856 0.057 14.959 0.000
## .Q015 0.577 0.039 14.617 0.000
## .Q016 0.717 0.048 14.916 0.000
## .Q017 0.811 0.055 14.809 0.000
## .Q018 0.562 0.039 14.519 0.000
## .Q019 0.651 0.044 14.879 0.000
## .Q020 0.637 0.043 14.671 0.000
## .Q021 0.576 0.040 14.590 0.000
## .Q022 0.569 0.039 14.646 0.000
## .Q023 0.574 0.040 14.477 0.000
## .Q024 0.408 0.029 14.266 0.000
## .Q025 0.736 0.049 14.952 0.000
## .Q026 0.642 0.044 14.752 0.000
## .Q027 0.645 0.044 14.716 0.000
## .Q028 0.566 0.039 14.597 0.000
## .Q029 1.055 0.071 14.960 0.000
## .Q030 1.875 0.122 15.431 0.000
## .Q031 1.079 0.071 15.220 0.000
## .Q032 0.573 0.040 14.406 0.000
## .Q087 0.462 0.035 13.382 0.000
## .Q088 0.626 0.045 13.808 0.000
## .Q089 0.600 0.043 14.092 0.000
## .Q090 0.990 0.066 14.927 0.000
## .Q091 0.468 0.036 13.012 0.000
## .Q092 0.580 0.041 14.086 0.000
## .Q093 0.492 0.037 13.152 0.000
## .Q094 0.702 0.051 13.809 0.000
## .Q095 0.670 0.047 14.226 0.000
## TFL 1.378 0.130 10.586 0.000
## .IWB 0.755 0.068 11.087 0.000
##
## R-Square:
## Estimate
## Q013 0.642
## Q014 0.568
## Q015 0.678
## Q016 0.586
## Q017 0.624
## Q018 0.700
## Q019 0.600
## Q020 0.665
## Q021 0.684
## Q022 0.671
## Q023 0.708
## Q024 0.745
## Q025 0.571
## Q026 0.642
## Q027 0.653
## Q028 0.683
## Q029 0.567
## Q030 0.177
## Q031 0.414
## Q032 0.722
## Q087 0.712
## Q088 0.665
## Q089 0.624
## Q090 0.410
## Q091 0.743
## Q092 0.625
## Q093 0.732
## Q094 0.665
## Q095 0.600
## IWB 0.339
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## DirEff 0.530 0.043 12.413 0.000
## TotEff 0.530 0.043 12.413 0.000
modInd <- modificationIndices(fit11, minimum.value = 10)
# head(modInd[order(modInd$mi, decreasing=TRUE), ], 10)
subset(modInd[order(modInd$mi, decreasing=TRUE), ], mi > 5)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 91 IWB =~ Q031 53.41 0.422 0.451 0.332 0.332
## 423 Q029 ~~ Q032 45.83 0.255 0.255 0.328 0.328
## 105 Q013 ~~ Q026 23.26 -0.163 -0.163 -0.232 -0.232
## 224 Q018 ~~ Q020 22.90 0.140 0.140 0.233 0.233
## 290 Q021 ~~ Q023 21.90 0.132 0.132 0.229 0.229
## 276 Q020 ~~ Q029 20.34 -0.177 -0.177 -0.216 -0.216
## 111 Q013 ~~ Q032 19.01 0.141 0.141 0.213 0.213
## 106 Q013 ~~ Q027 18.80 -0.147 -0.147 -0.209 -0.209
## 261 Q019 ~~ Q089 17.61 0.128 0.128 0.204 0.204
## 221 Q017 ~~ Q094 17.47 0.155 0.155 0.206 0.206
## 141 Q014 ~~ Q089 15.47 0.137 0.137 0.191 0.191
## 94 Q013 ~~ Q015 15.03 0.125 0.125 0.188 0.188
## 255 Q019 ~~ Q029 14.41 -0.149 -0.149 -0.180 -0.180
## 433 Q030 ~~ Q031 13.91 0.245 0.245 0.172 0.172
## 258 Q019 ~~ Q032 13.86 -0.110 -0.110 -0.181 -0.181
## 125 Q014 ~~ Q019 13.71 0.131 0.131 0.176 0.176
## 456 Q032 ~~ Q089 13.58 -0.107 -0.107 -0.182 -0.182
## 254 Q019 ~~ Q028 13.56 -0.108 -0.108 -0.177 -0.177
## 259 Q019 ~~ Q087 13.55 0.101 0.101 0.183 0.183
## 379 Q026 ~~ Q027 12.74 0.111 0.111 0.172 0.172
## 391 Q026 ~~ Q093 12.29 -0.099 -0.099 -0.177 -0.177
## 471 Q088 ~~ Q089 12.09 -0.110 -0.110 -0.180 -0.180
## 121 Q014 ~~ Q015 11.60 0.115 0.115 0.163 0.163
## 108 Q013 ~~ Q029 11.45 0.146 0.146 0.162 0.162
## 164 Q015 ~~ Q032 11.24 0.095 0.095 0.165 0.165
## 429 Q029 ~~ Q092 11.01 -0.126 -0.126 -0.161 -0.161
## 212 Q017 ~~ Q031 10.71 0.144 0.144 0.154 0.154
## 75 IWB =~ Q015 10.13 -0.137 -0.147 -0.110 -0.110
Composite Reliability must be > 0.7
# Composite reliability
sl <- standardizedSolution(fit11)
sl <- sl$est.std[sl$op == "=~"]
re <- 1 - sl^2
cat(paste("Composite Reliability of Model is: ", round(sum(sl)^2 / (sum(sl)^2 + sum(re)), 5), "\n", sep = " ", collapse = NULL))
## Composite Reliability of Model is: 0.97934
# Amending model
model12 <- '
# latent variables
TFL =~ Q013 + Q014 + Q016 + Q017 + Q018 + Q019 + Q020 + Q021 + Q022 + Q023 + Q024 + Q025 + Q026 + Q027 + Q028 + Q029 + Q030 + Q032
IWB =~ Q087 + Q088 + Q089 + Q090 + Q091 + Q092 + Q093 + Q094 + Q095
# direct effect
IWB ~ b * TFL
DirEff := b
TotEff := b
# covariances
Q013 ~~ Q026
Q013 ~~ Q027
Q013 ~~ Q028
Q013 ~~ Q032
Q018 ~~ Q020
Q018 ~~ Q029
Q020 ~~ Q029
Q021 ~~ Q023
Q029 ~~ Q032
'
# Calculate fit
fit12 <- sem(model12, data = DFs)
# Print results (fit indices, parameters, hypothesis tests)
summary(fit12, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 37 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 64
##
## Number of observations 482
##
## Model Test User Model:
##
## Test statistic 699.086
## Degrees of freedom 314
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 11289.321
## Degrees of freedom 351
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.965
## Tucker-Lewis Index (TLI) 0.961
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -17161.883
## Loglikelihood unrestricted model (H1) -16812.339
##
## Akaike (AIC) 34451.765
## Bayesian (BIC) 34719.154
## Sample-size adjusted Bayesian (BIC) 34516.023
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.050
## 90 Percent confidence interval - lower 0.045
## 90 Percent confidence interval - upper 0.055
## P-value RMSEA <= 0.05 0.435
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.035
##
## Parameter Estimates:
##
## Standard errors Standard
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## TFL =~
## Q013 1.000
## Q014 0.899 0.048 18.757 0.000
## Q016 0.855 0.045 19.201 0.000
## Q017 0.984 0.049 20.008 0.000
## Q018 0.971 0.045 21.658 0.000
## Q019 0.839 0.043 19.495 0.000
## Q020 0.953 0.046 20.892 0.000
## Q021 0.947 0.044 21.284 0.000
## Q022 0.920 0.043 21.237 0.000
## Q023 1.003 0.046 21.919 0.000
## Q024 0.928 0.041 22.774 0.000
## Q025 0.843 0.045 18.928 0.000
## Q026 0.926 0.049 19.090 0.000
## Q027 0.943 0.049 19.251 0.000
## Q028 0.944 0.046 20.632 0.000
## Q029 0.993 0.053 18.599 0.000
## Q030 0.540 0.057 9.478 0.000
## Q032 1.022 0.043 23.916 0.000
## IWB =~
## Q087 1.000
## Q088 1.043 0.047 22.229 0.000
## Q089 0.933 0.044 21.118 0.000
## Q090 0.776 0.050 15.671 0.000
## Q091 1.089 0.045 24.404 0.000
## Q092 0.919 0.043 21.151 0.000
## Q093 1.086 0.045 24.092 0.000
## Q094 1.104 0.050 22.222 0.000
## Q095 0.939 0.046 20.522 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IWB ~
## TFL (b) 0.527 0.043 12.362 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 ~~
## .Q026 -0.137 0.033 -4.190 0.000
## .Q027 -0.127 0.033 -3.834 0.000
## .Q028 -0.061 0.031 -1.966 0.049
## .Q032 0.113 0.033 3.461 0.001
## .Q018 ~~
## .Q020 0.129 0.031 4.214 0.000
## .Q029 0.079 0.036 2.180 0.029
## .Q020 ~~
## .Q029 -0.138 0.038 -3.611 0.000
## .Q021 ~~
## .Q023 0.121 0.030 4.100 0.000
## .Q029 ~~
## .Q032 0.236 0.039 5.979 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 0.753 0.053 14.312 0.000
## .Q014 0.863 0.058 14.911 0.000
## .Q016 0.719 0.048 14.859 0.000
## .Q017 0.819 0.056 14.749 0.000
## .Q018 0.571 0.040 14.369 0.000
## .Q019 0.655 0.044 14.821 0.000
## .Q020 0.643 0.044 14.526 0.000
## .Q021 0.587 0.041 14.470 0.000
## .Q022 0.561 0.039 14.535 0.000
## .Q023 0.577 0.040 14.331 0.000
## .Q024 0.410 0.029 14.142 0.000
## .Q025 0.734 0.049 14.891 0.000
## .Q026 0.608 0.042 14.484 0.000
## .Q027 0.628 0.043 14.480 0.000
## .Q028 0.554 0.039 14.337 0.000
## .Q029 1.077 0.072 14.905 0.000
## .Q030 1.876 0.122 15.423 0.000
## .Q032 0.610 0.043 14.349 0.000
## .Q087 0.462 0.035 13.381 0.000
## .Q088 0.626 0.045 13.806 0.000
## .Q089 0.601 0.043 14.093 0.000
## .Q090 0.990 0.066 14.926 0.000
## .Q091 0.468 0.036 13.012 0.000
## .Q092 0.580 0.041 14.085 0.000
## .Q093 0.492 0.037 13.151 0.000
## .Q094 0.702 0.051 13.808 0.000
## .Q095 0.669 0.047 14.224 0.000
## TFL 1.382 0.130 10.610 0.000
## .IWB 0.758 0.068 11.080 0.000
##
## R-Square:
## Estimate
## Q013 0.648
## Q014 0.564
## Q016 0.584
## Q017 0.621
## Q018 0.695
## Q019 0.598
## Q020 0.661
## Q021 0.679
## Q022 0.676
## Q023 0.707
## Q024 0.744
## Q025 0.572
## Q026 0.661
## Q027 0.662
## Q028 0.690
## Q029 0.559
## Q030 0.177
## Q032 0.703
## Q087 0.712
## Q088 0.665
## Q089 0.623
## Q090 0.410
## Q091 0.743
## Q092 0.625
## Q093 0.732
## Q094 0.665
## Q095 0.601
## IWB 0.337
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## DirEff 0.527 0.043 12.362 0.000
## TotEff 0.527 0.043 12.362 0.000
modInd <- modificationIndices(fit12, minimum.value = 10)
# head(modInd[order(modInd$mi, decreasing=TRUE), ], 10)
subset(modInd[order(modInd$mi, decreasing=TRUE), ], mi > 5)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 224 Q019 ~~ Q089 18.29 0.131 0.131 0.208 0.208
## 188 Q017 ~~ Q094 17.63 0.157 0.157 0.207 0.207
## 218 Q019 ~~ Q028 17.23 -0.122 -0.122 -0.203 -0.203
## 136 Q014 ~~ Q089 16.05 0.140 0.140 0.195 0.195
## 121 Q014 ~~ Q019 14.81 0.138 0.138 0.184 0.184
## 222 Q019 ~~ Q087 13.79 0.102 0.102 0.185 0.185
## 107 Q013 ~~ Q029 13.35 0.159 0.159 0.177 0.177
## 410 Q088 ~~ Q089 12.07 -0.110 -0.110 -0.180 -0.180
## 379 Q029 ~~ Q092 11.26 -0.119 -0.119 -0.151 -0.151
## 312 Q024 ~~ Q089 10.29 0.079 0.079 0.160 0.160
## 81 IWB =~ Q017 10.25 0.163 0.175 0.119 0.119
## 345 Q026 ~~ Q093 10.16 -0.088 -0.088 -0.161 -0.161
# Show model performance
# library(performance)
# model_performance(fit12, metrics = "all", verbose = TRUE)
Commonly used estimation method Maximum Likelihood (ML) has been developed for continuous data following the normal-theory. This method is used to estimate all fit indices like RMSEA, CFI, and TLI. Since our data is generated using a 7-point Likert Scale, i.e. resulting in ordered discrete/categorical data, this method may not be the best to determine model fit (Yan Xia & Yanyun Yang, 2018).Therefore, methods based on Unweighted Least Squares (ULS) and Diagonally Weighted Least Squares (DWLS) based on polychoric correlation matrices have been considered in previous studies.
# Amending model
model13 <- '
# latent variables
TFL =~ Q013 + Q014 + Q016 + Q017 + Q018 + Q019 + Q020 + Q021 + Q022 + Q023 + Q024 + Q025 + Q026 + Q027 + Q028 + Q029 + Q030 + Q032
IWB =~ Q087 + Q088 + Q089 + Q090 + Q091 + Q092 + Q093 + Q094 + Q095
# direct effect
IWB ~ b * TFL
DirEff := b
TotEff := b
# covariances
Q013 ~~ Q026
Q013 ~~ Q027
Q013 ~~ Q028
Q013 ~~ Q032
Q018 ~~ Q020
Q018 ~~ Q029
Q020 ~~ Q029
Q021 ~~ Q023
Q029 ~~ Q032
'
# Calculate fit
fit13 <- sem(model13, data = DFs, estimator = "WLSMV")
# Print results (fit indices, parameters, hypothesis tests)
summary(fit13, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 55 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 64
##
## Number of observations 482
##
## Model Test User Model:
## Standard Robust
## Test Statistic 119.906 408.982
## Degrees of freedom 314 314
## P-value (Chi-square) 1.000 0.000
## Scaling correction factor 0.544
## Shift parameter 188.558
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 27290.560 3428.274
## Degrees of freedom 351 351
## P-value 0.000 0.000
## Scaling correction factor 8.754
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000 0.969
## Tucker-Lewis Index (TLI) 1.008 0.965
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000 0.025
## 90 Percent confidence interval - lower 0.000 0.018
## 90 Percent confidence interval - upper 0.000 0.032
## P-value RMSEA <= 0.05 1.000 1.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.032 0.032
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## TFL =~
## Q013 1.000
## Q014 0.867 0.047 18.269 0.000
## Q016 0.831 0.044 18.763 0.000
## Q017 0.994 0.039 25.206 0.000
## Q018 0.962 0.039 24.720 0.000
## Q019 0.812 0.046 17.509 0.000
## Q020 0.946 0.042 22.719 0.000
## Q021 0.927 0.042 22.066 0.000
## Q022 0.894 0.050 18.006 0.000
## Q023 0.978 0.036 27.301 0.000
## Q024 0.918 0.038 23.904 0.000
## Q025 0.818 0.045 18.185 0.000
## Q026 0.886 0.045 19.868 0.000
## Q027 0.921 0.045 20.384 0.000
## Q028 0.936 0.041 22.579 0.000
## Q029 0.955 0.042 22.989 0.000
## Q030 0.561 0.060 9.395 0.000
## Q032 0.999 0.037 27.136 0.000
## IWB =~
## Q087 1.000
## Q088 1.088 0.081 13.445 0.000
## Q089 0.963 0.056 17.273 0.000
## Q090 0.855 0.074 11.583 0.000
## Q091 1.084 0.066 16.380 0.000
## Q092 0.966 0.053 18.121 0.000
## Q093 1.060 0.050 21.025 0.000
## Q094 1.137 0.057 19.897 0.000
## Q095 0.990 0.065 15.251 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IWB ~
## TFL (b) 0.513 0.052 9.902 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 ~~
## .Q026 -0.158 0.046 -3.430 0.001
## .Q027 -0.162 0.040 -4.045 0.000
## .Q028 -0.116 0.044 -2.657 0.008
## .Q032 0.122 0.056 2.186 0.029
## .Q018 ~~
## .Q020 0.103 0.047 2.181 0.029
## .Q029 0.079 0.051 1.554 0.120
## .Q020 ~~
## .Q029 -0.136 0.050 -2.701 0.007
## .Q021 ~~
## .Q023 0.133 0.046 2.886 0.004
## .Q029 ~~
## .Q032 0.292 0.060 4.844 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 0.714 0.088 8.102 0.000
## .Q014 0.904 0.134 6.726 0.000
## .Q016 0.741 0.077 9.628 0.000
## .Q017 0.742 0.073 10.112 0.000
## .Q018 0.547 0.057 9.555 0.000
## .Q019 0.681 0.059 11.511 0.000
## .Q020 0.617 0.059 10.502 0.000
## .Q021 0.595 0.060 9.876 0.000
## .Q022 0.584 0.081 7.243 0.000
## .Q023 0.597 0.055 10.901 0.000
## .Q024 0.393 0.041 9.620 0.000
## .Q025 0.758 0.100 7.620 0.000
## .Q026 0.669 0.083 8.036 0.000
## .Q027 0.639 0.095 6.721 0.000
## .Q028 0.530 0.046 11.546 0.000
## .Q029 1.130 0.097 11.707 0.000
## .Q030 1.832 0.163 11.270 0.000
## .Q032 0.632 0.065 9.679 0.000
## .Q087 0.525 0.062 8.457 0.000
## .Q088 0.591 0.112 5.267 0.000
## .Q089 0.593 0.073 8.178 0.000
## .Q090 0.889 0.109 8.156 0.000
## .Q091 0.554 0.084 6.581 0.000
## .Q092 0.538 0.074 7.284 0.000
## .Q093 0.624 0.066 9.456 0.000
## .Q094 0.700 0.089 7.867 0.000
## .Q095 0.619 0.082 7.577 0.000
## TFL 1.438 0.130 11.073 0.000
## .IWB 0.704 0.089 7.894 0.000
##
## R-Square:
## Estimate
## Q013 0.668
## Q014 0.544
## Q016 0.573
## Q017 0.657
## Q018 0.709
## Q019 0.582
## Q020 0.676
## Q021 0.675
## Q022 0.663
## Q023 0.697
## Q024 0.755
## Q025 0.559
## Q026 0.628
## Q027 0.656
## Q028 0.704
## Q029 0.537
## Q030 0.198
## Q032 0.694
## Q087 0.673
## Q088 0.684
## Q089 0.629
## Q090 0.471
## Q091 0.696
## Q092 0.652
## Q093 0.661
## Q094 0.666
## Q095 0.631
## IWB 0.350
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## DirEff 0.513 0.052 9.902 0.000
## TotEff 0.513 0.052 9.902 0.000
modInd <- modificationIndices(fit12, minimum.value = 10)
# head(modInd[order(modInd$mi, decreasing=TRUE), ], 10)
subset(modInd[order(modInd$mi, decreasing=TRUE), ], mi > 5)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 224 Q019 ~~ Q089 18.29 0.131 0.131 0.208 0.208
## 188 Q017 ~~ Q094 17.63 0.157 0.157 0.207 0.207
## 218 Q019 ~~ Q028 17.23 -0.122 -0.122 -0.203 -0.203
## 136 Q014 ~~ Q089 16.05 0.140 0.140 0.195 0.195
## 121 Q014 ~~ Q019 14.81 0.138 0.138 0.184 0.184
## 222 Q019 ~~ Q087 13.79 0.102 0.102 0.185 0.185
## 107 Q013 ~~ Q029 13.35 0.159 0.159 0.177 0.177
## 410 Q088 ~~ Q089 12.07 -0.110 -0.110 -0.180 -0.180
## 379 Q029 ~~ Q092 11.26 -0.119 -0.119 -0.151 -0.151
## 312 Q024 ~~ Q089 10.29 0.079 0.079 0.160 0.160
## 81 IWB =~ Q017 10.25 0.163 0.175 0.119 0.119
## 345 Q026 ~~ Q093 10.16 -0.088 -0.088 -0.161 -0.161
# Show model performance
# library(performance)
# model_performance(fit12, metrics = "all", verbose = TRUE)
An alternative for models based on ordered discrete/categorical data for fit estimation is the Unweighted Least Squares (ULS) method.
# Amending model
model14 <- '
# latent variables
TFL =~ Q013 + Q014 + Q016 + Q017 + Q018 + Q019 + Q020 + Q021 + Q022 + Q023 + Q024 + Q025 + Q026 + Q027 + Q028 + Q029 + Q030 + Q032
IWB =~ Q087 + Q088 + Q089 + Q090 + Q091 + Q092 + Q093 + Q094 + Q095
# direct effect
IWB ~ b * TFL
DirEff := b
TotEff := b
# covariances
Q013 ~~ Q026
Q013 ~~ Q027
Q013 ~~ Q028
Q013 ~~ Q032
Q018 ~~ Q020
Q018 ~~ Q029
Q020 ~~ Q029
Q021 ~~ Q023
Q029 ~~ Q032
'
# Calculate fit
fit14 <- sem(model14, data = DFs, estimator = "ULSMV")
# Print results (fit indices, parameters, hypothesis tests)
summary(fit14, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 85 iterations
##
## Estimator ULS
## Optimization method NLMINB
## Number of model parameters 64
##
## Number of observations 482
##
## Model Test User Model:
## Standard Robust
## Test Statistic 663.522 413.518
## Degrees of freedom 314 314
## P-value (Unknown) NA 0.000
## Scaling correction factor 2.918
## Shift parameter 186.098
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 161341.604 3452.942
## Degrees of freedom 351 351
## P-value NA 0.000
## Scaling correction factor 51.366
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.998 0.968
## Tucker-Lewis Index (TLI) 0.998 0.964
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.048 0.026
## 90 Percent confidence interval - lower 0.043 0.018
## 90 Percent confidence interval - upper 0.053 0.032
## P-value RMSEA <= 0.05 0.724 1.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.032 0.032
##
## Parameter Estimates:
##
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## TFL =~
## Q013 1.000
## Q014 0.869 0.047 18.500 0.000
## Q016 0.832 0.044 18.794 0.000
## Q017 0.990 0.039 25.533 0.000
## Q018 0.959 0.038 24.998 0.000
## Q019 0.814 0.046 17.690 0.000
## Q020 0.942 0.040 23.312 0.000
## Q021 0.926 0.041 22.413 0.000
## Q022 0.895 0.049 18.191 0.000
## Q023 0.978 0.035 27.827 0.000
## Q024 0.915 0.038 24.044 0.000
## Q025 0.820 0.044 18.502 0.000
## Q026 0.889 0.044 20.119 0.000
## Q027 0.921 0.044 20.726 0.000
## Q028 0.933 0.041 22.738 0.000
## Q029 0.957 0.041 23.101 0.000
## Q030 0.553 0.060 9.209 0.000
## Q032 0.998 0.037 27.315 0.000
## IWB =~
## Q087 1.000
## Q088 1.092 0.082 13.358 0.000
## Q089 0.964 0.057 17.026 0.000
## Q090 0.858 0.074 11.602 0.000
## Q091 1.085 0.067 16.314 0.000
## Q092 0.968 0.054 17.983 0.000
## Q093 1.061 0.051 20.764 0.000
## Q094 1.142 0.058 19.717 0.000
## Q095 0.992 0.065 15.190 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IWB ~
## TFL (b) 0.511 0.051 9.965 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 ~~
## .Q026 -0.165 0.045 -3.676 0.000
## .Q027 -0.165 0.039 -4.229 0.000
## .Q028 -0.114 0.042 -2.701 0.007
## .Q032 0.120 0.053 2.266 0.023
## .Q018 ~~
## .Q020 0.110 0.046 2.363 0.018
## .Q029 0.078 0.049 1.580 0.114
## .Q020 ~~
## .Q029 -0.136 0.049 -2.768 0.006
## .Q021 ~~
## .Q023 0.132 0.044 2.994 0.003
## .Q029 ~~
## .Q032 0.288 0.057 5.013 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 0.711 0.084 8.416 0.000
## .Q014 0.895 0.133 6.712 0.000
## .Q016 0.738 0.077 9.585 0.000
## .Q017 0.750 0.072 10.420 0.000
## .Q018 0.553 0.056 9.821 0.000
## .Q019 0.675 0.058 11.571 0.000
## .Q020 0.624 0.057 10.975 0.000
## .Q021 0.596 0.059 10.141 0.000
## .Q022 0.580 0.080 7.218 0.000
## .Q023 0.594 0.053 11.305 0.000
## .Q024 0.399 0.040 9.999 0.000
## .Q025 0.752 0.098 7.668 0.000
## .Q026 0.658 0.081 8.150 0.000
## .Q027 0.636 0.092 6.898 0.000
## .Q028 0.535 0.045 11.897 0.000
## .Q029 1.123 0.094 11.987 0.000
## .Q030 1.843 0.163 11.296 0.000
## .Q032 0.631 0.063 10.074 0.000
## .Q087 0.529 0.063 8.381 0.000
## .Q088 0.585 0.113 5.182 0.000
## .Q089 0.595 0.075 7.959 0.000
## .Q090 0.888 0.109 8.154 0.000
## .Q091 0.555 0.085 6.567 0.000
## .Q092 0.537 0.075 7.151 0.000
## .Q093 0.628 0.067 9.319 0.000
## .Q094 0.694 0.090 7.670 0.000
## .Q095 0.617 0.082 7.559 0.000
## TFL 1.441 0.128 11.221 0.000
## .IWB 0.701 0.089 7.874 0.000
##
## R-Square:
## Estimate
## Q013 0.670
## Q014 0.549
## Q016 0.575
## Q017 0.653
## Q018 0.706
## Q019 0.586
## Q020 0.672
## Q021 0.675
## Q022 0.665
## Q023 0.699
## Q024 0.751
## Q025 0.563
## Q026 0.634
## Q027 0.658
## Q028 0.701
## Q029 0.540
## Q030 0.193
## Q032 0.695
## Q087 0.671
## Q088 0.687
## Q089 0.628
## Q090 0.472
## Q091 0.696
## Q092 0.653
## Q093 0.659
## Q094 0.669
## Q095 0.632
## IWB 0.350
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## DirEff 0.511 0.051 9.965 0.000
## TotEff 0.511 0.051 9.965 0.000
modInd <- modificationIndices(fit14, minimum.value = 10)
# head(modInd[order(modInd$mi, decreasing=TRUE), ], 10)
subset(modInd[order(modInd$mi, decreasing=TRUE), ], mi > 5)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 94 IWB =~ Q030 81.55 0.210 0.218 0.144 0.144
## 81 IWB =~ Q017 46.34 0.163 0.170 0.115 0.115
## 72 TFL =~ Q090 40.41 0.115 0.138 0.106 0.106
## 75 TFL =~ Q093 35.24 -0.112 -0.135 -0.099 -0.099
## 188 Q017 ~~ Q094 26.72 0.243 0.243 0.336 0.336
## 90 IWB =~ Q026 24.46 -0.118 -0.123 -0.092 -0.092
## 345 Q026 ~~ Q093 18.35 -0.200 -0.200 -0.311 -0.311
## 373 Q029 ~~ Q030 17.24 -0.197 -0.197 -0.137 -0.137
## 79 IWB =~ Q014 16.77 -0.097 -0.101 -0.072 -0.072
## 388 Q030 ~~ Q091 15.22 0.180 0.180 0.178 0.178
## 389 Q030 ~~ Q092 15.14 0.180 0.180 0.180 0.180
## 73 TFL =~ Q091 14.67 -0.073 -0.087 -0.065 -0.065
## 386 Q030 ~~ Q089 14.28 0.174 0.174 0.166 0.166
## 140 Q014 ~~ Q093 14.20 -0.176 -0.176 -0.234 -0.234
## 426 Q090 ~~ Q094 12.68 -0.175 -0.175 -0.223 -0.223
## 384 Q030 ~~ Q087 12.62 0.164 0.164 0.166 0.166
## 93 IWB =~ Q029 12.31 -0.085 -0.089 -0.057 -0.057
## 121 Q014 ~~ Q019 11.86 0.164 0.164 0.211 0.211
## 107 Q013 ~~ Q029 10.52 0.160 0.160 0.179 0.179
## 182 Q017 ~~ Q088 10.46 0.152 0.152 0.229 0.229
# Show model performance
# library(performance)
# model_performance(fit12, metrics = "all", verbose = TRUE)
# Comparing model fits
# anova(fit11, fit12, fit13) # Lavaan ERROR: some models (but not all) have scaled test statistics
# Prepare PDF for Model 11
# pdf("Model11.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Prepare fitmeasures
ParDF <- as.data.frame(do.call(cbind, fit11@ParTable))
DirEff <- round(as.numeric(ParDF[ParDF$label == "DirEff", 14]), 4)
TotEff <- round(as.numeric(ParDF[ParDF$label == "TotEff", 14]), 4)
n <- fit11@SampleStats@ntotal
fitMeas <- toString(c("ChiSq: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "chisq"))), 4),
" - ChiSq-p: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "pvalue"))), 4),
" - DF: ", gsub("[^0-9.]", "", fitMeasures(fit11, "df")),
" - ChiSq/DF: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "chisq")))/ as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "df"))), 4),
" - CFI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "cfi"))), 4),
" - TLI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "tli"))), 4),
" - RMSEA: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "rmsea"))), 4),
" - SRMR: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit11, "srmr"))), 4),
" - n: ", n,
" - DirEff: ", DirEff,
" - TotalEff: ", TotEff
),
width = 255)
fitMeas <- gsub(",", "", fitMeas)
# Plot model
library(semPlot)
semPaths(fit11, what = "stand", whatLabels = "stand", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.5, edge.color = "blue", layout = "tree", rotation = 3, curve = 1, curvePivot = TRUE, mar = c(3,1,5,1), sizeLat = 7, sizeMan = 3, color = colorlist)
title(main = "Model Showing Only Direct Effect of TFL on IWB - Model 11", cex.main = 2.5, col.main = "darkblue", font.main = 3, sub = fitMeas, cex.sub = 1.4)
# dev.off()
# Prepare PDF for Model 12
# pdf("Model12.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Prepare fitmeasures
ParDF <- as.data.frame(do.call(cbind, fit12@ParTable))
DirEff <- round(as.numeric(ParDF[ParDF$label == "DirEff", 14]), 4)
TotEff <- round(as.numeric(ParDF[ParDF$label == "TotEff", 14]), 4)
n <- fit12@SampleStats@ntotal
fitMeas <- toString(c("ChiSq: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "chisq"))), 4),
" - ChiSq-p: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "pvalue"))), 4),
" - DF: ", gsub("[^0-9.]", "", fitMeasures(fit12, "df")),
" - ChiSq/DF: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "chisq")))/ as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "df"))), 4),
" - CFI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "cfi"))), 4),
" - TLI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "tli"))), 4),
" - RMSEA: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "rmsea"))), 4),
" - SRMR: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit12, "srmr"))), 4),
" - n: ", n,
" - DirEff: ", DirEff,
" - TotalEff: ", TotEff
),
width = 255)
fitMeas <- gsub(",", "", fitMeas)
# Plot model
library(semPlot)
semPaths(fit12, what = "est", whatLabels = "est", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.5, edge.color = "blue", layout = "tree", rotation = 3, curve = 1, curvePivot = TRUE, mar = c(3,1,5,1), sizeLat = 7, sizeMan = 3, color = colorlist)
title(main = "Model Showing Only Direct Effect of TFL on IWB - Model 12\nSome Modification Indices Applied", cex.main = 2.5, col.main = "darkblue", font.main = 3, sub = fitMeas, cex.sub = 1.4)
# dev.off()
# Prepare PDF for Model 13
# pdf("Model13.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Prepare fitmeasures
ParDF <- as.data.frame(do.call(cbind, fit13@ParTable))
DirEff <- round(as.numeric(ParDF[ParDF$label == "DirEff", 14]), 4)
TotEff <- round(as.numeric(ParDF[ParDF$label == "TotEff", 14]), 4)
n <- fit13@SampleStats@ntotal
fitMeas <- toString(c("ChiSq: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "chisq"))), 4),
" - ChiSq-p: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "pvalue"))), 4),
" - DF: ", gsub("[^0-9.]", "", fitMeasures(fit13, "df")),
" - ChiSq/DF: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "chisq")))/ as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "df"))), 4),
" - CFI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "cfi"))), 4),
" - TLI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "tli"))), 4),
" - RMSEA: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "rmsea"))), 4),
" - SRMR: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit13, "srmr"))), 4),
" - n: ", n,
" - DirEff: ", DirEff,
" - TotalEff: ", TotEff
),
width = 255)
fitMeas <- gsub(",", "", fitMeas)
# Plot model
library(semPlot)
semPaths(fit13, what = "stand", whatLabels = "stand", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.5, edge.color = "blue", layout = "tree", rotation = 3, curve = 1, curvePivot = TRUE, mar = c(3,1,5,1), sizeLat = 7, sizeMan = 3, color = colorlist)
title(main = "Model Showing Only Direct Effect of TFL on IWB - Model 13\nEstimation Method DWLS", cex.main = 2.5, col.main = "darkblue", font.main = 3, sub = fitMeas, cex.sub = 1.4)
# dev.off()
# Prepare PDF for Model 14
# pdf("Model14.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Prepare fitmeasures
ParDF <- as.data.frame(do.call(cbind, fit14@ParTable))
DirEff <- round(as.numeric(ParDF[ParDF$label == "DirEff", 14]), 4)
TotEff <- round(as.numeric(ParDF[ParDF$label == "TotEff", 14]), 4)
n <- fit14@SampleStats@ntotal
fitMeas <- toString(c("ChiSq: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "chisq"))), 4),
" - ChiSq-p: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "pvalue"))), 4),
" - DF: ", gsub("[^0-9.]", "", fitMeasures(fit14, "df")),
" - ChiSq/DF: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "chisq")))/ as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "df"))), 4),
" - CFI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "cfi"))), 4),
" - TLI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "tli"))), 4),
" - RMSEA: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "rmsea"))), 4),
" - SRMR: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit14, "srmr"))), 4),
" - n: ", n,
" - DirEff: ", DirEff,
" - TotalEff: ", TotEff
),
width = 255)
fitMeas <- gsub(",", "", fitMeas)
# Plot model
library(semPlot)
semPaths(fit14, what = "stand", whatLabels = "stand", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.5, edge.color = "blue", layout = "tree", rotation = 3, curve = 1, curvePivot = TRUE, mar = c(3,1,5,1), sizeLat = 7, sizeMan = 3, color = colorlist)
title(main = "Model Showing Only Direct Effect of TFL on IWB - Model 14\nEstimation Method ULS", cex.main = 2.5, col.main = "darkblue", font.main = 3, sub = fitMeas, cex.sub = 1.4)
# dev.off()
After modification from Model 11 to Model 12, all indicators have improved. A significant difference between models was found.
# Compare fit measures
cbind("Model 11" = round(inspect(fit11, 'fit.measures'), 4),
"Model 12 (Cov)" = round(inspect(fit12, 'fit.measures'), 4),
"Model 13 (Cov + DWLS)" = round(inspect(fit13, 'fit.measures'), 4),
"Model 14 (Cov + ULS)" = round(inspect(fit14, 'fit.measures'), 4)
)
## Model 11 Model 12 (Cov) Model 13 (Cov + DWLS)
## npar 5.900e+01 6.400e+01 6.400e+01
## fmin 1.079e+00 7.252e-01 1.244e-01
## chisq 1.041e+03 6.991e+02 1.199e+02
## df 3.760e+02 3.140e+02 3.140e+02
## pvalue 0.000e+00 0.000e+00 1.000e+00
## chisq.scaled 1.223e+04 1.129e+04 4.090e+02
## df.scaled 4.060e+02 3.510e+02 3.140e+02
## pvalue.scaled 0.000e+00 0.000e+00 2.000e-04
## chisq.scaling.factor 9.438e-01 9.648e-01 5.440e-01
## baseline.chisq 9.393e-01 9.606e-01 2.729e+04
## baseline.df 9.393e-01 9.606e-01 3.510e+02
## baseline.pvalue 9.081e-01 9.308e-01 0.000e+00
## baseline.chisq.scaled 9.149e-01 9.381e-01 3.428e+03
## baseline.df.scaled 8.473e-01 8.392e-01 3.510e+02
## baseline.pvalue.scaled 9.439e-01 9.649e-01 0.000e+00
## baseline.chisq.scaling.factor 9.438e-01 9.648e-01 8.754e+00
## cfi -1.852e+04 -1.716e+04 1.000e+00
## tli -1.800e+04 -1.681e+04 1.008e+00
## nnfi 3.715e+04 3.445e+04 1.008e+00
## rfi 3.740e+04 3.472e+04 9.951e-01
## nfi 4.820e+02 4.820e+02 9.956e-01
## pnfi 3.721e+04 3.452e+04 8.907e-01
## ifi 6.060e-02 5.040e-02 1.007e+00
## rni 5.620e-02 4.540e-02 1.007e+00
## cfi.scaled 6.490e-02 5.550e-02 9.691e-01
## tli.scaled 0.000e+00 4.348e-01 9.655e-01
## cfi.robust 8.190e-02 6.610e-02 NA
## tli.robust 8.190e-02 6.610e-02 NA
## nnfi.scaled 4.390e-02 3.510e-02 9.655e-01
## nnfi.robust 4.390e-02 3.510e-02 NA
## rfi.scaled 4.390e-02 3.510e-02 8.666e-01
## nfi.scaled 4.550e-02 3.640e-02 8.807e-01
## ifi.scaled 4.550e-02 3.640e-02 9.695e-01
## rni.scaled 4.390e-02 3.510e-02 9.691e-01
## rni.robust 4.390e-02 3.510e-02 NA
## rmsea 1.966e+02 2.467e+02 0.000e+00
## rmsea.ci.lower 2.061e+02 2.597e+02 0.000e+00
## rmsea.ci.upper 8.629e-01 9.012e-01 0.000e+00
## rmsea.pvalue 8.413e-01 8.810e-01 1.000e+00
## rmsea.scaled 7.458e-01 7.486e-01 2.510e-02
## rmsea.ci.lower.scaled 5.019e-01 6.707e-01 1.760e-02
## rmsea.ci.upper.scaled 2.404e+00 1.716e+00 3.170e-02
## rmsea.pvalue.scaled 5.900e+01 6.400e+01 1.000e+00
## rmsea.robust 1.079e+00 7.252e-01 NA
## rmsea.ci.lower.robust 1.041e+03 6.991e+02 NA
## rmsea.ci.upper.robust 3.760e+02 3.140e+02 NA
## rmsea.pvalue.robust 0.000e+00 0.000e+00 NA
## rmr 1.223e+04 1.129e+04 6.050e-02
## rmr_nomean 4.060e+02 3.510e+02 6.050e-02
## srmr 0.000e+00 0.000e+00 3.210e-02
## srmr_bentler 9.438e-01 9.648e-01 3.210e-02
## srmr_bentler_nomean 9.393e-01 9.606e-01 3.210e-02
## crmr 9.393e-01 9.606e-01 3.340e-02
## crmr_nomean 9.081e-01 9.308e-01 3.340e-02
## srmr_mplus 9.149e-01 9.381e-01 3.210e-02
## srmr_mplus_nomean 8.473e-01 8.392e-01 3.210e-02
## cn_05 9.439e-01 9.649e-01 1.430e+03
## cn_01 9.438e-01 9.648e-01 1.506e+03
## gfi -1.852e+04 -1.716e+04 9.964e-01
## agfi -1.800e+04 -1.681e+04 9.957e-01
## pgfi 3.715e+04 3.445e+04 8.277e-01
## mfi 3.740e+04 3.472e+04 1.224e+00
## ecvi 4.820e+02 4.820e+02 5.154e-01
## Model 14 (Cov + ULS)
## npar 6.400e+01
## fmin 6.883e-01
## chisq 6.635e+02
## df 3.140e+02
## pvalue NA
## chisq.scaled 4.135e+02
## df.scaled 3.140e+02
## pvalue.scaled 1.000e-04
## chisq.scaling.factor 2.918e+00
## baseline.chisq 1.613e+05
## baseline.df 3.510e+02
## baseline.pvalue NA
## baseline.chisq.scaled 3.453e+03
## baseline.df.scaled 3.510e+02
## baseline.pvalue.scaled 0.000e+00
## baseline.chisq.scaling.factor 5.137e+01
## cfi 9.978e-01
## tli 9.976e-01
## nnfi 9.976e-01
## rfi 9.954e-01
## nfi 9.959e-01
## pnfi 8.909e-01
## ifi 9.978e-01
## rni 9.978e-01
## cfi.scaled 9.679e-01
## tli.scaled 9.641e-01
## cfi.robust NA
## tli.robust NA
## nnfi.scaled 9.641e-01
## nnfi.robust NA
## rfi.scaled 8.661e-01
## nfi.scaled 8.802e-01
## ifi.scaled 9.683e-01
## rni.scaled 9.679e-01
## rni.robust NA
## rmsea 4.810e-02
## rmsea.ci.lower 4.300e-02
## rmsea.ci.upper 5.320e-02
## rmsea.pvalue 7.239e-01
## rmsea.scaled 2.570e-02
## rmsea.ci.lower.scaled 1.830e-02
## rmsea.ci.upper.scaled 3.220e-02
## rmsea.pvalue.scaled 1.000e+00
## rmsea.robust NA
## rmsea.ci.lower.robust NA
## rmsea.ci.upper.robust NA
## rmsea.pvalue.robust NA
## rmr 6.040e-02
## rmr_nomean 6.040e-02
## srmr 3.210e-02
## srmr_bentler 3.210e-02
## srmr_bentler_nomean 3.210e-02
## crmr 3.330e-02
## crmr_nomean 3.330e-02
## srmr_mplus 3.210e-02
## srmr_mplus_nomean 3.210e-02
## cn_05 2.593e+02
## cn_01 2.730e+02
## gfi 9.968e-01
## agfi 9.961e-01
## pgfi 8.280e-01
## mfi 6.954e-01
## ecvi 1.646e+00
TLI and CFI show higher (better fit) values when using estimation methods DWLS and ULS whereas RMSEA shows lower (better fit) values when using those methods. Since there are no commony used thresholds available for both methods, we continue using the ML estimation method for model fit knowing that it might not be fair to our 7-point Likert Scale data, i.e. ordered discrete/categorical data.
# Amending model for Mediation by IRR
model22 <- '
# latent variables
IWB =~ Q088 + Q089 + Q090 + Q091 + Q092 + Q093 + Q094 + Q095
TFL =~ Q013 + Q014 + Q015 + Q016 + Q017 + Q018 + Q019 + Q020 + Q021 + Q022 + Q023 + Q024 + Q025 + Q026 + Q027 + Q028 + Q029 + Q031 + Q032
IIR =~ Q071 + Q072 + Q075 + Q076 + Q077 + Q081
# direct effect
IWB ~ c * TFL
DirEff := c
# mediator
IIR ~ a1 * TFL
IWB ~ b1 * IIR
# indirect effect
ab1 := a1 * b1
# total effect
TotEff := c + (a1 * b1)
# covariances
Q013 ~~ Q026
Q013 ~~ Q032
Q013 ~~ Q027
Q013 ~~ Q015
Q018 ~~ Q020
Q020 ~~ Q029
Q021 ~~ Q023
Q029 ~~ Q032
Q075 ~~ Q076
'
# Calculate fit22
fit22 <- sem(model22, data = DF)
# Print results (fit22 indices, parameters, hypothesis tests)
summary(fit22, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.6-12 ended normally after 40 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 78
##
## Number of observations 482
##
## Model Test User Model:
##
## Test statistic 1095.749
## Degrees of freedom 483
## P-value (Chi-square) 0.000
##
## Model Test Baseline Model:
##
## Test statistic 12996.947
## Degrees of freedom 528
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.951
## Tucker-Lewis Index (TLI) 0.946
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -20614.225
## Loglikelihood unrestricted model (H1) -20066.351
##
## Akaike (AIC) 41384.450
## Bayesian (BIC) 41710.330
## Sample-size adjusted Bayesian (BIC) 41462.765
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.051
## 90 Percent confidence interval - lower 0.047
## 90 Percent confidence interval - upper 0.055
## P-value RMSEA <= 0.05 0.292
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.052
##
## Parameter Estimates:
##
## Standard errors Standard
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## IWB =~
## Q088 1.000
## Q089 0.890 0.044 20.036 0.000
## Q090 0.742 0.049 15.225 0.000
## Q091 1.043 0.045 22.942 0.000
## Q092 0.878 0.044 20.096 0.000
## Q093 1.033 0.046 22.463 0.000
## Q094 1.059 0.050 21.133 0.000
## Q095 0.904 0.046 19.761 0.000
## TFL =~
## Q013 1.000
## Q014 0.904 0.048 18.847 0.000
## Q015 0.936 0.041 22.912 0.000
## Q016 0.859 0.045 19.242 0.000
## Q017 0.989 0.049 20.066 0.000
## Q018 0.971 0.045 21.600 0.000
## Q019 0.843 0.043 19.563 0.000
## Q020 0.954 0.046 20.810 0.000
## Q021 0.948 0.045 21.237 0.000
## Q022 0.920 0.043 21.173 0.000
## Q023 1.003 0.046 21.839 0.000
## Q024 0.932 0.041 22.814 0.000
## Q025 0.845 0.045 18.931 0.000
## Q026 0.924 0.048 19.073 0.000
## Q027 0.947 0.049 19.247 0.000
## Q028 0.941 0.044 21.390 0.000
## Q029 1.000 0.053 18.766 0.000
## Q031 0.743 0.048 15.364 0.000
## Q032 1.032 0.044 23.645 0.000
## IIR =~
## Q071 1.000
## Q072 0.836 0.067 12.391 0.000
## Q075 1.069 0.078 13.681 0.000
## Q076 0.965 0.076 12.777 0.000
## Q077 0.808 0.065 12.450 0.000
## Q081 0.715 0.066 10.793 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IWB ~
## TFL (c) 0.297 0.040 7.333 0.000
## IIR ~
## TFL (a1) 0.301 0.035 8.714 0.000
## IWB ~
## IIR (b1) 0.865 0.083 10.454 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## .Q013 ~~
## .Q026 -0.128 0.032 -3.973 0.000
## .Q032 0.087 0.031 2.843 0.004
## .Q027 -0.131 0.032 -4.050 0.000
## .Q015 0.098 0.032 3.021 0.003
## .Q018 ~~
## .Q020 0.146 0.031 4.735 0.000
## .Q020 ~~
## .Q029 -0.158 0.037 -4.298 0.000
## .Q021 ~~
## .Q023 0.126 0.030 4.252 0.000
## .Q029 ~~
## .Q032 0.218 0.039 5.578 0.000
## .Q075 ~~
## .Q076 0.127 0.035 3.650 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Q088 0.622 0.046 13.591 0.000
## .Q089 0.606 0.043 13.956 0.000
## .Q090 0.990 0.067 14.860 0.000
## .Q091 0.465 0.037 12.708 0.000
## .Q092 0.583 0.042 13.938 0.000
## .Q093 0.507 0.039 12.988 0.000
## .Q094 0.697 0.051 13.591 0.000
## .Q095 0.657 0.047 14.033 0.000
## .Q013 0.756 0.052 14.503 0.000
## .Q014 0.855 0.057 14.930 0.000
## .Q015 0.588 0.040 14.527 0.000
## .Q016 0.716 0.048 14.885 0.000
## .Q017 0.813 0.055 14.777 0.000
## .Q018 0.576 0.040 14.457 0.000
## .Q019 0.649 0.044 14.845 0.000
## .Q020 0.652 0.045 14.616 0.000
## .Q021 0.591 0.041 14.533 0.000
## .Q022 0.566 0.039 14.593 0.000
## .Q023 0.584 0.041 14.410 0.000
## .Q024 0.407 0.029 14.194 0.000
## .Q025 0.734 0.049 14.921 0.000
## .Q026 0.619 0.042 14.601 0.000
## .Q027 0.622 0.043 14.559 0.000
## .Q028 0.566 0.039 14.551 0.000
## .Q029 1.057 0.071 14.919 0.000
## .Q031 1.082 0.071 15.208 0.000
## .Q032 0.591 0.041 14.350 0.000
## .Q071 0.634 0.049 12.988 0.000
## .Q072 0.536 0.040 13.438 0.000
## .Q075 0.524 0.045 11.667 0.000
## .Q076 0.583 0.047 12.514 0.000
## .Q077 0.492 0.037 13.398 0.000
## .Q081 0.637 0.045 14.250 0.000
## .IWB 0.494 0.053 9.264 0.000
## TFL 1.376 0.130 10.600 0.000
## .IIR 0.435 0.056 7.762 0.000
##
## R-Square:
## Estimate
## Q088 0.667
## Q089 0.620
## Q090 0.409
## Q091 0.744
## Q092 0.622
## Q093 0.724
## Q094 0.667
## Q095 0.608
## Q013 0.645
## Q014 0.568
## Q015 0.672
## Q016 0.586
## Q017 0.623
## Q018 0.693
## Q019 0.601
## Q020 0.658
## Q021 0.677
## Q022 0.673
## Q023 0.703
## Q024 0.746
## Q025 0.572
## Q026 0.655
## Q027 0.665
## Q028 0.683
## Q029 0.565
## Q031 0.412
## Q032 0.713
## Q071 0.469
## Q072 0.422
## Q075 0.550
## Q076 0.472
## Q077 0.426
## Q081 0.310
## IWB 0.604
## IIR 0.223
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## DirEff 0.297 0.040 7.333 0.000
## ab1 0.260 0.034 7.580 0.000
## TotEff 0.557 0.046 12.245 0.000
modInd <- modificationIndices(fit22, minimum.value = 10)
# head(modInd[order(modInd$mi, decreasing=TRUE), ], 10)
subset(modInd[order(modInd$mi, decreasing=TRUE), ], mi > 5)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 102 IWB =~ Q031 50.84 0.398 0.444 0.327 0.327
## 107 IWB =~ Q076 33.30 0.340 0.380 0.361 0.361
## 118 TFL =~ Q071 30.81 0.231 0.270 0.248 0.248
## 149 IIR =~ Q031 27.86 0.430 0.321 0.237 0.237
## 105 IWB =~ Q072 24.10 -0.289 -0.322 -0.335 -0.335
## 664 Q072 ~~ Q081 23.23 0.147 0.147 0.252 0.252
## 195 Q089 ~~ Q019 19.30 0.135 0.135 0.215 0.215
## 333 Q094 ~~ Q017 16.76 0.153 0.153 0.203 0.203
## 190 Q089 ~~ Q014 14.81 0.135 0.135 0.188 0.188
## 511 Q019 ~~ Q028 13.87 -0.109 -0.109 -0.180 -0.180
## 437 Q015 ~~ Q032 13.75 0.102 0.102 0.173 0.173
## 403 Q014 ~~ Q019 13.49 0.130 0.130 0.175 0.175
## 663 Q072 ~~ Q077 12.33 0.099 0.099 0.193 0.193
## 151 Q088 ~~ Q089 12.09 -0.112 -0.112 -0.183 -0.183
## 148 IIR =~ Q029 11.66 -0.260 -0.194 -0.125 -0.125
## 268 Q091 ~~ Q072 11.53 -0.090 -0.090 -0.180 -0.180
## 399 Q014 ~~ Q015 11.27 0.112 0.112 0.158 0.158
## 292 Q092 ~~ Q029 11.12 -0.120 -0.120 -0.153 -0.153
## 477 Q017 ~~ Q031 11.10 0.148 0.148 0.157 0.157
## 145 IIR =~ Q026 10.95 -0.207 -0.155 -0.115 -0.115
## 87 IWB =~ Q015 10.91 -0.136 -0.152 -0.113 -0.113
## 125 IIR =~ Q089 10.70 0.299 0.224 0.177 0.177
## 391 Q013 ~~ Q029 10.59 0.136 0.136 0.152 0.152
## 285 Q092 ~~ Q022 10.59 0.092 0.092 0.161 0.161
## 89 IWB =~ Q017 10.54 0.159 0.178 0.121 0.121
## 109 IWB =~ Q081 10.40 -0.195 -0.218 -0.227 -0.227
## 647 Q031 ~~ Q076 10.27 0.119 0.119 0.149 0.149
# Show model performance
# library(performance)
# model_performance(fit22, metrics = "all", verbose = TRUE)
# Prepare PDF
# pdf("Model22.pdf", width = 25, height = 16)
par(mar=c(7, 1, 7, 1))
par(oma=c(1, 1, 1, 1))
# Prepare fitmeasures
ParDF <- as.data.frame(do.call(cbind, fit22@ParTable))
DirEff <- round(as.numeric(ParDF[ParDF$label == "DirEff", 14]), 4)
TotEff <- round(as.numeric(ParDF[ParDF$label == "TotEff", 14]), 4)
n <- fit22@SampleStats@ntotal
fitMeas <- toString(c("ChiSq: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "chisq"))), 4),
" - DF: ", gsub("[^0-9.]", "", fitMeasures(fit22, "df")),
" - ChiSq/DF: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "chisq")))/ as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "df"))), 4),
" - CFI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "cfi"))), 4),
" - TLI: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "tli"))), 4),
" - RMSEA: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "rmsea"))), 4),
" - SRMR: ", round(as.numeric(gsub("[^0-9.]", "", fitMeasures(fit22, "srmr"))), 4),
" - n: ", n,
" - DirEff: ", DirEff,
" - TotalEff: ", TotEff
),
width = 255)
fitMeas <- gsub(",", "", fitMeas)
# Plot model
library(semPlot)
semPaths(fit22, what = "stand", whatLabels = "stand", intercepts = FALSE, residuals = FALSE, edge.label.cex = 0.5, edge.color = "blue", layout = "tree", rotation = 3, curve = 1, curvePivot = TRUE, mar = c(3,1,5,1), sizeLat = 7, sizeMan = 3, color = colorlist)
title(main = "IIR Mediates Relationship of TFL on IWB - Model 22", cex.main = 2.5, col.main = "darkblue", font.main = 3, sub = fitMeas, cex.sub = 1.4)