[R] Confirmatory Factor Analysis
AbouEl-Makarim Aboueissa
@boue|m@k@r|m1962 @end|ng |rom gm@||@com
Sat Nov 20 01:37:04 CET 2021
Dear All:
I am conducting a Confirmatory Factor Analysis (CFA) for the attached data.
Here is what I did. please see below
I do need your help with the structure of the model. I believe that what I
used is the correlated CFA model. If I am wrong, please fix me. I need your
help with the structure of the CFA uncorrelated model.
Thank you very much for your help in advance
Abou
datacfa<-read.table("G:/data_for_R.txt", header=TRUE)
head(datacfa)
install.packages("lavaan")
library(lavaan)
install.packages("semPlot")
library(semPlot)
install.packages("parameters")
library(parameters)
#### model structure
CAF.Factors <- 'Factor1 =~ X11 + X13 + X14 + X15 + X17
Factor2 =~ X6 + X7 + X12 + X16 + X19
Factor3 =~ X9 + X18 + X21
Factor4 =~ X19 + X20 + X22'
fourfactors.model.a <- cfa(CAF.Factors, data=datacfa,std.lv=TRUE)
summary(fourfactors.model.a, fit.measures=TRUE,standardized=TRUE)
semPaths(fourfactors.model.a, ncharNodes = 0, style = "lisrel", rotation =
2)
##### model_parameters(fourfactors.model.a)
model_parameters(fourfactors.model.a, standardize = TRUE)
______________________
*AbouEl-Makarim Aboueissa, PhD*
*Professor, Statistics and Data Science*
*Graduate Coordinator*
*Department of Mathematics and Statistics*
*University of Southern Maine*
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data_for_R.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20211119/56b49b70/attachment.txt>
More information about the R-help
mailing list