library(lavaan)
## This is lavaan 0.5-18
## lavaan is BETA software! Please report any bugs.
library(semPlot)
library(dplyr)
##
## Attaching package: 'dplyr'
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(GPArotation)
library(psych)
library(car)
##
## Attaching package: 'car'
##
## The following object is masked from 'package:psych':
##
## logit
library(ggplot2)
##
## Attaching package: 'ggplot2'
##
## The following object is masked from 'package:psych':
##
## %+%
library(GGally)
##
## Attaching package: 'GGally'
##
## The following object is masked from 'package:dplyr':
##
## nasa
library(xtable)
data <- read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWB<-select(data, PWB_1, PWB_2, PWB_3, PWB_4, PWB_5, PWB_6, PWB_7, PWB_8, PWB_9)
PWB$PWB_1 <- 7- PWB$PWB_1
PWB$PWB_2 <- 7- PWB$PWB_2
PWB$PWB_3 <- 7- PWB$PWB_3
PWB$PWB_4 <- 7- PWB$PWB_4
PWB$PWB_9 <- 7- PWB$PWB_9
PWB<- data.frame(apply(PWB,2, as.numeric))
str(PWB)
## 'data.frame': 1160 obs. of 9 variables:
## $ PWB_1: num 4 4 5 2 2 5 2 6 5 6 ...
## $ PWB_2: num 3 5 6 2 2 4 2 6 5 6 ...
## $ PWB_3: num 5 5 5 4 3 6 5 5 5 3 ...
## $ PWB_4: num 2 2 6 4 3 5 2 1 5 3 ...
## $ PWB_5: num 4 2 1 3 4 3 1 2 1 2 ...
## $ PWB_6: num 5 5 4 4 3 4 4 4 5 6 ...
## $ PWB_7: num 4 3 6 5 2 3 3 4 5 6 ...
## $ PWB_8: num 3 2 3 4 3 4 3 4 5 3 ...
## $ PWB_9: num 6 5 6 4 4 6 3 6 6 6 ...
colnames(PWB) <- c("1","2", "3", "4", "5", "6", "7", "8", "9")
PWB<- PWB[complete.cases(PWB[,]),]
parallel<-fa.parallel(PWB, fm="ml",fa="fa")
## Parallel analysis suggests that the number of factors = 4 and the number of components = NA
#two factors are greater than one Eigenvalue scree plot says there are two factors. Paralel analysis suggests 4 factors
parallel$fa.values
## [1] 2.71498112 0.72011585 0.31430839 0.06663895 -0.02905703 -0.11170266
## [7] -0.20182935 -0.27880151 -0.50028767
#over 1=2, over .7=2
princomp(na.omit(PWB), cor = TRUE)
## Call:
## princomp(x = na.omit(PWB), cor = TRUE)
##
## Standard deviations:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7
## 1.8207095 1.2627946 1.0113072 0.8262932 0.8115969 0.7058747 0.6762542
## Comp.8 Comp.9
## 0.6372634 0.6037309
##
## 9 variables and 816 observations.
parallel2<-princomp(na.omit(PWB), cor = TRUE)
summary(parallel2)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.8207095 1.2627946 1.0113072 0.82629323 0.81159693
## Proportion of Variance 0.3683315 0.1771833 0.1136380 0.07586228 0.07318773
## Cumulative Proportion 0.3683315 0.5455148 0.6591528 0.73501511 0.80820284
## Comp.6 Comp.7 Comp.8 Comp.9
## Standard deviation 0.70587469 0.67625424 0.63726335 0.6037309
## Proportion of Variance 0.05536212 0.05081331 0.04512273 0.0404990
## Cumulative Proportion 0.86356496 0.91437827 0.95950100 1.0000000
plot(parallel2)##results show at least two factors
#simple structure
twofactor<-fa(PWB, nfactors=2, rotate="oblimin", fm="ml")
twofactor
## Factor Analysis using method = ml
## Call: fa(r = PWB, nfactors = 2, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 ML2 h2 u2 com
## 1 0.68 -0.16 0.46 0.54 1.1
## 2 0.50 0.08 0.27 0.73 1.1
## 3 0.77 -0.03 0.59 0.41 1.0
## 4 0.49 0.28 0.36 0.64 1.6
## 5 -0.78 0.00 0.61 0.39 1.0
## 6 0.47 0.25 0.32 0.68 1.5
## 7 -0.03 0.87 0.74 0.26 1.0
## 8 0.06 0.60 0.38 0.62 1.0
## 9 0.43 0.03 0.19 0.81 1.0
##
## ML1 ML2
## SS loadings 2.61 1.32
## Proportion Var 0.29 0.15
## Cumulative Var 0.29 0.44
## Proportion Explained 0.66 0.34
## Cumulative Proportion 0.66 1.00
##
## With factor correlations of
## ML1 ML2
## ML1 1.00 0.15
## ML2 0.15 1.00
##
## Mean item complexity = 1.1
## Test of the hypothesis that 2 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 19 and the objective function was 0.22
##
## The root mean square of the residuals (RMSR) is 0.05
## The df corrected root mean square of the residuals is 0.07
##
## The harmonic number of observations is 816 with the empirical chi square 168.66 with prob < 5.2e-26
## The total number of observations was 816 with MLE Chi Square = 182.15 with prob < 1.2e-28
##
## Tucker Lewis Index of factoring reliability = 0.845
## RMSEA index = 0.103 and the 90 % confidence intervals are 0.089 0.116
## BIC = 54.77
## Fit based upon off diagonal values = 0.97
## Measures of factor score adequacy
## ML1 ML2
## Correlation of scores with factors 0.92 0.89
## Multiple R square of scores with factors 0.84 0.79
## Minimum correlation of possible factor scores 0.68 0.59
1-((twofactor$STATISTIC - twofactor$dof)/(twofactor$null.chisq- twofactor$null.dof))
## [1] 0.9181226
fa2latex(fa(PWB,2,rotate="oblimin", fm="ml"), heading="Table 1. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB, 2, rotate = "oblimin", fm = "ml") % Called in the psych package Table 1. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r }
## \multicolumn{ 5 }{l}{ Table 1. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML1 & ML2 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.68} & -0.16 & 0.46 & 0.54 & 1.11 \cr
## 2 & \bf{ 0.50} & 0.08 & 0.27 & 0.73 & 1.06 \cr
## 3 & \bf{ 0.77} & -0.03 & 0.59 & 0.41 & 1.00 \cr
## 4 & \bf{ 0.49} & 0.28 & 0.36 & 0.64 & 1.58 \cr
## 5 & \bf{-0.78} & 0.00 & 0.61 & 0.39 & 1.00 \cr
## 6 & \bf{ 0.47} & 0.25 & 0.32 & 0.68 & 1.51 \cr
## 7 & -0.03 & \bf{ 0.87} & 0.74 & 0.26 & 1.00 \cr
## 8 & 0.06 & \bf{ 0.60} & 0.38 & 0.62 & 1.02 \cr
## 9 & \bf{ 0.43} & 0.03 & 0.19 & 0.81 & 1.01 \cr
## \hline \cr SS loadings & 2.61 & 1.32 & \cr
## \cr
## \hline \cr
## ML1 & 1.00 & 0.15 \cr
## ML2 & 0.15 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
threefactor<-fa(PWB, nfactors=3, rotate="oblimin", fm="ml")
threefactor
## Factor Analysis using method = ml
## Call: fa(r = PWB, nfactors = 3, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 ML2 ML3 h2 u2 com
## 1 0.52 -0.18 0.26 0.47 0.53 1.8
## 2 0.00 0.04 0.85 0.73 0.27 1.0
## 3 0.78 -0.05 0.02 0.61 0.39 1.0
## 4 0.35 0.26 0.23 0.36 0.64 2.6
## 5 -0.79 0.01 -0.02 0.64 0.36 1.0
## 6 0.60 0.25 -0.15 0.39 0.61 1.5
## 7 -0.04 0.85 0.04 0.73 0.27 1.0
## 8 0.07 0.61 0.01 0.39 0.61 1.0
## 9 0.20 0.01 0.35 0.24 0.76 1.6
##
## ML1 ML2 ML3
## SS loadings 2.15 1.29 1.12
## Proportion Var 0.24 0.14 0.12
## Cumulative Var 0.24 0.38 0.51
## Proportion Explained 0.47 0.28 0.25
## Cumulative Proportion 0.47 0.75 1.00
##
## With factor correlations of
## ML1 ML2 ML3
## ML1 1.00 0.15 0.50
## ML2 0.15 1.00 0.11
## ML3 0.50 0.11 1.00
##
## Mean item complexity = 1.4
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 12 and the objective function was 0.07
##
## The root mean square of the residuals (RMSR) is 0.03
## The df corrected root mean square of the residuals is 0.05
##
## The harmonic number of observations is 816 with the empirical chi square 43.22 with prob < 2.1e-05
## The total number of observations was 816 with MLE Chi Square = 60.05 with prob < 2.2e-08
##
## Tucker Lewis Index of factoring reliability = 0.927
## RMSEA index = 0.07 and the 90 % confidence intervals are 0.053 0.088
## BIC = -20.41
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## ML1 ML2 ML3
## Correlation of scores with factors 0.91 0.88 0.88
## Multiple R square of scores with factors 0.83 0.78 0.78
## Minimum correlation of possible factor scores 0.66 0.56 0.55
1-((threefactor$STATISTIC - threefactor$dof)/(threefactor$null.chisq- threefactor$null.dof))
## [1] 0.975888
fa2latex(fa(PWB,3,rotate="oblimin", fm="ml"), heading="Table 2. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB, 3, rotate = "oblimin", fm = "ml") % Called in the psych package Table 2. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 2. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML1 & ML2 & ML3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.52} & -0.18 & 0.26 & 0.47 & 0.53 & 1.77 \cr
## 2 & 0.00 & 0.04 & \bf{ 0.85} & 0.73 & 0.27 & 1.01 \cr
## 3 & \bf{ 0.78} & -0.05 & 0.02 & 0.61 & 0.39 & 1.01 \cr
## 4 & \bf{ 0.35} & 0.26 & 0.23 & 0.36 & 0.64 & 2.64 \cr
## 5 & \bf{-0.79} & 0.01 & -0.02 & 0.64 & 0.36 & 1.00 \cr
## 6 & \bf{ 0.60} & 0.25 & -0.15 & 0.39 & 0.61 & 1.48 \cr
## 7 & -0.04 & \bf{ 0.85} & 0.04 & 0.73 & 0.27 & 1.01 \cr
## 8 & 0.07 & \bf{ 0.61} & 0.01 & 0.39 & 0.61 & 1.03 \cr
## 9 & 0.20 & 0.01 & \bf{ 0.35} & 0.24 & 0.76 & 1.59 \cr
## \hline \cr SS loadings & 2.15 & 1.29 & 1.12 & \cr
## \cr
## \hline \cr
## ML1 & 1.00 & 0.15 & 0.50 \cr
## ML2 & 0.15 & 1.00 & 0.11 \cr
## ML3 & 0.50 & 0.11 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
fourfactor<-fa(PWB, nfactors=4, rotate="oblimin", fm="ml")
fourfactor
## Factor Analysis using method = ml
## Call: fa(r = PWB, nfactors = 4, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 ML2 ML3 ML4 h2 u2 com
## 1 0.13 -0.21 0.50 0.35 0.58 0.42 2.3
## 2 -0.01 0.08 0.77 -0.05 0.59 0.41 1.0
## 3 0.84 -0.06 -0.04 0.03 0.69 0.31 1.0
## 4 0.49 0.29 0.17 -0.17 0.44 0.56 2.2
## 5 -0.61 0.02 -0.11 -0.17 0.59 0.41 1.2
## 6 0.17 0.24 -0.02 0.60 0.59 0.41 1.5
## 7 -0.04 0.81 0.02 0.04 0.66 0.34 1.0
## 8 0.03 0.63 0.00 0.07 0.42 0.58 1.0
## 9 0.25 0.03 0.37 -0.15 0.28 0.72 2.2
##
## ML1 ML2 ML3 ML4
## SS loadings 1.68 1.27 1.20 0.67
## Proportion Var 0.19 0.14 0.13 0.07
## Cumulative Var 0.19 0.33 0.46 0.54
## Proportion Explained 0.35 0.26 0.25 0.14
## Cumulative Proportion 0.35 0.61 0.86 1.00
##
## With factor correlations of
## ML1 ML2 ML3 ML4
## ML1 1.00 0.14 0.61 0.48
## ML2 0.14 1.00 0.12 0.09
## ML3 0.61 0.12 1.00 0.19
## ML4 0.48 0.09 0.19 1.00
##
## Mean item complexity = 1.5
## Test of the hypothesis that 4 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 6 and the objective function was 0.01
##
## 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 816 with the empirical chi square 3.12 with prob < 0.79
## The total number of observations was 816 with MLE Chi Square = 4.91 with prob < 0.56
##
## Tucker Lewis Index of factoring reliability = 1.003
## RMSEA index = 0 and the 90 % confidence intervals are NA 0.041
## BIC = -35.31
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## ML1 ML2 ML3 ML4
## Correlation of scores with factors 0.91 0.87 0.86 0.79
## Multiple R square of scores with factors 0.83 0.75 0.74 0.62
## Minimum correlation of possible factor scores 0.65 0.50 0.48 0.24
1-((fourfactor$STATISTIC - fourfactor$dof)/(fourfactor$null.chisq- fourfactor$null.dof))
## [1] 1.000546
fa2latex(fa(PWB,4,rotate="oblimin", fm="ml"), heading="Table 3. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB, 4, rotate = "oblimin", fm = "ml") % Called in the psych package Table 3. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r r }
## \multicolumn{ 7 }{l}{ Table 3. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML1 & ML2 & ML3 & ML4 & h2 & u2 & com \cr
## \hline
## 1 & 0.13 & -0.21 & \bf{ 0.50} & \bf{ 0.35} & 0.58 & 0.42 & 2.32 \cr
## 2 & -0.01 & 0.08 & \bf{ 0.77} & -0.05 & 0.59 & 0.41 & 1.03 \cr
## 3 & \bf{ 0.84} & -0.06 & -0.04 & 0.03 & 0.69 & 0.31 & 1.01 \cr
## 4 & \bf{ 0.49} & 0.29 & 0.17 & -0.17 & 0.44 & 0.56 & 2.18 \cr
## 5 & \bf{-0.61} & 0.02 & -0.11 & -0.17 & 0.59 & 0.41 & 1.23 \cr
## 6 & 0.17 & 0.24 & -0.02 & \bf{ 0.60} & 0.59 & 0.41 & 1.50 \cr
## 7 & -0.04 & \bf{ 0.81} & 0.02 & 0.04 & 0.66 & 0.34 & 1.01 \cr
## 8 & 0.03 & \bf{ 0.63} & 0.00 & 0.07 & 0.42 & 0.58 & 1.03 \cr
## 9 & 0.25 & 0.03 & \bf{ 0.37} & -0.15 & 0.28 & 0.72 & 2.16 \cr
## \hline \cr SS loadings & 1.68 & 1.27 & 1.2 & 0.67 & \cr
## \cr
## \hline \cr
## ML1 & 1.00 & 0.14 & 0.61 & 0.48 \cr
## ML2 & 0.14 & 1.00 & 0.12 & 0.09 \cr
## ML3 & 0.61 & 0.12 & 1.00 & 0.19 \cr
## ML4 & 0.48 & 0.09 & 0.19 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
PWBWO15<-select(PWB, 1,3,4,5,6,9)
PWBWO15<-tbl_df(PWBWO15)
PWBWO15
## Source: local data frame [816 x 6]
##
## 1 3 4 5 6 9
## 1 4 5 2 4 5 6
## 2 4 5 2 2 5 5
## 3 5 5 6 1 4 6
## 4 2 4 4 3 4 4
## 5 2 3 3 4 3 4
## 6 5 6 5 3 4 6
## 7 2 5 2 1 4 3
## 8 6 5 1 2 4 6
## 9 5 5 5 1 5 6
## 10 6 3 3 2 6 6
## .. . . . . . .
twofactorWO15<-fa(PWBWO15, nfactors=1, rotate="oblimin", fm="ml")
twofactorWO15
## Factor Analysis using method = ml
## Call: fa(r = PWBWO15, nfactors = 1, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 h2 u2 com
## 1 0.62 0.38 0.62 1
## 3 0.78 0.61 0.39 1
## 4 0.52 0.27 0.73 1
## 5 -0.80 0.64 0.36 1
## 6 0.53 0.28 0.72 1
## 9 0.41 0.17 0.83 1
##
## ML1
## SS loadings 2.35
## Proportion Var 0.39
##
## Mean item complexity = 1
## Test of the hypothesis that 1 factor is sufficient.
##
## The degrees of freedom for the null model are 15 and the objective function was 1.54 with Chi Square of 1251.76
## The degrees of freedom for the model are 9 and the objective function was 0.05
##
## The root mean square of the residuals (RMSR) is 0.04
## The df corrected root mean square of the residuals is 0.05
##
## The harmonic number of observations is 816 with the empirical chi square 42.04 with prob < 3.2e-06
## The total number of observations was 816 with MLE Chi Square = 40.37 with prob < 6.5e-06
##
## Tucker Lewis Index of factoring reliability = 0.958
## RMSEA index = 0.066 and the 90 % confidence intervals are 0.046 0.087
## BIC = -19.97
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## ML1
## Correlation of scores with factors 0.91
## Multiple R square of scores with factors 0.83
## Minimum correlation of possible factor scores 0.66
fa2latex(fa(PWBWO15,3,rotate="oblimin", fm="ml"), heading="Table 4. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWBWO15, 3, rotate = "oblimin", fm = "ml") % Called in the psych package Table 4. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 4. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML2 & ML1 & ML3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.62} & 0.07 & -0.19 & 0.43 & 0.57 & 1.21 \cr
## 3 & \bf{ 0.78} & 0.00 & 0.14 & 0.64 & 0.36 & 1.06 \cr
## 4 & \bf{ 0.45} & 0.10 & 0.25 & 0.33 & 0.67 & 1.69 \cr
## 5 & \bf{-0.79} & -0.03 & 0.03 & 0.63 & 0.37 & 1.00 \cr
## 6 & \bf{ 0.60} & -0.11 & -0.11 & 0.32 & 0.68 & 1.13 \cr
## 9 & 0.00 & \bf{ 1.00} & 0.00 & 1.00 & 0.00 & 1.00 \cr
## \hline \cr SS loadings & 2.18 & 1.04 & 0.13 & \cr
## \cr
## \hline \cr
## ML2 & 1.00 & 0.38 & 0.09 \cr
## ML1 & 0.38 & 1.00 & 0.11 \cr
## ML3 & 0.09 & 0.11 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
1-((twofactorWO15$STATISTIC - twofactorWO15$dof)/(twofactorWO15$null.chisq- twofactorWO15$null.dof))
## [1] 0.9746336
PWB78<-select(PWB, 7,8)
PWB78<-tbl_df(PWB78)
PWB78
## Source: local data frame [816 x 2]
##
## 7 8
## 1 4 3
## 2 3 2
## 3 6 3
## 4 5 4
## 5 2 3
## 6 3 4
## 7 3 3
## 8 4 4
## 9 5 5
## 10 6 3
## .. . .
twofactor78<-fa(PWB78, nfactors=1, rotate="oblimin", fm="ml")
twofactor78
## Factor Analysis using method = ml
## Call: fa(r = PWB78, nfactors = 1, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 h2 u2 com
## 7 0.72 0.52 0.48 1
## 8 0.72 0.52 0.48 1
##
## ML1
## SS loadings 1.04
## Proportion Var 0.52
##
## Mean item complexity = 1
## Test of the hypothesis that 1 factor is sufficient.
##
## The degrees of freedom for the null model are 1 and the objective function was 0.32 with Chi Square of 256.27
## The degrees of freedom for the model are -1 and the objective function was 0
##
## The root mean square of the residuals (RMSR) is 0
## The df corrected root mean square of the residuals is NA
##
## The harmonic number of observations is 816 with the empirical chi square 0 with prob < NA
## The total number of observations was 816 with MLE Chi Square = 0 with prob < NA
##
## Tucker Lewis Index of factoring reliability = 1.004
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## ML1
## Correlation of scores with factors 0.83
## Multiple R square of scores with factors 0.68
## Minimum correlation of possible factor scores 0.37
fa2latex(fa(PWB78,1,rotate="oblimin", fm="ml"), heading="Table 5. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB78, 1, rotate = "oblimin", fm = "ml") % Called in the psych package Table 5. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r }
## \multicolumn{ 4 }{l}{ Table 5. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML1 & ML1.1 & ML1.2 & com \cr
## \hline
## 7 & \bf{0.72} & 0.52 & 0.48 & 1 \cr
## 8 & \bf{0.72} & 0.52 & 0.48 & 1 \cr
## \hline \cr SS loadings & 1.04 & \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
1-((twofactor78$STATISTIC - twofactor78$dof)/(twofactor78$null.chisq- twofactor78$null.dof))
## [1] 0.9960825
PWB29<-select(PWB, 2,8)
PWB29<-tbl_df(PWB29)
PWB29
## Source: local data frame [816 x 2]
##
## 2 8
## 1 3 3
## 2 5 2
## 3 6 3
## 4 2 4
## 5 2 3
## 6 4 4
## 7 2 3
## 8 6 4
## 9 5 5
## 10 6 3
## .. . .
twofactor29<-fa(PWB29, nfactors=1, rotate="oblimin", fm="ml")
twofactor29
## Factor Analysis using method = ml
## Call: fa(r = PWB29, nfactors = 1, rotate = "oblimin", fm = "ml")
## Standardized loadings (pattern matrix) based upon correlation matrix
## ML1 h2 u2 com
## 2 0.34 0.12 0.88 1
## 8 0.34 0.12 0.88 1
##
## ML1
## SS loadings 0.23
## Proportion Var 0.12
##
## Mean item complexity = 1
## Test of the hypothesis that 1 factor is sufficient.
##
## The degrees of freedom for the null model are 1 and the objective function was 0.01 with Chi Square of 11.26
## The degrees of freedom for the model are -1 and the objective function was 0
##
## The root mean square of the residuals (RMSR) is 0
## The df corrected root mean square of the residuals is NA
##
## The harmonic number of observations is 816 with the empirical chi square 0 with prob < NA
## The total number of observations was 816 with MLE Chi Square = 0 with prob < NA
##
## Tucker Lewis Index of factoring reliability = 1.098
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## ML1
## Correlation of scores with factors 0.46
## Multiple R square of scores with factors 0.21
## Minimum correlation of possible factor scores -0.58
fa2latex(fa(PWB29,1,rotate="oblimin", fm="ml"), heading="Table 6. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB29, 1, rotate = "oblimin", fm = "ml") % Called in the psych package Table 6. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r }
## \multicolumn{ 4 }{l}{ Table 6. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & ML1 & ML1.1 & ML1.2 & com \cr
## \hline
## 2 & \bf{0.34} & 0.12 & 0.88 & 1 \cr
## 8 & \bf{0.34} & 0.12 & 0.88 & 1 \cr
## \hline \cr SS loadings & 0.23 & \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
1-((twofactor29$STATISTIC - twofactor29$dof)/(twofactor29$null.chisq- twofactor29$null.dof))
## [1] 0.9025318
alpha(PWB, na.rm = TRUE, check.keys=TRUE)
## Warning in alpha(PWB, na.rm = TRUE, check.keys = TRUE): Some items were negatively correlated with total scale and were automatically reversed.
## This is indicated by a negative sign for the variable name.
##
## Reliability analysis
## Call: alpha(x = PWB, na.rm = TRUE, check.keys = TRUE)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd
## 0.78 0.77 0.8 0.27 3.4 0.017 4.3 0.88
##
## lower alpha upper 95% confidence boundaries
## 0.74 0.78 0.81
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se
## 1 0.75 0.75 0.77 0.27 3.0 0.019
## 2 0.75 0.75 0.77 0.27 2.9 0.019
## 3 0.73 0.73 0.76 0.25 2.7 0.020
## 4 0.74 0.74 0.77 0.26 2.8 0.020
## 5- 0.73 0.73 0.75 0.25 2.7 0.020
## 6 0.75 0.75 0.77 0.27 3.0 0.019
## 7 0.78 0.78 0.79 0.30 3.5 0.018
## 8 0.78 0.77 0.79 0.30 3.4 0.018
## 9 0.76 0.76 0.79 0.28 3.2 0.018
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## 1 816 0.63 0.61 0.56 0.48 3.9 1.6
## 2 816 0.62 0.62 0.55 0.49 3.9 1.4
## 3 816 0.72 0.70 0.67 0.59 4.2 1.6
## 4 816 0.67 0.67 0.61 0.54 4.0 1.5
## 5- 816 0.74 0.72 0.70 0.62 4.1 1.6
## 6 816 0.60 0.61 0.54 0.47 4.5 1.3
## 7 816 0.40 0.43 0.35 0.25 4.5 1.3
## 8 816 0.43 0.46 0.37 0.27 4.4 1.4
## 9 816 0.54 0.54 0.44 0.39 4.8 1.4
##
## Non missing response frequency for each item
## -1 0 1 2 3 4 5 6 7 8 miss
## 1 0.01 0.01 0.06 0.11 0.18 0.19 0.26 0.17 0.00 0.00 0
## 2 0.00 0.00 0.05 0.12 0.21 0.22 0.27 0.12 0.00 0.00 0
## 3 0.01 0.01 0.04 0.09 0.16 0.17 0.31 0.21 0.00 0.00 0
## 4 0.00 0.00 0.06 0.12 0.20 0.17 0.25 0.20 0.00 0.00 0
## 5 0.00 0.00 0.22 0.28 0.16 0.16 0.09 0.06 0.01 0.01 0
## 6 0.00 0.00 0.04 0.05 0.10 0.23 0.35 0.23 0.00 0.00 0
## 7 0.00 0.00 0.01 0.05 0.13 0.27 0.31 0.20 0.00 0.02 0
## 8 0.00 0.00 0.04 0.07 0.14 0.25 0.29 0.20 0.01 0.01 0
## 9 0.00 0.00 0.03 0.06 0.10 0.10 0.27 0.43 0.00 0.00 0
data <- read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
data<-tbl_df(data)
PWB<-select(data, PWB_1, PWB_2, PWB_3, PWB_4, PWB_5, PWB_6,PWB_7, PWB_8, PWB_9)
PWB$PWB_1 <- 7- PWB$PWB_1
PWB$PWB_2 <- 7- PWB$PWB_2
PWB$PWB_3 <- 7- PWB$PWB_3
PWB$PWB_4 <- 7- PWB$PWB_4
PWB$PWB_9 <- 7- PWB$PWB_9
PWB<-tbl_df(PWB)
PWB
## Source: local data frame [1,160 x 9]
##
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## 1 4 3 5 2 4 5 4 3 6
## 2 4 5 5 2 2 5 3 2 5
## 3 5 6 5 6 1 4 6 3 6
## 4 2 2 4 4 3 4 5 4 4
## 5 2 2 3 3 4 3 2 3 4
## 6 5 4 6 5 3 4 3 4 6
## 7 2 2 5 2 1 4 3 3 3
## 8 6 6 5 1 2 4 4 4 6
## 9 5 5 5 5 1 5 5 5 6
## 10 6 6 3 3 2 6 6 3 6
## .. ... ... ... ... ... ... ... ... ...
#ggpairs(PWB, columns = 1:15, title="Big 5 Marsh" )
two.model= ' Factor1 =~ PWB_1 + PWB_3 + PWB_4 + PWB_5 + PWB_6 + PWB_9
Factor2 =~ PWB_2+ PWB_7 + PWB_8
' #Models two factors:Positive and Negative
one.model= 'PWB =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_6 + PWB_7 + PWB_8 + PWB_9' #Models as a single purpose factor
Second order models
second.model = ' Negative =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_9
Positive =~ PWB_6 + PWB_7 + PWB_8
Purpose =~ Negative + Positive
' #Second order models as Purpose being the higher factor made up of Purpose and Positive
Bifactor (like model 7 in Marsh, Scalas & Nagengast, 2010)
bifactor.negative.model = 'Negative =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_9
PWB =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_6 + PWB_7 + PWB_8 + PWB_9
'
#Models bifactor as the negatively worded item as a factor uncorolated with the main factor
bifactor.model1 = 'PWB =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_6 + PWB_7 + PWB_8 + PWB_9
Negative =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_9
Positive =~ PWB_6 + PWB_7 + PWB_8
PWB ~~ 0*Negative
PWB ~~ 0*Positive
Negative~~0*Positive
'#Models bifactor with Positive and Purpose as factors uncorolated with the main factor
bifactor.model2 = 'PWB =~ PWB_1 + PWB_2 + PWB_3 + PWB_4 + PWB_5 + PWB_6 + PWB_7 + PWB_8 + PWB_9
F1 =~ PWB_1 + PWB_3 + PWB_5 + PWB_6
F2 =~ PWB_4 + PWB_7 + PWB_8
F3 =~ PWB_2 + PWB_9
PWB ~~ 0*F1
PWB ~~ 0*F2
PWB ~~ 0*F3
F1~~0*F2
F1~~0*F3
F2~~0*F3
'#Models bifactor with Positive and Purpose as factors uncorolated with the main factor
two.fit=cfa(two.model, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
one.fit=cfa(one.model, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
second.fit=cfa(second.model, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
bifactor1.fit=cfa(bifactor.model1, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
bifactor2.fit=cfa(bifactor.model2, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
bifactorneg.fit = cfa(bifactor.negative.model, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
bifactor.negative.fit=cfa(bifactor.negative.model, data=PWB, missing = "fiml", std.lv = T)
## Warning in lav_data_full(data = data, group = group, group.label = group.label, : lavaan WARNING: some cases are empty and will be removed:
## 17 22 23 24 28 29 43 45 78 79 80 81 85 93 94 95 110 111 112 116 121 122 123 124 125 128 129 130 131 133 135 137 138 140 147 151 152 155 156 162 166 169 170 171 172 173 174 176 177 179 180 183 184 186 187 188 189 192 194 195 197 200 202 203 204 207 208 210 212 214 215 217 220 222 223 224 226 227 228 229 230 234 238 240 243 245 246 247 249 252 255 256 265 266 267 268 270 271 274 275 280 281 282 284 286 287 289 291 292 298 300 304 309 310 311 312 315 316 317 320 322 325 327 330 333 334 336 339 340 344 348 350 351 352 354 355 357 360 361 362 364 365 366 367 368 369 370 371 372 373 374 375 376 377 379 380 381 384 385 386 389 390 397 398 399 400 401 402 403 404 405 406 407 408 410 416 417 418 419 420 421 422 423 424 425 427 428 429 430 431 432 434 436 444 445 446 447 448 452 453 454 455 456 457 459 460 462 463 464 465 467 468 470 472 473 474 475 476 478 481 482 485 486 490 491 493 495 539 540 541 542 543 544 545 546 548 549 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 662 679 687 782 783 784 785 809 810 829 903 906 907 909 911 1110 1112 1113 1114 1116 1117 1120 1121 1122 1125 1126 1128 1129 1130 1131 1132 1134 1136 1137 1138 1139 1140 1143 1145 1146 1147 1150 1151 1152 1154 1155 1159 1160
semPaths(two.fit, whatLabels = "std", layout = "tree")
semPaths(two.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 4, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
semPaths(one.fit, whatLabels = "std", layout = "tree")
semPaths(one.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 4, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
semPaths(second.fit, whatLabels = "std", layout = "tree")
semPaths(second.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 4, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
semPaths(bifactor1.fit, whatLabels = "std", layout = "tree")
semPaths(bifactor1.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 5, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
semPaths(bifactor2.fit, whatLabels = "std", layout = "tree")
semPaths(bifactor2.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 4, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
semPaths(bifactorneg.fit, whatLabels = "std", layout = "tree")
semPaths(bifactorneg.fit, intercepts = FALSE, residual = FALSE, layout = "tree2", sizeMan = 4, font = 3,
sizeLat=4.3, bifactor = "Purpose",edge.color="black", nCharNodes = 6, mar = c(3, 1,3, 1))
#summaries
summary(two.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 32 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 518.107
## Degrees of freedom 26
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## Factor1 =~
## PWB_1 0.987 0.056 17.715 0.000 0.987 0.612
## PWB_3 1.231 0.051 23.962 0.000 1.231 0.777
## PWB_4 0.805 0.054 14.855 0.000 0.805 0.531
## PWB_5 -1.288 0.052 -24.761 0.000 -1.288 -0.797
## PWB_6 0.698 0.046 15.124 0.000 0.698 0.537
## PWB_9 0.585 0.053 11.144 0.000 0.585 0.410
## Factor2 =~
## PWB_2 0.327 0.063 5.151 0.000 0.327 0.227
## PWB_7 0.891 0.065 13.766 0.000 0.891 0.694
## PWB_8 1.020 0.073 13.929 0.000 1.020 0.732
##
## Covariances:
## Factor1 ~~
## Factor2 0.269 0.047 5.746 0.000 0.269 0.269
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.878 0.000 2.877 1.781
## PWB_6 4.499 0.045 98.963 0.000 4.499 3.464
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## Factor1 0.000 0.000 0.000
## Factor2 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.625 0.092 1.625 0.625
## PWB_3 0.992 0.074 0.992 0.396
## PWB_4 1.652 0.090 1.652 0.719
## PWB_5 0.952 0.075 0.952 0.365
## PWB_6 1.200 0.065 1.200 0.711
## PWB_9 1.699 0.088 1.699 0.832
## PWB_2 1.972 0.101 1.972 0.949
## PWB_7 0.854 0.101 0.854 0.518
## PWB_8 0.903 0.131 0.903 0.465
## Factor1 1.000 1.000 1.000
## Factor2 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.375
## PWB_3 0.604
## PWB_4 0.281
## PWB_5 0.635
## PWB_6 0.289
## PWB_9 0.168
## PWB_2 0.051
## PWB_7 0.482
## PWB_8 0.535
(xtable(parameterEstimates(two.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & Factor1 & =\~{} & PWB\_1 & 0.99 & 0.06 & 17.71 & 0.00 & 0.99 & 0.61 & 0.61 \\
## 2 & Factor1 & =\~{} & PWB\_3 & 1.23 & 0.05 & 23.96 & 0.00 & 1.23 & 0.78 & 0.78 \\
## 3 & Factor1 & =\~{} & PWB\_4 & 0.80 & 0.05 & 14.85 & 0.00 & 0.80 & 0.53 & 0.53 \\
## 4 & Factor1 & =\~{} & PWB\_5 & -1.29 & 0.05 & -24.76 & 0.00 & -1.29 & -0.80 & -0.80 \\
## 5 & Factor1 & =\~{} & PWB\_6 & 0.70 & 0.05 & 15.12 & 0.00 & 0.70 & 0.54 & 0.54 \\
## 6 & Factor1 & =\~{} & PWB\_9 & 0.59 & 0.05 & 11.14 & 0.00 & 0.59 & 0.41 & 0.41 \\
## 7 & Factor2 & =\~{} & PWB\_2 & 0.33 & 0.06 & 5.15 & 0.00 & 0.33 & 0.23 & 0.23 \\
## 8 & Factor2 & =\~{} & PWB\_7 & 0.89 & 0.06 & 13.77 & 0.00 & 0.89 & 0.69 & 0.69 \\
## 9 & Factor2 & =\~{} & PWB\_8 & 1.02 & 0.07 & 13.93 & 0.00 & 1.02 & 0.73 & 0.73 \\
## 10 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.62 & 0.09 & 17.65 & 0.00 & 1.62 & 0.63 & 0.63 \\
## 11 & PWB\_3 & \~{}\~{} & PWB\_3 & 0.99 & 0.07 & 13.50 & 0.00 & 0.99 & 0.40 & 0.40 \\
## 12 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.65 & 0.09 & 18.46 & 0.00 & 1.65 & 0.72 & 0.72 \\
## 13 & PWB\_5 & \~{}\~{} & PWB\_5 & 0.95 & 0.08 & 12.62 & 0.00 & 0.95 & 0.36 & 0.36 \\
## 14 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.20 & 0.07 & 18.45 & 0.00 & 1.20 & 0.71 & 0.71 \\
## 15 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.70 & 0.09 & 19.34 & 0.00 & 1.70 & 0.83 & 0.83 \\
## 16 & PWB\_2 & \~{}\~{} & PWB\_2 & 1.97 & 0.10 & 19.53 & 0.00 & 1.97 & 0.95 & 0.95 \\
## 17 & PWB\_7 & \~{}\~{} & PWB\_7 & 0.85 & 0.10 & 8.45 & 0.00 & 0.85 & 0.52 & 0.52 \\
## 18 & PWB\_8 & \~{}\~{} & PWB\_8 & 0.90 & 0.13 & 6.91 & 0.00 & 0.90 & 0.46 & 0.46 \\
## 19 & Factor1 & \~{}\~{} & Factor1 & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 20 & Factor2 & \~{}\~{} & Factor2 & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 21 & Factor1 & \~{}\~{} & Factor2 & 0.27 & 0.05 & 5.75 & 0.00 & 0.27 & 0.27 & 0.27 \\
## 22 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 23 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 24 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 25 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 26 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 27 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 28 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 29 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 30 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 31 & Factor1 & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 32 & Factor2 & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
summary(one.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 25 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 584.980
## Degrees of freedom 27
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## PWB =~
## PWB_1 1.017 0.055 18.385 0.000 1.017 0.631
## PWB_2 0.752 0.052 14.502 0.000 0.752 0.522
## PWB_3 1.202 0.051 23.458 0.000 1.202 0.759
## PWB_4 0.841 0.054 15.654 0.000 0.841 0.554
## PWB_5 -1.258 0.052 -24.240 0.000 -1.258 -0.779
## PWB_6 0.679 0.046 14.690 0.000 0.679 0.523
## PWB_7 0.208 0.050 4.176 0.000 0.208 0.162
## PWB_8 0.280 0.054 5.218 0.000 0.280 0.201
## PWB_9 0.629 0.052 12.048 0.000 0.629 0.440
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.879 0.000 2.877 1.781
## PWB_6 4.499 0.045 98.964 0.000 4.499 3.464
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.564 0.090 1.564 0.602
## PWB_2 1.513 0.082 1.513 0.728
## PWB_3 1.061 0.073 1.061 0.424
## PWB_4 1.593 0.087 1.593 0.693
## PWB_5 1.027 0.074 1.027 0.394
## PWB_6 1.225 0.066 1.225 0.726
## PWB_7 1.604 0.080 1.604 0.974
## PWB_8 1.866 0.093 1.866 0.960
## PWB_9 1.646 0.086 1.646 0.806
## PWB 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.398
## PWB_2 0.272
## PWB_3 0.576
## PWB_4 0.307
## PWB_5 0.606
## PWB_6 0.274
## PWB_7 0.026
## PWB_8 0.040
## PWB_9 0.194
(xtable(parameterEstimates(one.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & PWB & =\~{} & PWB\_1 & 1.02 & 0.06 & 18.38 & 0.00 & 1.02 & 0.63 & 0.63 \\
## 2 & PWB & =\~{} & PWB\_2 & 0.75 & 0.05 & 14.50 & 0.00 & 0.75 & 0.52 & 0.52 \\
## 3 & PWB & =\~{} & PWB\_3 & 1.20 & 0.05 & 23.46 & 0.00 & 1.20 & 0.76 & 0.76 \\
## 4 & PWB & =\~{} & PWB\_4 & 0.84 & 0.05 & 15.65 & 0.00 & 0.84 & 0.55 & 0.55 \\
## 5 & PWB & =\~{} & PWB\_5 & -1.26 & 0.05 & -24.24 & 0.00 & -1.26 & -0.78 & -0.78 \\
## 6 & PWB & =\~{} & PWB\_6 & 0.68 & 0.05 & 14.69 & 0.00 & 0.68 & 0.52 & 0.52 \\
## 7 & PWB & =\~{} & PWB\_7 & 0.21 & 0.05 & 4.18 & 0.00 & 0.21 & 0.16 & 0.16 \\
## 8 & PWB & =\~{} & PWB\_8 & 0.28 & 0.05 & 5.22 & 0.00 & 0.28 & 0.20 & 0.20 \\
## 9 & PWB & =\~{} & PWB\_9 & 0.63 & 0.05 & 12.05 & 0.00 & 0.63 & 0.44 & 0.44 \\
## 10 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.56 & 0.09 & 17.37 & 0.00 & 1.56 & 0.60 & 0.60 \\
## 11 & PWB\_2 & \~{}\~{} & PWB\_2 & 1.51 & 0.08 & 18.47 & 0.00 & 1.51 & 0.73 & 0.73 \\
## 12 & PWB\_3 & \~{}\~{} & PWB\_3 & 1.06 & 0.07 & 14.58 & 0.00 & 1.06 & 0.42 & 0.42 \\
## 13 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.59 & 0.09 & 18.23 & 0.00 & 1.59 & 0.69 & 0.69 \\
## 14 & PWB\_5 & \~{}\~{} & PWB\_5 & 1.03 & 0.07 & 13.82 & 0.00 & 1.03 & 0.39 & 0.39 \\
## 15 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.22 & 0.07 & 18.60 & 0.00 & 1.22 & 0.73 & 0.73 \\
## 16 & PWB\_7 & \~{}\~{} & PWB\_7 & 1.60 & 0.08 & 20.06 & 0.00 & 1.60 & 0.97 & 0.97 \\
## 17 & PWB\_8 & \~{}\~{} & PWB\_8 & 1.87 & 0.09 & 20.00 & 0.00 & 1.87 & 0.96 & 0.96 \\
## 18 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.65 & 0.09 & 19.17 & 0.00 & 1.65 & 0.81 & 0.81 \\
## 19 & PWB & \~{}\~{} & PWB & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 20 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 21 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 22 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 23 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 24 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 25 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 26 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 27 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 28 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 29 & PWB & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
summary(second.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 31 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 444.343
## Degrees of freedom 25
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## Negative =~
## PWB_1 0.890 65.717 0.014 0.989 1.018 0.631
## PWB_2 0.686 50.674 0.014 0.989 0.785 0.544
## PWB_3 1.047 77.318 0.014 0.989 1.198 0.756
## PWB_4 0.744 54.903 0.014 0.989 0.850 0.561
## PWB_5 -1.084 80.035 -0.014 0.989 -1.240 -0.767
## PWB_9 0.578 42.704 0.014 0.989 0.661 0.463
## Positive =~
## PWB_6 0.442 64.489 0.007 0.995 0.560 0.431
## PWB_7 0.698 101.900 0.007 0.995 0.885 0.689
## PWB_8 0.785 114.668 0.007 0.995 0.996 0.714
## Purpose =~
## Negative 0.555 174.071 0.003 0.997 0.485 0.485
## Positive 0.780 301.153 0.003 0.998 0.615 0.615
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.878 0.000 2.877 1.781
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB_6 4.499 0.045 98.964 0.000 4.499 3.464
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## Negative 0.000 0.000 0.000
## Positive 0.000 0.000 0.000
## Purpose 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.562 0.091 1.562 0.601
## PWB_2 1.463 0.081 1.463 0.704
## PWB_3 1.072 0.076 1.072 0.428
## PWB_4 1.577 0.088 1.577 0.686
## PWB_5 1.073 0.078 1.073 0.411
## PWB_9 1.604 0.085 1.604 0.786
## PWB_6 1.373 0.079 1.373 0.814
## PWB_7 0.864 0.078 0.864 0.525
## PWB_8 0.953 0.097 0.953 0.490
## Negative 1.000 0.765 0.765
## Positive 1.000 0.622 0.622
## Purpose 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.399
## PWB_2 0.296
## PWB_3 0.572
## PWB_4 0.314
## PWB_5 0.589
## PWB_9 0.214
## PWB_6 0.186
## PWB_7 0.475
## PWB_8 0.510
## Negative 0.235
## Positive 0.378
(xtable(parameterEstimates(second.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & Negative & =\~{} & PWB\_1 & 0.89 & 65.72 & 0.01 & 0.99 & 1.02 & 0.63 & 0.63 \\
## 2 & Negative & =\~{} & PWB\_2 & 0.69 & 50.67 & 0.01 & 0.99 & 0.78 & 0.54 & 0.54 \\
## 3 & Negative & =\~{} & PWB\_3 & 1.05 & 77.32 & 0.01 & 0.99 & 1.20 & 0.76 & 0.76 \\
## 4 & Negative & =\~{} & PWB\_4 & 0.74 & 54.90 & 0.01 & 0.99 & 0.85 & 0.56 & 0.56 \\
## 5 & Negative & =\~{} & PWB\_5 & -1.08 & 80.04 & -0.01 & 0.99 & -1.24 & -0.77 & -0.77 \\
## 6 & Negative & =\~{} & PWB\_9 & 0.58 & 42.70 & 0.01 & 0.99 & 0.66 & 0.46 & 0.46 \\
## 7 & Positive & =\~{} & PWB\_6 & 0.44 & 64.49 & 0.01 & 0.99 & 0.56 & 0.43 & 0.43 \\
## 8 & Positive & =\~{} & PWB\_7 & 0.70 & 101.90 & 0.01 & 0.99 & 0.88 & 0.69 & 0.69 \\
## 9 & Positive & =\~{} & PWB\_8 & 0.79 & 114.67 & 0.01 & 0.99 & 1.00 & 0.71 & 0.71 \\
## 10 & Purpose & =\~{} & Negative & 0.55 & 174.07 & 0.00 & 1.00 & 0.49 & 0.49 & 0.49 \\
## 11 & Purpose & =\~{} & Positive & 0.78 & 301.15 & 0.00 & 1.00 & 0.62 & 0.62 & 0.62 \\
## 12 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.56 & 0.09 & 17.14 & 0.00 & 1.56 & 0.60 & 0.60 \\
## 13 & PWB\_2 & \~{}\~{} & PWB\_2 & 1.46 & 0.08 & 17.99 & 0.00 & 1.46 & 0.70 & 0.70 \\
## 14 & PWB\_3 & \~{}\~{} & PWB\_3 & 1.07 & 0.08 & 14.11 & 0.00 & 1.07 & 0.43 & 0.43 \\
## 15 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.58 & 0.09 & 18.00 & 0.00 & 1.58 & 0.69 & 0.69 \\
## 16 & PWB\_5 & \~{}\~{} & PWB\_5 & 1.07 & 0.08 & 13.68 & 0.00 & 1.07 & 0.41 & 0.41 \\
## 17 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.60 & 0.08 & 18.91 & 0.00 & 1.60 & 0.79 & 0.79 \\
## 18 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.37 & 0.08 & 17.32 & 0.00 & 1.37 & 0.81 & 0.81 \\
## 19 & PWB\_7 & \~{}\~{} & PWB\_7 & 0.86 & 0.08 & 11.03 & 0.00 & 0.86 & 0.52 & 0.52 \\
## 20 & PWB\_8 & \~{}\~{} & PWB\_8 & 0.95 & 0.10 & 9.84 & 0.00 & 0.95 & 0.49 & 0.49 \\
## 21 & Negative & \~{}\~{} & Negative & 1.00 & 0.00 & & & 0.76 & 0.76 & 0.76 \\
## 22 & Positive & \~{}\~{} & Positive & 1.00 & 0.00 & & & 0.62 & 0.62 & 0.62 \\
## 23 & Purpose & \~{}\~{} & Purpose & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 24 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 25 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 26 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 27 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 28 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 29 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 30 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 31 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 32 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 33 & Negative & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 34 & Positive & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 35 & Purpose & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
summary(bifactor1.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 51 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 168.910
## Degrees of freedom 18
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## PWB =~
## PWB_1 0.918 0.071 12.862 0.000 0.918 0.569
## PWB_2 0.381 0.095 4.006 0.000 0.381 0.264
## PWB_3 1.216 0.059 20.607 0.000 1.216 0.768
## PWB_4 0.685 0.074 9.203 0.000 0.685 0.452
## PWB_5 -1.266 0.059 -21.479 0.000 -1.266 -0.784
## PWB_6 0.712 0.050 14.343 0.000 0.712 0.548
## PWB_7 0.083 0.053 1.574 0.116 0.083 0.065
## PWB_8 0.180 0.056 3.205 0.001 0.180 0.129
## PWB_9 0.470 0.080 5.885 0.000 0.470 0.329
## Negative =~
## PWB_1 0.507 0.109 4.657 0.000 0.507 0.315
## PWB_2 1.302 0.205 6.334 0.000 1.302 0.903
## PWB_3 0.242 0.111 2.185 0.029 0.242 0.153
## PWB_4 0.431 0.110 3.925 0.000 0.431 0.284
## PWB_5 -0.268 0.110 -2.438 0.015 -0.268 -0.166
## PWB_9 0.475 0.123 3.848 0.000 0.475 0.333
## Positive =~
## PWB_6 0.387 0.048 8.042 0.000 0.387 0.298
## PWB_7 0.999 0.079 12.582 0.000 0.999 0.779
## PWB_8 0.916 0.077 11.894 0.000 0.916 0.657
##
## Covariances:
## PWB ~~
## Negative 0.000 0.000 0.000
## Positive 0.000 0.000 0.000
## Negative ~~
## Positive 0.000 0.000 0.000
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.879 0.000 2.877 1.781
## PWB_6 4.499 0.045 98.964 0.000 4.499 3.464
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB 0.000 0.000 0.000
## Negative 0.000 0.000 0.000
## Positive 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.498 0.087 1.498 0.577
## PWB_2 0.240 0.541 0.240 0.115
## PWB_3 0.968 0.079 0.968 0.386
## PWB_4 1.644 0.089 1.644 0.715
## PWB_5 0.936 0.080 0.936 0.359
## PWB_6 1.029 0.066 1.029 0.611
## PWB_7 0.642 0.143 0.642 0.390
## PWB_8 1.073 0.127 1.073 0.552
## PWB_9 1.595 0.099 1.595 0.781
## PWB 1.000 1.000 1.000
## Negative 1.000 1.000 1.000
## Positive 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.423
## PWB_2 0.885
## PWB_3 0.614
## PWB_4 0.285
## PWB_5 0.641
## PWB_6 0.389
## PWB_7 0.610
## PWB_8 0.448
## PWB_9 0.219
(xtable(parameterEstimates(bifactor1.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & PWB & =\~{} & PWB\_1 & 0.92 & 0.07 & 12.86 & 0.00 & 0.92 & 0.57 & 0.57 \\
## 2 & PWB & =\~{} & PWB\_2 & 0.38 & 0.10 & 4.01 & 0.00 & 0.38 & 0.26 & 0.26 \\
## 3 & PWB & =\~{} & PWB\_3 & 1.22 & 0.06 & 20.61 & 0.00 & 1.22 & 0.77 & 0.77 \\
## 4 & PWB & =\~{} & PWB\_4 & 0.69 & 0.07 & 9.20 & 0.00 & 0.69 & 0.45 & 0.45 \\
## 5 & PWB & =\~{} & PWB\_5 & -1.27 & 0.06 & -21.48 & 0.00 & -1.27 & -0.78 & -0.78 \\
## 6 & PWB & =\~{} & PWB\_6 & 0.71 & 0.05 & 14.34 & 0.00 & 0.71 & 0.55 & 0.55 \\
## 7 & PWB & =\~{} & PWB\_7 & 0.08 & 0.05 & 1.57 & 0.12 & 0.08 & 0.06 & 0.06 \\
## 8 & PWB & =\~{} & PWB\_8 & 0.18 & 0.06 & 3.20 & 0.00 & 0.18 & 0.13 & 0.13 \\
## 9 & PWB & =\~{} & PWB\_9 & 0.47 & 0.08 & 5.88 & 0.00 & 0.47 & 0.33 & 0.33 \\
## 10 & Negative & =\~{} & PWB\_1 & 0.51 & 0.11 & 4.66 & 0.00 & 0.51 & 0.31 & 0.31 \\
## 11 & Negative & =\~{} & PWB\_2 & 1.30 & 0.21 & 6.33 & 0.00 & 1.30 & 0.90 & 0.90 \\
## 12 & Negative & =\~{} & PWB\_3 & 0.24 & 0.11 & 2.18 & 0.03 & 0.24 & 0.15 & 0.15 \\
## 13 & Negative & =\~{} & PWB\_4 & 0.43 & 0.11 & 3.92 & 0.00 & 0.43 & 0.28 & 0.28 \\
## 14 & Negative & =\~{} & PWB\_5 & -0.27 & 0.11 & -2.44 & 0.01 & -0.27 & -0.17 & -0.17 \\
## 15 & Negative & =\~{} & PWB\_9 & 0.48 & 0.12 & 3.85 & 0.00 & 0.48 & 0.33 & 0.33 \\
## 16 & Positive & =\~{} & PWB\_6 & 0.39 & 0.05 & 8.04 & 0.00 & 0.39 & 0.30 & 0.30 \\
## 17 & Positive & =\~{} & PWB\_7 & 1.00 & 0.08 & 12.58 & 0.00 & 1.00 & 0.78 & 0.78 \\
## 18 & Positive & =\~{} & PWB\_8 & 0.92 & 0.08 & 11.89 & 0.00 & 0.92 & 0.66 & 0.66 \\
## 19 & PWB & \~{}\~{} & Negative & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 20 & PWB & \~{}\~{} & Positive & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 21 & Negative & \~{}\~{} & Positive & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 22 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.50 & 0.09 & 17.18 & 0.00 & 1.50 & 0.58 & 0.58 \\
## 23 & PWB\_2 & \~{}\~{} & PWB\_2 & 0.24 & 0.54 & 0.44 & 0.66 & 0.24 & 0.12 & 0.12 \\
## 24 & PWB\_3 & \~{}\~{} & PWB\_3 & 0.97 & 0.08 & 12.27 & 0.00 & 0.97 & 0.39 & 0.39 \\
## 25 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.64 & 0.09 & 18.46 & 0.00 & 1.64 & 0.71 & 0.71 \\
## 26 & PWB\_5 & \~{}\~{} & PWB\_5 & 0.94 & 0.08 & 11.69 & 0.00 & 0.94 & 0.36 & 0.36 \\
## 27 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.03 & 0.07 & 15.61 & 0.00 & 1.03 & 0.61 & 0.61 \\
## 28 & PWB\_7 & \~{}\~{} & PWB\_7 & 0.64 & 0.14 & 4.49 & 0.00 & 0.64 & 0.39 & 0.39 \\
## 29 & PWB\_8 & \~{}\~{} & PWB\_8 & 1.07 & 0.13 & 8.44 & 0.00 & 1.07 & 0.55 & 0.55 \\
## 30 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.59 & 0.10 & 16.15 & 0.00 & 1.59 & 0.78 & 0.78 \\
## 31 & PWB & \~{}\~{} & PWB & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 32 & Negative & \~{}\~{} & Negative & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 33 & Positive & \~{}\~{} & Positive & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 34 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 35 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 36 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 37 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 38 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 39 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 40 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 41 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 42 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 43 & PWB & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 44 & Negative & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 45 & Positive & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
summary(bifactor2.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 45 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 189.914
## Degrees of freedom 18
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## PWB =~
## PWB_1 0.929 0.067 13.921 0.000 0.929 0.576
## PWB_2 0.870 0.061 14.364 0.000 0.870 0.604
## PWB_3 1.016 0.067 15.135 0.000 1.016 0.642
## PWB_4 0.917 0.060 15.348 0.000 0.917 0.605
## PWB_5 -1.015 0.068 -14.877 0.000 -1.015 -0.629
## PWB_6 0.395 0.061 6.520 0.000 0.395 0.304
## PWB_7 0.098 0.058 1.679 0.093 0.098 0.076
## PWB_8 0.185 0.062 2.987 0.003 0.185 0.133
## PWB_9 0.714 0.059 12.050 0.000 0.714 0.499
## F1 =~
## PWB_1 0.470 0.081 5.783 0.000 0.470 0.291
## PWB_3 0.670 0.080 8.341 0.000 0.670 0.423
## PWB_5 -0.805 0.085 -9.447 0.000 -0.805 -0.498
## PWB_6 0.669 0.080 8.393 0.000 0.669 0.515
## F2 =~
## PWB_4 0.435 0.060 7.209 0.000 0.435 0.287
## PWB_7 1.090 0.091 11.914 0.000 1.090 0.849
## PWB_8 0.837 0.079 10.619 0.000 0.837 0.600
## F3 =~
## PWB_2 0.312 NA 0.312 0.216
## PWB_9 0.541 NA 0.541 0.379
##
## Covariances:
## PWB ~~
## F1 0.000 0.000 0.000
## F2 0.000 0.000 0.000
## F3 0.000 0.000 0.000
## F1 ~~
## F2 0.000 0.000 0.000
## F3 0.000 0.000 0.000
## F2 ~~
## F3 0.000 0.000 0.000
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.878 0.000 2.877 1.781
## PWB_6 4.499 0.045 98.964 0.000 4.499 3.464
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB 0.000 0.000 0.000
## F1 0.000 0.000 0.000
## F2 0.000 0.000 0.000
## F3 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.514 0.088 1.514 0.583
## PWB_2 1.224 NA 1.224 0.589
## PWB_3 1.026 0.073 1.026 0.409
## PWB_4 1.270 0.088 1.270 0.552
## PWB_5 0.931 0.085 0.931 0.357
## PWB_6 1.083 0.090 1.083 0.642
## PWB_7 0.450 0.184 0.450 0.273
## PWB_8 1.209 0.121 1.209 0.622
## PWB_9 1.239 NA 1.239 0.607
## PWB 1.000 1.000 1.000
## F1 1.000 1.000 1.000
## F2 1.000 1.000 1.000
## F3 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.417
## PWB_2 0.411
## PWB_3 0.591
## PWB_4 0.448
## PWB_5 0.643
## PWB_6 0.358
## PWB_7 0.727
## PWB_8 0.378
## PWB_9 0.393
(xtable(parameterEstimates(bifactor2.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & PWB & =\~{} & PWB\_1 & 0.93 & 0.07 & 13.92 & 0.00 & 0.93 & 0.58 & 0.58 \\
## 2 & PWB & =\~{} & PWB\_2 & 0.87 & 0.06 & 14.36 & 0.00 & 0.87 & 0.60 & 0.60 \\
## 3 & PWB & =\~{} & PWB\_3 & 1.02 & 0.07 & 15.14 & 0.00 & 1.02 & 0.64 & 0.64 \\
## 4 & PWB & =\~{} & PWB\_4 & 0.92 & 0.06 & 15.35 & 0.00 & 0.92 & 0.60 & 0.60 \\
## 5 & PWB & =\~{} & PWB\_5 & -1.02 & 0.07 & -14.88 & 0.00 & -1.02 & -0.63 & -0.63 \\
## 6 & PWB & =\~{} & PWB\_6 & 0.39 & 0.06 & 6.52 & 0.00 & 0.39 & 0.30 & 0.30 \\
## 7 & PWB & =\~{} & PWB\_7 & 0.10 & 0.06 & 1.68 & 0.09 & 0.10 & 0.08 & 0.08 \\
## 8 & PWB & =\~{} & PWB\_8 & 0.18 & 0.06 & 2.99 & 0.00 & 0.18 & 0.13 & 0.13 \\
## 9 & PWB & =\~{} & PWB\_9 & 0.71 & 0.06 & 12.05 & 0.00 & 0.71 & 0.50 & 0.50 \\
## 10 & F1 & =\~{} & PWB\_1 & 0.47 & 0.08 & 5.78 & 0.00 & 0.47 & 0.29 & 0.29 \\
## 11 & F1 & =\~{} & PWB\_3 & 0.67 & 0.08 & 8.34 & 0.00 & 0.67 & 0.42 & 0.42 \\
## 12 & F1 & =\~{} & PWB\_5 & -0.81 & 0.09 & -9.45 & 0.00 & -0.81 & -0.50 & -0.50 \\
## 13 & F1 & =\~{} & PWB\_6 & 0.67 & 0.08 & 8.39 & 0.00 & 0.67 & 0.52 & 0.52 \\
## 14 & F2 & =\~{} & PWB\_4 & 0.43 & 0.06 & 7.21 & 0.00 & 0.43 & 0.29 & 0.29 \\
## 15 & F2 & =\~{} & PWB\_7 & 1.09 & 0.09 & 11.91 & 0.00 & 1.09 & 0.85 & 0.85 \\
## 16 & F2 & =\~{} & PWB\_8 & 0.84 & 0.08 & 10.62 & 0.00 & 0.84 & 0.60 & 0.60 \\
## 17 & F3 & =\~{} & PWB\_2 & 0.31 & & & & 0.31 & 0.22 & 0.22 \\
## 18 & F3 & =\~{} & PWB\_9 & 0.54 & & & & 0.54 & 0.38 & 0.38 \\
## 19 & PWB & \~{}\~{} & F1 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 20 & PWB & \~{}\~{} & F2 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 21 & PWB & \~{}\~{} & F3 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 22 & F1 & \~{}\~{} & F2 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 23 & F1 & \~{}\~{} & F3 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 24 & F2 & \~{}\~{} & F3 & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 25 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.51 & 0.09 & 17.15 & 0.00 & 1.51 & 0.58 & 0.58 \\
## 26 & PWB\_2 & \~{}\~{} & PWB\_2 & 1.22 & & & & 1.22 & 0.59 & 0.59 \\
## 27 & PWB\_3 & \~{}\~{} & PWB\_3 & 1.03 & 0.07 & 14.13 & 0.00 & 1.03 & 0.41 & 0.41 \\
## 28 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.27 & 0.09 & 14.37 & 0.00 & 1.27 & 0.55 & 0.55 \\
## 29 & PWB\_5 & \~{}\~{} & PWB\_5 & 0.93 & 0.08 & 10.97 & 0.00 & 0.93 & 0.36 & 0.36 \\
## 30 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.08 & 0.09 & 11.98 & 0.00 & 1.08 & 0.64 & 0.64 \\
## 31 & PWB\_7 & \~{}\~{} & PWB\_7 & 0.45 & 0.18 & 2.44 & 0.01 & 0.45 & 0.27 & 0.27 \\
## 32 & PWB\_8 & \~{}\~{} & PWB\_8 & 1.21 & 0.12 & 10.02 & 0.00 & 1.21 & 0.62 & 0.62 \\
## 33 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.24 & & & & 1.24 & 0.61 & 0.61 \\
## 34 & PWB & \~{}\~{} & PWB & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 35 & F1 & \~{}\~{} & F1 & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 36 & F2 & \~{}\~{} & F2 & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 37 & F3 & \~{}\~{} & F3 & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 38 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 39 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 40 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 41 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 42 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 43 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 44 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 45 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 46 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 47 & PWB & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 48 & F1 & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 49 & F2 & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 50 & F3 & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
summary(bifactor.negative.fit, standardized = TRUE, rsquare=TRUE)
## lavaan (0.5-18) converged normally after 33 iterations
##
## Used Total
## Number of observations 816 1160
##
## Number of missing patterns 1
##
## Estimator ML
## Minimum Function Test Statistic 357.479
## Degrees of freedom 20
## P-value (Chi-square) 0.000
##
## Parameter estimates:
##
## Information Observed
## Standard Errors Standard
##
## Estimate Std.err Z-value P(>|z|) Std.lv Std.all
## Latent variables:
## Negative =~
## PWB_1 1.427 78.748 0.018 0.986 1.427 0.885
## PWB_2 0.972 53.658 0.018 0.986 0.972 0.675
## PWB_3 1.543 85.122 0.018 0.986 1.543 0.974
## PWB_4 0.936 51.666 0.018 0.986 0.936 0.617
## PWB_5 -1.573 86.803 -0.018 0.986 -1.573 -0.974
## PWB_9 0.828 45.708 0.018 0.986 0.828 0.580
## PWB =~
## PWB_1 0.929 121.082 0.008 0.994 0.929 0.577
## PWB_2 0.916 82.505 0.011 0.991 0.916 0.635
## PWB_3 1.253 130.883 0.010 0.992 1.253 0.792
## PWB_4 1.222 79.442 0.015 0.988 1.222 0.806
## PWB_5 -1.335 133.467 -0.010 0.992 -1.335 -0.826
## PWB_6 0.480 0.055 8.778 0.000 0.480 0.370
## PWB_7 0.970 0.056 17.221 0.000 0.970 0.756
## PWB_8 0.953 0.058 16.452 0.000 0.953 0.683
## PWB_9 0.734 70.280 0.010 0.992 0.734 0.513
##
## Covariances:
## Negative ~~
## PWB -0.650 48.954 -0.013 0.989 -0.650 -0.650
##
## Intercepts:
## PWB_1 3.896 0.056 69.041 0.000 3.896 2.417
## PWB_2 3.870 0.050 76.678 0.000 3.870 2.684
## PWB_3 4.152 0.055 74.917 0.000 4.152 2.623
## PWB_4 4.023 0.053 75.786 0.000 4.023 2.653
## PWB_5 2.877 0.057 50.879 0.000 2.877 1.781
## PWB_9 4.798 0.050 95.927 0.000 4.798 3.358
## PWB_6 4.499 0.045 98.964 0.000 4.499 3.464
## PWB_7 4.545 0.045 101.159 0.000 4.545 3.541
## PWB_8 4.362 0.049 89.357 0.000 4.362 3.128
## Negative 0.000 0.000 0.000
## PWB 0.000 0.000 0.000
##
## Variances:
## PWB_1 1.423 0.091 1.423 0.548
## PWB_2 1.453 0.080 1.453 0.699
## PWB_3 1.071 0.077 1.071 0.427
## PWB_4 1.417 0.081 1.417 0.616
## PWB_5 1.085 0.078 1.085 0.416
## PWB_9 1.607 0.085 1.607 0.787
## PWB_6 1.455 0.079 1.455 0.863
## PWB_7 0.706 0.088 0.706 0.428
## PWB_8 1.036 0.090 1.036 0.533
## Negative 1.000 1.000 1.000
## PWB 1.000 1.000 1.000
##
## R-Square:
##
## PWB_1 0.452
## PWB_2 0.301
## PWB_3 0.573
## PWB_4 0.384
## PWB_5 0.584
## PWB_9 0.213
## PWB_6 0.137
## PWB_7 0.572
## PWB_8 0.467
(xtable(parameterEstimates(bifactor.negative.fit, ci = F, standardized = T, fmi = F, remove.eq = F,
remove.ineq = F, remove.def = T)))
## % latex table generated in R 3.2.1 by xtable 1.7-4 package
## % Sun Aug 09 16:49:16 2015
## \begin{table}[ht]
## \centering
## \begin{tabular}{rlllrrrrrrr}
## \hline
## & lhs & op & rhs & est & se & z & pvalue & std.lv & std.all & std.nox \\
## \hline
## 1 & Negative & =\~{} & PWB\_1 & 1.43 & 78.75 & 0.02 & 0.99 & 1.43 & 0.89 & 0.89 \\
## 2 & Negative & =\~{} & PWB\_2 & 0.97 & 53.66 & 0.02 & 0.99 & 0.97 & 0.67 & 0.67 \\
## 3 & Negative & =\~{} & PWB\_3 & 1.54 & 85.12 & 0.02 & 0.99 & 1.54 & 0.97 & 0.97 \\
## 4 & Negative & =\~{} & PWB\_4 & 0.94 & 51.67 & 0.02 & 0.99 & 0.94 & 0.62 & 0.62 \\
## 5 & Negative & =\~{} & PWB\_5 & -1.57 & 86.80 & -0.02 & 0.99 & -1.57 & -0.97 & -0.97 \\
## 6 & Negative & =\~{} & PWB\_9 & 0.83 & 45.71 & 0.02 & 0.99 & 0.83 & 0.58 & 0.58 \\
## 7 & PWB & =\~{} & PWB\_1 & 0.93 & 121.08 & 0.01 & 0.99 & 0.93 & 0.58 & 0.58 \\
## 8 & PWB & =\~{} & PWB\_2 & 0.92 & 82.50 & 0.01 & 0.99 & 0.92 & 0.64 & 0.64 \\
## 9 & PWB & =\~{} & PWB\_3 & 1.25 & 130.88 & 0.01 & 0.99 & 1.25 & 0.79 & 0.79 \\
## 10 & PWB & =\~{} & PWB\_4 & 1.22 & 79.44 & 0.02 & 0.99 & 1.22 & 0.81 & 0.81 \\
## 11 & PWB & =\~{} & PWB\_5 & -1.33 & 133.47 & -0.01 & 0.99 & -1.33 & -0.83 & -0.83 \\
## 12 & PWB & =\~{} & PWB\_6 & 0.48 & 0.05 & 8.78 & 0.00 & 0.48 & 0.37 & 0.37 \\
## 13 & PWB & =\~{} & PWB\_7 & 0.97 & 0.06 & 17.22 & 0.00 & 0.97 & 0.76 & 0.76 \\
## 14 & PWB & =\~{} & PWB\_8 & 0.95 & 0.06 & 16.45 & 0.00 & 0.95 & 0.68 & 0.68 \\
## 15 & PWB & =\~{} & PWB\_9 & 0.73 & 70.28 & 0.01 & 0.99 & 0.73 & 0.51 & 0.51 \\
## 16 & PWB\_1 & \~{}\~{} & PWB\_1 & 1.42 & 0.09 & 15.57 & 0.00 & 1.42 & 0.55 & 0.55 \\
## 17 & PWB\_2 & \~{}\~{} & PWB\_2 & 1.45 & 0.08 & 18.06 & 0.00 & 1.45 & 0.70 & 0.70 \\
## 18 & PWB\_3 & \~{}\~{} & PWB\_3 & 1.07 & 0.08 & 13.86 & 0.00 & 1.07 & 0.43 & 0.43 \\
## 19 & PWB\_4 & \~{}\~{} & PWB\_4 & 1.42 & 0.08 & 17.41 & 0.00 & 1.42 & 0.62 & 0.62 \\
## 20 & PWB\_5 & \~{}\~{} & PWB\_5 & 1.08 & 0.08 & 13.84 & 0.00 & 1.08 & 0.42 & 0.42 \\
## 21 & PWB\_9 & \~{}\~{} & PWB\_9 & 1.61 & 0.08 & 18.97 & 0.00 & 1.61 & 0.79 & 0.79 \\
## 22 & PWB\_6 & \~{}\~{} & PWB\_6 & 1.46 & 0.08 & 18.51 & 0.00 & 1.46 & 0.86 & 0.86 \\
## 23 & PWB\_7 & \~{}\~{} & PWB\_7 & 0.71 & 0.09 & 8.01 & 0.00 & 0.71 & 0.43 & 0.43 \\
## 24 & PWB\_8 & \~{}\~{} & PWB\_8 & 1.04 & 0.09 & 11.46 & 0.00 & 1.04 & 0.53 & 0.53 \\
## 25 & Negative & \~{}\~{} & Negative & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 26 & PWB & \~{}\~{} & PWB & 1.00 & 0.00 & & & 1.00 & 1.00 & 1.00 \\
## 27 & Negative & \~{}\~{} & PWB & -0.65 & 48.95 & -0.01 & 0.99 & -0.65 & -0.65 & -0.65 \\
## 28 & PWB\_1 & \~{}1 & & 3.90 & 0.06 & 69.04 & 0.00 & 3.90 & 2.42 & 2.42 \\
## 29 & PWB\_2 & \~{}1 & & 3.87 & 0.05 & 76.68 & 0.00 & 3.87 & 2.68 & 2.68 \\
## 30 & PWB\_3 & \~{}1 & & 4.15 & 0.06 & 74.92 & 0.00 & 4.15 & 2.62 & 2.62 \\
## 31 & PWB\_4 & \~{}1 & & 4.02 & 0.05 & 75.79 & 0.00 & 4.02 & 2.65 & 2.65 \\
## 32 & PWB\_5 & \~{}1 & & 2.88 & 0.06 & 50.88 & 0.00 & 2.88 & 1.78 & 1.78 \\
## 33 & PWB\_9 & \~{}1 & & 4.80 & 0.05 & 95.93 & 0.00 & 4.80 & 3.36 & 3.36 \\
## 34 & PWB\_6 & \~{}1 & & 4.50 & 0.05 & 98.96 & 0.00 & 4.50 & 3.46 & 3.46 \\
## 35 & PWB\_7 & \~{}1 & & 4.55 & 0.04 & 101.16 & 0.00 & 4.55 & 3.54 & 3.54 \\
## 36 & PWB\_8 & \~{}1 & & 4.36 & 0.05 & 89.36 & 0.00 & 4.36 & 3.13 & 3.13 \\
## 37 & Negative & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## 38 & PWB & \~{}1 & & 0.00 & 0.00 & & & 0.00 & 0.00 & 0.00 \\
## \hline
## \end{tabular}
## \end{table}
?parameterEstimates
## starting httpd help server ... done
correl = residuals(two.fit, type="cor")
correl
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_3 PWB_4 PWB_5 PWB_6 PWB_9 PWB_2 PWB_7 PWB_8
## PWB_1 0.000
## PWB_3 -0.001 0.000
## PWB_4 -0.051 0.024 0.000
## PWB_5 -0.013 -0.004 0.028 0.000
## PWB_6 0.031 -0.010 -0.035 -0.011 0.000
## PWB_9 0.039 -0.006 0.080 0.004 -0.112 0.000
## PWB_2 0.401 0.291 0.344 -0.308 0.131 0.359 0.000
## PWB_7 -0.187 -0.105 0.190 0.068 0.167 -0.018 -0.022 0.000
## PWB_8 -0.132 -0.062 0.148 0.039 0.161 0.029 -0.049 0.012 0.000
##
## $mean
## PWB_1 PWB_3 PWB_4 PWB_5 PWB_6 PWB_9 PWB_2 PWB_7 PWB_8
## 0 0 0 0 0 0 0 0 0
View(correl$cor)
correl1 = residuals(one.fit, type="cor")
correl1
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## PWB_1 0.000
## PWB_2 0.110 0.000
## PWB_3 -0.004 -0.057 0.000
## PWB_4 -0.076 0.087 0.015 0.000
## PWB_5 -0.010 0.050 -0.033 0.037 0.000
## PWB_6 0.030 -0.109 0.011 -0.040 -0.032 0.000
## PWB_7 -0.176 0.051 -0.083 0.199 0.046 0.183 0.000
## PWB_8 -0.138 0.012 -0.061 0.141 0.038 0.161 0.487 0.000
## PWB_9 0.012 0.154 -0.022 0.053 0.020 -0.122 -0.013 0.021 0.000
##
## $mean
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## 0 0 0 0 0 0 0 0 0
View(correl1$cor)
correl0 = residuals(second.fit, type="cor")
correl0
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_9 PWB_6 PWB_7 PWB_8
## PWB_1 0.000
## PWB_2 0.095 0.000
## PWB_3 -0.003 -0.073 0.000
## PWB_4 -0.080 0.071 0.012 0.000
## PWB_5 -0.017 0.061 -0.043 0.035 0.000
## PWB_9 -0.003 0.131 -0.038 0.037 0.033 0.000
## PWB_6 0.278 0.094 0.311 0.178 -0.341 0.048 0.000
## PWB_7 -0.203 0.024 -0.116 0.174 0.077 -0.036 -0.030 0.000
## PWB_8 -0.146 0.001 -0.070 0.133 0.045 0.011 -0.041 0.027 0.000
##
## $mean
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_9 PWB_6 PWB_7 PWB_8
## 0 0 0 0 0 0 0 0 0
View(correl0$cor)
correl4 = residuals(bifactor1.fit, type="cor")
correl4
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## PWB_1 0.000
## PWB_2 0.004 0.000
## PWB_3 -0.011 -0.002 0.000
## PWB_4 -0.073 0.000 0.045 0.000
## PWB_5 -0.003 0.000 0.004 0.006 0.000
## PWB_6 0.048 0.019 -0.013 0.002 -0.010 0.000
## PWB_7 -0.110 0.119 -0.010 0.260 -0.030 0.000 0.000
## PWB_8 -0.085 0.083 -0.008 0.194 -0.017 0.000 0.000 0.000
## PWB_9 -0.002 -0.004 0.009 0.054 -0.010 -0.072 0.037 0.067 0.000
##
## $mean
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## 0 0 0 0 0 0 0 0 0
View(correl4$cor)
correl5 = residuals(bifactor2.fit, type="cor")
correl5
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## PWB_1 0.000
## PWB_2 0.091 0.000
## PWB_3 -0.018 -0.048 0.000
## PWB_4 -0.074 0.011 0.048 0.000
## PWB_5 0.006 0.023 -0.010 -0.015 0.000
## PWB_6 0.034 -0.020 -0.005 0.066 0.008 0.000
## PWB_7 -0.117 0.090 -0.009 0.000 -0.033 0.245 0.000
## PWB_8 -0.087 0.037 0.006 0.000 -0.035 0.226 0.000 0.000
## PWB_9 0.001 0.000 -0.008 -0.005 -0.008 -0.044 0.021 0.043 0.000
##
## $mean
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_7 PWB_8 PWB_9
## 0 0 0 0 0 0 0 0 0
correl3 = residuals(bifactor.negative.fit, type="cor")
correl3
## $type
## [1] "cor.bollen"
##
## $cor
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_9 PWB_6 PWB_7 PWB_8
## PWB_1 0.000
## PWB_2 0.094 0.000
## PWB_3 -0.023 -0.071 0.000
## PWB_4 -0.042 0.057 0.025 0.000
## PWB_5 -0.004 0.061 -0.046 0.030 0.000
## PWB_9 -0.007 0.131 -0.035 0.035 0.030 0.000
## PWB_6 0.359 0.091 0.349 0.100 -0.368 0.057 0.000
## PWB_7 -0.074 -0.013 -0.079 -0.016 0.065 -0.044 -0.012 0.000
## PWB_8 -0.012 -0.017 -0.017 -0.024 0.014 0.016 0.014 0.003 0.000
##
## $mean
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_9 PWB_6 PWB_7 PWB_8
## 0 0 0 0 0 0 0 0 0
View(correl3$cor)
#modindices(two.fit, sort. = TRUE, minimum.value = 3.84)
#modindices(one.fit, sort. = TRUE, minimum.value = 3.84)
#modindices(bifactor1.fit, sort. = TRUE, minimum.value = 3.84)
#modindices(bifactor.negative.fit, sort. = TRUE, minimum.value = 3.84)
fitmeasures(two.fit)#Models two factors:Positive and Negative for Purpose
## npar fmin chisq
## 28.000 0.317 518.107
## df pvalue baseline.chisq
## 26.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.755
## tli nnfi rfi
## 0.660 0.660 0.648
## nfi pnfi ifi
## 0.746 0.539 0.756
## rni logl unrestricted.logl
## 0.755 -12432.778 -12173.724
## aic bic ntotal
## 24921.555 25053.279 816.000
## bic2 rmsea rmsea.ci.lower
## 24964.362 0.152 0.141
## rmsea.ci.upper rmsea.pvalue rmr
## 0.164 0.000 0.267
## rmr_nomean srmr srmr_bentler
## 0.293 0.123 0.123
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.135 0.123 0.135
## srmr_mplus srmr_mplus_nomean cn_05
## 0.123 0.135 62.243
## cn_01 gfi agfi
## 72.884 0.993 0.985
## pgfi mfi ecvi
## 0.478 0.740 NA
fitmeasures(one.fit) #Models as a single purpose factor
## npar fmin chisq
## 27.000 0.358 584.980
## df pvalue baseline.chisq
## 27.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.722
## tli nnfi rfi
## 0.629 0.629 0.618
## nfi pnfi ifi
## 0.713 0.535 0.723
## rni logl unrestricted.logl
## 0.722 -12466.214 -12173.724
## aic bic ntotal
## 24986.429 25113.448 816.000
## bic2 rmsea rmsea.ci.lower
## 25027.707 0.159 0.148
## rmsea.ci.upper rmsea.pvalue rmr
## 0.170 0.000 0.187
## rmr_nomean srmr srmr_bentler
## 0.205 0.098 0.098
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.107 0.098 0.107
## srmr_mplus srmr_mplus_nomean cn_05
## 0.098 0.107 56.955
## cn_01 gfi agfi
## 66.510 0.991 0.982
## pgfi mfi ecvi
## 0.496 0.710 NA
fitmeasures(second.fit)#Second order models as Purpose being the higher factor made up of Purpose and Positive
## npar fmin chisq
## 29.000 0.272 444.343
## df pvalue baseline.chisq
## 25.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.791
## tli nnfi rfi
## 0.699 0.699 0.686
## nfi pnfi ifi
## 0.782 0.543 0.792
## rni logl unrestricted.logl
## 0.791 -12395.896 -12173.724
## aic bic ntotal
## 24849.791 24986.219 816.000
## bic2 rmsea rmsea.ci.lower
## 24894.127 0.143 0.132
## rmsea.ci.upper rmsea.pvalue rmr
## 0.155 0.000 0.207
## rmr_nomean srmr srmr_bentler
## 0.226 0.099 0.099
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.108 0.099 0.108
## srmr_mplus srmr_mplus_nomean cn_05
## 0.099 0.108 70.146
## cn_01 gfi agfi
## 82.379 0.992 0.983
## pgfi mfi ecvi
## 0.459 0.773 NA
fitmeasures(bifactor1.fit)#Models bifactor with Positive and Purpose as factors uncorolated with the main factor
## npar fmin chisq
## 36.000 0.103 168.910
## df pvalue baseline.chisq
## 18.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.925
## tli nnfi rfi
## 0.849 0.849 0.834
## nfi pnfi ifi
## 0.917 0.459 0.925
## rni logl unrestricted.logl
## 0.925 -12258.179 -12173.724
## aic bic ntotal
## 24588.359 24757.717 816.000
## bic2 rmsea rmsea.ci.lower
## 24643.396 0.101 0.088
## rmsea.ci.upper rmsea.pvalue rmr
## 0.116 0.000 0.114
## rmr_nomean srmr srmr_bentler
## 0.125 0.056 0.056
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.062 0.056 0.062
## srmr_mplus srmr_mplus_nomean cn_05
## 0.056 0.062 140.467
## cn_01 gfi agfi
## 169.144 0.997 0.992
## pgfi mfi ecvi
## 0.332 0.912 NA
fitmeasures(bifactor2.fit)#Models bifactor with Positive and Purpose as factors uncorolated with the main factor
## npar fmin chisq
## 36.000 0.116 189.914
## df pvalue baseline.chisq
## 18.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.914
## tli nnfi rfi
## 0.828 0.828 0.814
## nfi pnfi ifi
## 0.907 0.453 0.915
## rni logl unrestricted.logl
## 0.914 -12268.681 -12173.724
## aic bic ntotal
## 24609.362 24778.721 816.000
## bic2 rmsea rmsea.ci.lower
## 24664.399 0.108 0.095
## rmsea.ci.upper rmsea.pvalue rmr
## 0.122 0.000 0.108
## rmr_nomean srmr srmr_bentler
## 0.118 0.057 0.057
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.062 0.057 0.062
## srmr_mplus srmr_mplus_nomean cn_05
## 0.057 0.062 125.042
## cn_01 gfi agfi
## 150.548 0.997 0.992
## pgfi mfi ecvi
## 0.332 0.900 NA
fitmeasures(bifactor.negative.fit)#Models bifactor as the negatively worded item as a factor uncorolated with the main factor
## npar fmin chisq
## 34.000 0.219 357.479
## df pvalue baseline.chisq
## 20.000 0.000 2040.755
## baseline.df baseline.pvalue cfi
## 36.000 0.000 0.832
## tli nnfi rfi
## 0.697 0.697 0.685
## nfi pnfi ifi
## 0.825 0.458 0.833
## rni logl unrestricted.logl
## 0.832 -12352.464 -12173.724
## aic bic ntotal
## 24772.927 24932.877 816.000
## bic2 rmsea rmsea.ci.lower
## 24824.907 0.144 0.131
## rmsea.ci.upper rmsea.pvalue rmr
## 0.157 0.000 0.196
## rmr_nomean srmr srmr_bentler
## 0.215 0.094 0.094
## srmr_bentler_nomean srmr_bollen srmr_bollen_nomean
## 0.103 0.094 0.103
## srmr_mplus srmr_mplus_nomean cn_05
## 0.094 0.103 72.699
## cn_01 gfi agfi
## 86.751 0.994 0.984
## pgfi mfi ecvi
## 0.368 0.813 NA
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWBTR<-select(all_surveys, PWB_1, PWB_2, PWB_3,PWB_4, PWB_5,PWB_6,PWB_9, PWB_8,PWB_7)
PWB$PWB_1 <- 7- PWB$PWB_1
PWB$PWB_2 <- 7- PWB$PWB_2
PWB$PWB_3 <- 7- PWB$PWB_3
PWB$PWB_4 <- 7- PWB$PWB_4
PWB$PWB_9 <- 7- PWB$PWB_9
PWBTR<- data.frame(apply(PWBTR,2, as.numeric))
library(GPArotation)
library(psych)
library(dplyr)
PWBTR<-tbl_df(PWBTR)
PWBTR
## Source: local data frame [1,160 x 9]
##
## PWB_1 PWB_2 PWB_3 PWB_4 PWB_5 PWB_6 PWB_9 PWB_8 PWB_7
## 1 3 4 2 5 4 5 1 3 4
## 2 3 2 2 5 2 5 2 2 3
## 3 2 1 2 1 1 4 1 3 6
## 4 5 5 3 3 3 4 3 4 5
## 5 5 5 4 4 4 3 3 3 2
## 6 2 3 1 2 3 4 1 4 3
## 7 5 5 2 5 1 4 4 3 3
## 8 1 1 2 6 2 4 1 4 4
## 9 2 2 2 2 1 5 1 5 5
## 10 1 1 4 4 2 6 1 3 6
## .. ... ... ... ... ... ... ... ... ...
str(PWBTR)
## Classes 'tbl_df', 'tbl' and 'data.frame': 1160 obs. of 9 variables:
## $ PWB_1: num 3 3 2 5 5 2 5 1 2 1 ...
## $ PWB_2: num 4 2 1 5 5 3 5 1 2 1 ...
## $ PWB_3: num 2 2 2 3 4 1 2 2 2 4 ...
## $ PWB_4: num 5 5 1 3 4 2 5 6 2 4 ...
## $ PWB_5: num 4 2 1 3 4 3 1 2 1 2 ...
## $ PWB_6: num 5 5 4 4 3 4 4 4 5 6 ...
## $ PWB_9: num 1 2 1 3 3 1 4 1 1 1 ...
## $ PWB_8: num 3 2 3 4 3 4 3 4 5 3 ...
## $ PWB_7: num 4 3 6 5 2 3 3 4 5 6 ...
colnames(PWBTR) <- c("1","2", "3", "4", "5", "6", "7", "8", "9")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(9,list(f1=1:6,f2=7:9))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWBTR_cor <- corFiml(PWBTR) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWBTR_cor,2,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWBTR_cor,2,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 7. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWBTR_cor, 2, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 7. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r }
## \multicolumn{ 5 }{l}{ Table 7. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.69} & 0.20 & 0.46 & 0.54 & 1.17 \cr
## 2 & \bf{ 0.51} & -0.06 & 0.27 & 0.73 & 1.02 \cr
## 3 & \bf{ 0.78} & 0.07 & 0.59 & 0.41 & 1.02 \cr
## 4 & \bf{ 0.50} & -0.25 & 0.36 & 0.64 & 1.48 \cr
## 5 & \bf{ 0.79} & 0.04 & 0.61 & 0.39 & 1.00 \cr
## 6 & \bf{-0.48} & 0.22 & 0.32 & 0.68 & 1.41 \cr
## 7 & \bf{ 0.44} & -0.01 & 0.19 & 0.81 & 1.00 \cr
## 8 & -0.07 & \bf{ 0.62} & 0.40 & 0.60 & 1.02 \cr
## 9 & 0.02 & \bf{ 0.84} & 0.71 & 0.29 & 1.00 \cr
## \hline \cr SS loadings & 2.65 & 1.27 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.19 \cr
## MR2 & -0.19 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2
## 1 0.690 0.200
## 2 0.511
## 3 0.777
## 4 0.500 -0.254
## 5 0.786
## 6 -0.478 0.222
## 7 0.437
## 8 0.616
## 9 0.843
##
## MR1 MR2
## SS loadings 2.633 1.253
## Proportion Var 0.293 0.139
## Cumulative Var 0.293 0.432
##
## $score.cor
## [,1] [,2]
## [1,] 1.0000000 -0.2125741
## [2,] -0.2125741 1.0000000
##
## $TLI
## [1] 0.8443827
##
## $RMSEA
## RMSEA lower upper confidence
## 0.10308452 0.08936113 0.11650367 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWBTR_cor, nfactors = 2, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 h2 u2 com
## 1 0.69 0.20 0.46 0.54 1.2
## 2 0.51 -0.06 0.27 0.73 1.0
## 3 0.78 0.07 0.59 0.41 1.0
## 4 0.50 -0.25 0.36 0.64 1.5
## 5 0.79 0.04 0.61 0.39 1.0
## 6 -0.48 0.22 0.32 0.68 1.4
## 7 0.44 -0.01 0.19 0.81 1.0
## 8 -0.07 0.62 0.40 0.60 1.0
## 9 0.02 0.84 0.71 0.29 1.0
##
## MR1 MR2
## SS loadings 2.65 1.27
## Proportion Var 0.29 0.14
## Cumulative Var 0.29 0.43
## Proportion Explained 0.68 0.32
## Cumulative Proportion 0.68 1.00
##
## With factor correlations of
## MR1 MR2
## MR1 1.00 -0.19
## MR2 -0.19 1.00
##
## Mean item complexity = 1.1
## Test of the hypothesis that 2 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 19 and the objective function was 0.23
##
## The root mean square of the residuals (RMSR) is 0.05
## The df corrected root mean square of the residuals is 0.07
##
## The harmonic number of observations is 816 with the empirical chi square 168.14 with prob < 6.6e-26
## The total number of observations was 816 with MLE Chi Square = 182.39 with prob < 1e-28
##
## Tucker Lewis Index of factoring reliability = 0.844
## RMSEA index = 0.103 and the 90 % confidence intervals are 0.089 0.117
## BIC = 55
## Fit based upon off diagonal values = 0.97
## Measures of factor score adequacy
## MR1 MR2
## Correlation of scores with factors 0.92 0.88
## Multiple R square of scores with factors 0.84 0.77
## Minimum correlation of possible factor scores 0.68 0.54
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 0.9180061
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWBTR<-select(all_surveys, PWB_1, PWB_3, PWB_5,PWB_6, PWB_7, PWB_4,PWB_8, PWB_2,PWB_9)
PWB$PWB_1 <- 7- PWB$PWB_1
PWB$PWB_2 <- 7- PWB$PWB_2
PWB$PWB_3 <- 7- PWB$PWB_3
PWB$PWB_4 <- 7- PWB$PWB_4
PWB$PWB_9 <- 7- PWB$PWB_9
PWBTR<- data.frame(apply(PWBTR,2, as.numeric))
library(GPArotation)
library(psych)
library(dplyr)
PWBTR<-tbl_df(PWBTR)
PWBTR
## Source: local data frame [1,160 x 9]
##
## PWB_1 PWB_3 PWB_5 PWB_6 PWB_7 PWB_4 PWB_8 PWB_2 PWB_9
## 1 3 2 4 5 4 5 3 4 1
## 2 3 2 2 5 3 5 2 2 2
## 3 2 2 1 4 6 1 3 1 1
## 4 5 3 3 4 5 3 4 5 3
## 5 5 4 4 3 2 4 3 5 3
## 6 2 1 3 4 3 2 4 3 1
## 7 5 2 1 4 3 5 3 5 4
## 8 1 2 2 4 4 6 4 1 1
## 9 2 2 1 5 5 2 5 2 1
## 10 1 4 2 6 6 4 3 1 1
## .. ... ... ... ... ... ... ... ... ...
str(PWBTR)
## Classes 'tbl_df', 'tbl' and 'data.frame': 1160 obs. of 9 variables:
## $ PWB_1: num 3 3 2 5 5 2 5 1 2 1 ...
## $ PWB_3: num 2 2 2 3 4 1 2 2 2 4 ...
## $ PWB_5: num 4 2 1 3 4 3 1 2 1 2 ...
## $ PWB_6: num 5 5 4 4 3 4 4 4 5 6 ...
## $ PWB_7: num 4 3 6 5 2 3 3 4 5 6 ...
## $ PWB_4: num 5 5 1 3 4 2 5 6 2 4 ...
## $ PWB_8: num 3 2 3 4 3 4 3 4 5 3 ...
## $ PWB_2: num 4 2 1 5 5 3 5 1 2 1 ...
## $ PWB_9: num 1 2 1 3 3 1 4 1 1 1 ...
colnames(PWBTR) <- c("1","2", "3", "4", "5", "6", "7", "8", "9")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(9,list(f1=1:4,f2=5:6, f3=7:9))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWBTR_cor <- corFiml(PWBTR) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWBTR_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWBTR_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 8. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWBTR_cor, 3, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 8. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 8. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & MR3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.53} & 0.18 & 0.24 & 0.48 & 0.52 & 1.66 \cr
## 2 & \bf{ 0.76} & 0.07 & 0.03 & 0.60 & 0.40 & 1.02 \cr
## 3 & \bf{ 0.79} & 0.04 & 0.02 & 0.63 & 0.37 & 1.01 \cr
## 4 & \bf{-0.71} & 0.21 & 0.27 & 0.44 & 0.56 & 1.49 \cr
## 5 & 0.04 & \bf{ 0.82} & -0.04 & 0.67 & 0.33 & 1.01 \cr
## 6 & 0.27 & -0.29 & \bf{ 0.31} & 0.38 & 0.62 & 2.97 \cr
## 7 & -0.06 & \bf{ 0.63} & 0.00 & 0.42 & 0.58 & 1.02 \cr
## 8 & 0.01 & -0.12 & \bf{ 0.71} & 0.54 & 0.46 & 1.06 \cr
## 9 & 0.09 & -0.05 & \bf{ 0.48} & 0.29 & 0.71 & 1.09 \cr
## \hline \cr SS loadings & 2.14 & 1.27 & 1.03 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.19 & 0.59 \cr
## MR2 & -0.19 & 1.00 & -0.03 \cr
## MR3 & 0.59 & -0.03 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2 MR3
## 1 0.525 0.180 0.240
## 2 0.762
## 3 0.790
## 4 -0.705 0.211 0.273
## 5 0.823
## 6 0.274 -0.286 0.307
## 7 0.632
## 8 -0.118 0.712
## 9 0.477
##
## MR1 MR2 MR3
## SS loadings 2.067 1.258 0.963
## Proportion Var 0.230 0.140 0.107
## Cumulative Var 0.230 0.369 0.476
##
## $score.cor
## [,1] [,2] [,3]
## [1,] 1.0000000 -0.2076056 0.4944621
## [2,] -0.2076056 1.0000000 -0.1451347
## [3,] 0.4944621 -0.1451347 1.0000000
##
## $TLI
## [1] 0.9231504
##
## $RMSEA
## RMSEA lower upper confidence
## 0.07247499 0.05512534 0.09016088 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWBTR_cor, nfactors = 3, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 h2 u2 com
## 1 0.53 0.18 0.24 0.48 0.52 1.7
## 2 0.76 0.07 0.03 0.60 0.40 1.0
## 3 0.79 0.04 0.02 0.63 0.37 1.0
## 4 -0.71 0.21 0.27 0.44 0.56 1.5
## 5 0.04 0.82 -0.04 0.67 0.33 1.0
## 6 0.27 -0.29 0.31 0.38 0.62 3.0
## 7 -0.06 0.63 0.00 0.42 0.58 1.0
## 8 0.01 -0.12 0.71 0.54 0.46 1.1
## 9 0.09 -0.05 0.48 0.29 0.71 1.1
##
## MR1 MR2 MR3
## SS loadings 2.14 1.27 1.03
## Proportion Var 0.24 0.14 0.11
## Cumulative Var 0.24 0.38 0.49
## Proportion Explained 0.48 0.29 0.23
## Cumulative Proportion 0.48 0.77 1.00
##
## With factor correlations of
## MR1 MR2 MR3
## MR1 1.00 -0.19 0.59
## MR2 -0.19 1.00 -0.03
## MR3 0.59 -0.03 1.00
##
## Mean item complexity = 1.4
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 12 and the objective function was 0.08
##
## The root mean square of the residuals (RMSR) is 0.03
## The df corrected root mean square of the residuals is 0.04
##
## The harmonic number of observations is 816 with the empirical chi square 37.79 with prob < 0.00017
## The total number of observations was 816 with MLE Chi Square = 62.92 with prob < 6.6e-09
##
## Tucker Lewis Index of factoring reliability = 0.923
## RMSEA index = 0.072 and the 90 % confidence intervals are 0.055 0.09
## BIC = -17.54
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## MR1 MR2 MR3
## Correlation of scores with factors 0.91 0.87 0.83
## Multiple R square of scores with factors 0.84 0.75 0.69
## Minimum correlation of possible factor scores 0.67 0.50 0.38
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 0.9744478
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWB<-select(all_surveys, PWB_1, PWB_3, PWB_5,PWB_6, PWB_7, PWB_8, PWB_2, PWB_4, PWB_9)
PWB<- data.frame(apply(PWB,2, as.numeric))
library(GPArotation)
library(psych)
library(dplyr)
PWB<-tbl_df(PWB)
PWB
## Source: local data frame [1,160 x 9]
##
## PWB_1 PWB_3 PWB_5 PWB_6 PWB_7 PWB_8 PWB_2 PWB_4 PWB_9
## 1 3 2 4 5 4 3 4 5 1
## 2 3 2 2 5 3 2 2 5 2
## 3 2 2 1 4 6 3 1 1 1
## 4 5 3 3 4 5 4 5 3 3
## 5 5 4 4 3 2 3 5 4 3
## 6 2 1 3 4 3 4 3 2 1
## 7 5 2 1 4 3 3 5 5 4
## 8 1 2 2 4 4 4 1 6 1
## 9 2 2 1 5 5 5 2 2 1
## 10 1 4 2 6 6 3 1 4 1
## .. ... ... ... ... ... ... ... ... ...
str(PWB)
## Classes 'tbl_df', 'tbl' and 'data.frame': 1160 obs. of 9 variables:
## $ PWB_1: num 3 3 2 5 5 2 5 1 2 1 ...
## $ PWB_3: num 2 2 2 3 4 1 2 2 2 4 ...
## $ PWB_5: num 4 2 1 3 4 3 1 2 1 2 ...
## $ PWB_6: num 5 5 4 4 3 4 4 4 5 6 ...
## $ PWB_7: num 4 3 6 5 2 3 3 4 5 6 ...
## $ PWB_8: num 3 2 3 4 3 4 3 4 5 3 ...
## $ PWB_2: num 4 2 1 5 5 3 5 1 2 1 ...
## $ PWB_4: num 5 5 1 3 4 2 5 6 2 4 ...
## $ PWB_9: num 1 2 1 3 3 1 4 1 1 1 ...
colnames(PWB) <- c("1","2", "3", "4", "5", "6", "7", "8", "9")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(9,list(f1=1:4,f2=5:7, f3=8:9))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWB_cor <- corFiml(PWB) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 9. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB_cor, 3, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 9. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 9. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & MR3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.58} & 0.18 & 0.22 & 0.48 & 0.52 & 1.47 \cr
## 2 & \bf{ 0.78} & 0.07 & 0.02 & 0.60 & 0.40 & 1.02 \cr
## 3 & \bf{ 0.80} & 0.04 & 0.01 & 0.63 & 0.37 & 1.01 \cr
## 4 & \bf{-0.64} & 0.21 & 0.26 & 0.44 & 0.56 & 1.54 \cr
## 5 & 0.10 & \bf{ 0.84} & -0.02 & 0.67 & 0.33 & 1.03 \cr
## 6 & -0.01 & \bf{ 0.64} & 0.01 & 0.42 & 0.58 & 1.00 \cr
## 7 & 0.13 & -0.14 & \bf{ 0.64} & 0.54 & 0.46 & 1.18 \cr
## 8 & \bf{ 0.31} & -0.30 & 0.27 & 0.38 & 0.62 & 2.97 \cr
## 9 & 0.17 & -0.06 & \bf{ 0.43} & 0.29 & 0.71 & 1.36 \cr
## \hline \cr SS loadings & 2.25 & 1.31 & 0.89 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.27 & 0.45 \cr
## MR2 & -0.27 & 1.00 & -0.02 \cr
## MR3 & 0.45 & -0.02 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2 MR3
## 1 0.585 0.178 0.216
## 2 0.777
## 3 0.799
## 4 -0.643 0.206 0.256
## 5 0.839
## 6 0.644
## 7 0.130 -0.138 0.641
## 8 0.307 -0.298 0.270
## 9 0.172 0.429
##
## MR1 MR2 MR3
## SS loadings 2.148 1.311 0.782
## Proportion Var 0.239 0.146 0.087
## Cumulative Var 0.239 0.384 0.471
##
## $score.cor
## [,1] [,2] [,3]
## [1,] 1.0000000 -0.2076056 0.4944621
## [2,] -0.2076056 1.0000000 -0.1451347
## [3,] 0.4944621 -0.1451347 1.0000000
##
## $TLI
## [1] 0.9231504
##
## $RMSEA
## RMSEA lower upper confidence
## 0.07247499 0.05512534 0.09016088 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWB_cor, nfactors = 3, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 h2 u2 com
## 1 0.58 0.18 0.22 0.48 0.52 1.5
## 2 0.78 0.07 0.02 0.60 0.40 1.0
## 3 0.80 0.04 0.01 0.63 0.37 1.0
## 4 -0.64 0.21 0.26 0.44 0.56 1.5
## 5 0.10 0.84 -0.02 0.67 0.33 1.0
## 6 -0.01 0.64 0.01 0.42 0.58 1.0
## 7 0.13 -0.14 0.64 0.54 0.46 1.2
## 8 0.31 -0.30 0.27 0.38 0.62 3.0
## 9 0.17 -0.06 0.43 0.29 0.71 1.4
##
## MR1 MR2 MR3
## SS loadings 2.25 1.31 0.89
## Proportion Var 0.25 0.15 0.10
## Cumulative Var 0.25 0.40 0.49
## Proportion Explained 0.51 0.29 0.20
## Cumulative Proportion 0.51 0.80 1.00
##
## With factor correlations of
## MR1 MR2 MR3
## MR1 1.00 -0.27 0.45
## MR2 -0.27 1.00 -0.02
## MR3 0.45 -0.02 1.00
##
## Mean item complexity = 1.4
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 12 and the objective function was 0.08
##
## The root mean square of the residuals (RMSR) is 0.03
## The df corrected root mean square of the residuals is 0.04
##
## The harmonic number of observations is 816 with the empirical chi square 37.79 with prob < 0.00017
## The total number of observations was 816 with MLE Chi Square = 62.92 with prob < 6.6e-09
##
## Tucker Lewis Index of factoring reliability = 0.923
## RMSEA index = 0.072 and the 90 % confidence intervals are 0.055 0.09
## BIC = -17.54
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## MR1 MR2 MR3
## Correlation of scores with factors 0.92 0.87 0.79
## Multiple R square of scores with factors 0.84 0.76 0.63
## Minimum correlation of possible factor scores 0.68 0.52 0.26
#The best fit to the data seems to be three factors. F1: questions 1,3,5,6. f2: 8,7,4. f3: 2,9
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 0.9744478
Based on the above model we try F1: questions 1,3,5,6. f2: 8,7,4. f3: 2,9. this the best fit to the data. (PWB_4 crossloads)
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWB<-select(all_surveys, PWB_1, PWB_3, PWB_5,PWB_6, PWB_7, PWB_8,PWB_4, PWB_2, PWB_9)
PWB<- data.frame(apply(PWB,2, as.numeric))
PWB<-tbl_df(PWB)
PWB
## Source: local data frame [1,160 x 9]
##
## PWB_1 PWB_3 PWB_5 PWB_6 PWB_7 PWB_8 PWB_4 PWB_2 PWB_9
## 1 3 2 4 5 4 3 5 4 1
## 2 3 2 2 5 3 2 5 2 2
## 3 2 2 1 4 6 3 1 1 1
## 4 5 3 3 4 5 4 3 5 3
## 5 5 4 4 3 2 3 4 5 3
## 6 2 1 3 4 3 4 2 3 1
## 7 5 2 1 4 3 3 5 5 4
## 8 1 2 2 4 4 4 6 1 1
## 9 2 2 1 5 5 5 2 2 1
## 10 1 4 2 6 6 3 4 1 1
## .. ... ... ... ... ... ... ... ... ...
colnames(PWB) <- c("1","2", "3", "4", "5", "6", "7", "8", "9")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(9,list(f1=1:4,f2=5:7, f3=8:9))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWB_cor <- corFiml(PWB) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 10. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB_cor, 3, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 10. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 10. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & MR3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.54} & 0.17 & 0.24 & 0.48 & 0.52 & 1.59 \cr
## 2 & \bf{ 0.76} & 0.05 & 0.03 & 0.60 & 0.40 & 1.01 \cr
## 3 & \bf{ 0.79} & 0.02 & 0.01 & 0.63 & 0.37 & 1.00 \cr
## 4 & \bf{-0.68} & 0.23 & 0.27 & 0.44 & 0.56 & 1.56 \cr
## 5 & 0.09 & \bf{ 0.83} & -0.03 & 0.67 & 0.33 & 1.03 \cr
## 6 & -0.02 & \bf{ 0.64} & 0.00 & 0.42 & 0.58 & 1.00 \cr
## 7 & 0.26 & -0.30 & 0.30 & 0.38 & 0.62 & 2.95 \cr
## 8 & 0.02 & -0.13 & \bf{ 0.70} & 0.54 & 0.46 & 1.07 \cr
## 9 & 0.09 & -0.06 & \bf{ 0.47} & 0.29 & 0.71 & 1.11 \cr
## \hline \cr SS loadings & 2.12 & 1.32 & 1.01 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.23 & 0.58 \cr
## MR2 & -0.23 & 1.00 & -0.06 \cr
## MR3 & 0.58 & -0.06 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2 MR3
## 1 0.538 0.166 0.238
## 2 0.764
## 3 0.789
## 4 -0.684 0.228 0.274
## 5 0.833
## 6 0.642
## 7 0.258 -0.300 0.300
## 8 -0.130 0.703
## 9 0.471
##
## MR1 MR2 MR3
## SS loadings 2.048 1.299 0.941
## Proportion Var 0.228 0.144 0.105
## Cumulative Var 0.228 0.372 0.477
##
## $score.cor
## [,1] [,2] [,3]
## [1,] 1.0000000 -0.2076056 0.4944621
## [2,] -0.2076056 1.0000000 -0.1451347
## [3,] 0.4944621 -0.1451347 1.0000000
##
## $TLI
## [1] 0.9231504
##
## $RMSEA
## RMSEA lower upper confidence
## 0.07247499 0.05512534 0.09016088 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWB_cor, nfactors = 3, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 h2 u2 com
## 1 0.54 0.17 0.24 0.48 0.52 1.6
## 2 0.76 0.05 0.03 0.60 0.40 1.0
## 3 0.79 0.02 0.01 0.63 0.37 1.0
## 4 -0.68 0.23 0.27 0.44 0.56 1.6
## 5 0.09 0.83 -0.03 0.67 0.33 1.0
## 6 -0.02 0.64 0.00 0.42 0.58 1.0
## 7 0.26 -0.30 0.30 0.38 0.62 2.9
## 8 0.02 -0.13 0.70 0.54 0.46 1.1
## 9 0.09 -0.06 0.47 0.29 0.71 1.1
##
## MR1 MR2 MR3
## SS loadings 2.12 1.32 1.01
## Proportion Var 0.24 0.15 0.11
## Cumulative Var 0.24 0.38 0.49
## Proportion Explained 0.48 0.30 0.23
## Cumulative Proportion 0.48 0.77 1.00
##
## With factor correlations of
## MR1 MR2 MR3
## MR1 1.00 -0.23 0.58
## MR2 -0.23 1.00 -0.06
## MR3 0.58 -0.06 1.00
##
## Mean item complexity = 1.4
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 36 and the objective function was 2.5 with Chi Square of 2028.67
## The degrees of freedom for the model are 12 and the objective function was 0.08
##
## The root mean square of the residuals (RMSR) is 0.03
## The df corrected root mean square of the residuals is 0.04
##
## The harmonic number of observations is 816 with the empirical chi square 37.79 with prob < 0.00017
## The total number of observations was 816 with MLE Chi Square = 62.92 with prob < 6.6e-09
##
## Tucker Lewis Index of factoring reliability = 0.923
## RMSEA index = 0.072 and the 90 % confidence intervals are 0.055 0.09
## BIC = -17.54
## Fit based upon off diagonal values = 0.99
## Measures of factor score adequacy
## MR1 MR2 MR3
## Correlation of scores with factors 0.91 0.87 0.83
## Multiple R square of scores with factors 0.84 0.76 0.69
## Minimum correlation of possible factor scores 0.67 0.52 0.37
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 0.9744478
Droping question 1 as well because it also loads on all of the factors. Much better fit to the data
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWB<-select(all_surveys, PWB_3, PWB_5,PWB_6, PWB_8,PWB_7, PWB_2, PWB_9)
PWB<- data.frame(apply(PWB,2, as.numeric))
PWB<-tbl_df(PWB)
PWB
## Source: local data frame [1,160 x 7]
##
## PWB_3 PWB_5 PWB_6 PWB_8 PWB_7 PWB_2 PWB_9
## 1 2 4 5 3 4 4 1
## 2 2 2 5 2 3 2 2
## 3 2 1 4 3 6 1 1
## 4 3 3 4 4 5 5 3
## 5 4 4 3 3 2 5 3
## 6 1 3 4 4 3 3 1
## 7 2 1 4 3 3 5 4
## 8 2 2 4 4 4 1 1
## 9 2 1 5 5 5 2 1
## 10 4 2 6 3 6 1 1
## .. ... ... ... ... ... ... ...
colnames(PWB) <- c("1","2", "3", "4", "5", "6", "7")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(7,list(f1=1:3,f2=4:5, f3=6:7))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWB_cor <- corFiml(PWB) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 11. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB_cor, 3, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 11. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 11. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & MR3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.73} & 0.12 & 0.10 & 0.60 & 0.40 & 1.09 \cr
## 2 & \bf{ 0.76} & 0.08 & 0.10 & 0.65 & 0.35 & 1.06 \cr
## 3 & \bf{-0.67} & 0.22 & 0.22 & 0.44 & 0.56 & 1.44 \cr
## 4 & -0.04 & \bf{ 0.65} & -0.06 & 0.45 & 0.55 & 1.02 \cr
## 5 & 0.02 & \bf{ 0.78} & -0.04 & 0.61 & 0.39 & 1.01 \cr
## 6 & 0.08 & -0.09 & \bf{ 0.55} & 0.38 & 0.62 & 1.09 \cr
## 7 & -0.01 & -0.03 & \bf{ 0.64} & 0.40 & 0.60 & 1.01 \cr
## \hline \cr SS loadings & 1.59 & 1.12 & 0.81 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.22 & 0.55 \cr
## MR2 & -0.22 & 1.00 & -0.05 \cr
## MR3 & 0.55 & -0.05 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2 MR3
## 1 0.731 0.121 0.102
## 2 0.760 0.100
## 3 -0.668 0.215 0.221
## 4 0.650
## 5 0.785
## 6 0.553
## 7 0.635
##
## MR1 MR2 MR3
## SS loadings 1.566 1.115 0.784
## Proportion Var 0.224 0.159 0.112
## Cumulative Var 0.224 0.383 0.495
##
## $score.cor
## [,1] [,2] [,3]
## [1,] 1.0000000 -0.2033000 0.3948389
## [2,] -0.2033000 1.0000000 -0.1451453
## [3,] 0.3948389 -0.1451453 1.0000000
##
## $TLI
## [1] 1.000224
##
## $RMSEA
## RMSEA lower upper confidence
## 0.00000000 NA 0.05871615 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWB_cor, nfactors = 3, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 h2 u2 com
## 1 0.73 0.12 0.10 0.60 0.40 1.1
## 2 0.76 0.08 0.10 0.65 0.35 1.1
## 3 -0.67 0.22 0.22 0.44 0.56 1.4
## 4 -0.04 0.65 -0.06 0.45 0.55 1.0
## 5 0.02 0.78 -0.04 0.61 0.39 1.0
## 6 0.08 -0.09 0.55 0.38 0.62 1.1
## 7 -0.01 -0.03 0.64 0.40 0.60 1.0
##
## MR1 MR2 MR3
## SS loadings 1.59 1.12 0.81
## Proportion Var 0.23 0.16 0.12
## Cumulative Var 0.23 0.39 0.50
## Proportion Explained 0.45 0.32 0.23
## Cumulative Proportion 0.45 0.77 1.00
##
## With factor correlations of
## MR1 MR2 MR3
## MR1 1.00 -0.22 0.55
## MR2 -0.22 1.00 -0.05
## MR3 0.55 -0.05 1.00
##
## Mean item complexity = 1.1
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 21 and the objective function was 1.57 with Chi Square of 1276.54
## The degrees of freedom for the model are 3 and the objective function was 0
##
## 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 816 with the empirical chi square 1.78 with prob < 0.62
## The total number of observations was 816 with MLE Chi Square = 2.96 with prob < 0.4
##
## Tucker Lewis Index of factoring reliability = 1
## RMSEA index = 0 and the 90 % confidence intervals are NA 0.059
## BIC = -17.15
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## MR1 MR2 MR3
## Correlation of scores with factors 0.90 0.85 0.79
## Multiple R square of scores with factors 0.81 0.72 0.63
## Minimum correlation of possible factor scores 0.61 0.43 0.25
#The best fit to the data seems to be three factors. F1: questions 1,3,5,6. f2: 8,7,4. f3: 2,9
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 1.000032
Dropping PWB_4 – still not great and PWB_1 crossloads significantly and PWB_9 does not load well on any of the factors.
all_surveys<-read.csv("~/Psychometric_study_data/allsurveysYT1.csv")
PWB<-select(all_surveys, PWB_1, PWB_3, PWB_5,PWB_6, PWB_7, PWB_8, PWB_2, PWB_9)
PWB<- data.frame(apply(PWB,2, as.numeric))
PWB<-tbl_df(PWB)
PWB
## Source: local data frame [1,160 x 8]
##
## PWB_1 PWB_3 PWB_5 PWB_6 PWB_7 PWB_8 PWB_2 PWB_9
## 1 3 2 4 5 4 3 4 1
## 2 3 2 2 5 3 2 2 2
## 3 2 2 1 4 6 3 1 1
## 4 5 3 3 4 5 4 5 3
## 5 5 4 4 3 2 3 5 3
## 6 2 1 3 4 3 4 3 1
## 7 5 2 1 4 3 3 5 4
## 8 1 2 2 4 4 4 1 1
## 9 2 2 1 5 5 5 2 1
## 10 1 4 2 6 6 3 1 1
## .. ... ... ... ... ... ... ... ...
colnames(PWB) <- c("1","2", "3", "4", "5", "6", "7", "8")
#Target rotation: choose "simple structure" a priori and can be applied to oblique and orthogonal rotation based on
#what paper says facotrs should be PWB
Targ_key <- make.keys(8,list(f1=1:4,f2=5:6, f3=7:8))
Targ_key <- scrub(Targ_key,isvalue=1) #fix the 0s, allow the NAs to be estimated
Targ_key <- list(Targ_key)
PWB_cor <- corFiml(PWB) # convert the raw data to correlation matrix uisng FIML
out_targetQ <- fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key) #TargetT for orthogonal rotation
fa2latex(fa(PWB_cor,3,rotate="TargetQ",n.obs = 816,Target=Targ_key), heading="Table 12. Factor Loadings for Exploratory Factor Analysis PWB")
## % Called in the psych package fa2latex % Called in the psych package fa(PWB_cor, 3, rotate = "TargetQ", n.obs = 816, Target = Targ_key) % Called in the psych package Table 12. Factor Loadings for Exploratory Factor Analysis PWB
## \begin{table}[htdp]\caption{fa2latex}
## \begin{center}
## \begin{scriptsize}
## \begin{tabular} {l r r r r r r }
## \multicolumn{ 6 }{l}{ Table 12. Factor Loadings for Exploratory Factor Analysis PWB } \cr
## \hline Variable & MR1 & MR2 & MR3 & h2 & u2 & com \cr
## \hline
## 1 & \bf{ 0.53} & 0.17 & 0.25 & 0.49 & 0.51 & 1.66 \cr
## 2 & \bf{ 0.77} & 0.06 & 0.00 & 0.58 & 0.42 & 1.01 \cr
## 3 & \bf{ 0.80} & 0.02 & 0.00 & 0.64 & 0.36 & 1.00 \cr
## 4 & \bf{-0.64} & 0.25 & 0.18 & 0.42 & 0.58 & 1.46 \cr
## 5 & 0.04 & \bf{ 0.83} & -0.08 & 0.68 & 0.32 & 1.02 \cr
## 6 & -0.07 & \bf{ 0.63} & -0.03 & 0.41 & 0.59 & 1.03 \cr
## 7 & -0.01 & -0.09 & \bf{ 0.84} & 0.70 & 0.30 & 1.03 \cr
## 8 & 0.18 & -0.02 & \bf{ 0.37} & 0.24 & 0.76 & 1.45 \cr
## \hline \cr SS loadings & 2 & 1.18 & 0.98 & \cr
## \cr
## \hline \cr
## MR1 & 1.00 & -0.13 & 0.54 \cr
## MR2 & -0.13 & 1.00 & -0.01 \cr
## MR3 & 0.54 & -0.01 & 1.00 \cr
## \hline
## \end{tabular}
## \end{scriptsize}
## \end{center}
## \label{default}
## \end{table}
out_targetQ[c("loadings", "score.cor", "TLI", "RMSEA")]
## $loadings
##
## Loadings:
## MR1 MR2 MR3
## 1 0.530 0.173 0.248
## 2 0.767
## 3 0.801
## 4 -0.638 0.246 0.176
## 5 0.828
## 6 0.626
## 7 0.836
## 8 0.179 0.368
##
## MR1 MR2 MR3
## SS loadings 1.956 1.182 0.935
## Proportion Var 0.245 0.148 0.117
## Cumulative Var 0.245 0.392 0.509
##
## $score.cor
## [,1] [,2] [,3]
## [1,] 1.0000000 -0.1442225 0.4515789
## [2,] -0.1442225 1.0000000 -0.1451326
## [3,] 0.4515789 -0.1451326 1.0000000
##
## $TLI
## [1] 0.9354889
##
## $RMSEA
## RMSEA lower upper confidence
## 0.06902988 0.04663183 0.09262963 0.10000000
out_targetQ
## Factor Analysis using method = minres
## Call: fa(r = PWB_cor, nfactors = 3, n.obs = 816, rotate = "TargetQ",
## Target = Targ_key)
## Standardized loadings (pattern matrix) based upon correlation matrix
## MR1 MR2 MR3 h2 u2 com
## 1 0.53 0.17 0.25 0.49 0.51 1.7
## 2 0.77 0.06 0.00 0.58 0.42 1.0
## 3 0.80 0.02 0.00 0.64 0.36 1.0
## 4 -0.64 0.25 0.18 0.42 0.58 1.5
## 5 0.04 0.83 -0.08 0.68 0.32 1.0
## 6 -0.07 0.63 -0.03 0.41 0.59 1.0
## 7 -0.01 -0.09 0.84 0.70 0.30 1.0
## 8 0.18 -0.02 0.37 0.24 0.76 1.5
##
## MR1 MR2 MR3
## SS loadings 2.00 1.18 0.98
## Proportion Var 0.25 0.15 0.12
## Cumulative Var 0.25 0.40 0.52
## Proportion Explained 0.48 0.28 0.23
## Cumulative Proportion 0.48 0.77 1.00
##
## With factor correlations of
## MR1 MR2 MR3
## MR1 1.00 -0.13 0.54
## MR2 -0.13 1.00 -0.01
## MR3 0.54 -0.01 1.00
##
## Mean item complexity = 1.2
## Test of the hypothesis that 3 factors are sufficient.
##
## The degrees of freedom for the null model are 28 and the objective function was 2.1 with Chi Square of 1703.5
## The degrees of freedom for the model are 7 and the objective function was 0.04
##
## The root mean square of the residuals (RMSR) is 0.02
## The df corrected root mean square of the residuals is 0.04
##
## The harmonic number of observations is 816 with the empirical chi square 22.43 with prob < 0.0021
## The total number of observations was 816 with MLE Chi Square = 33.95 with prob < 1.8e-05
##
## Tucker Lewis Index of factoring reliability = 0.935
## RMSEA index = 0.069 and the 90 % confidence intervals are 0.047 0.093
## BIC = -12.98
## Fit based upon off diagonal values = 1
## Measures of factor score adequacy
## MR1 MR2 MR3
## Correlation of scores with factors 0.91 0.87 0.87
## Multiple R square of scores with factors 0.83 0.75 0.75
## Minimum correlation of possible factor scores 0.66 0.50 0.50
#The best fit to the data seems to be three factors. F1: questions 1,3,5,6. f2: 8,7,4. f3: 2,9
CFI
1-((out_targetQ$STATISTIC - out_targetQ$dof)/(out_targetQ$null.chisq- out_targetQ$null.dof))
## [1] 0.9839126