Professional Documents
Culture Documents
Report
Report
Report
2022-11-13
1.Giới thiệu
1.1 Cài đặt
#install.package
#install.packages("lavaan")
#install.packages("psy")
#install.packages("psych")
#install.packages("semPlot")
#active package
library(lavaan)
library(psy)
library(psych)
##
## Attaching package: 'psych'
library(semPlot)
library(rmarkdown)
summary(FCQ_DATA_8[c(1:10),c(1:5)])
1.3 Cronbach
#cronbach
cronbach_health<-cronbach(FCQ_DATA_8[,c
("HE1","HE2","HE3","HE4","HE5","HE6")])
modificationindices(FCQmodelsss,sort = TRUE)
##semPaths
#semPaths
semPaths(FCQmodelsss,
whatLabels = "std",
edge.label.cex = 1,
layout = "tree", rotation = 2,
edge.color = "purple")
#nếu 0.9 <= TLI, CFI <= 1; 0,0 <= RMSEA, SRMR <= 1 => Đạt
#Chưa đạt => loại bỏ các yếu tố không cần thiết
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
Including Plots
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of
the R code that generated the plot.