1. Load Package
library(lavaan)
## Warning: package 'lavaan' was built under R version 4.5.3
## This is lavaan 0.6-21
## lavaan is FREE software! Please report any bugs.
library(psych)
## Warning: package 'psych' was built under R version 4.5.3
##
## Attaching package: 'psych'
## The following object is masked from 'package:lavaan':
##
## cor2cov
library(readr)
## Warning: package 'readr' was built under R version 4.5.3
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
##
## 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(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
##
## Attaching package: 'ggplot2'
## The following objects are masked from 'package:psych':
##
## %+%, alpha
library(knitr)
## Warning: package 'knitr' was built under R version 4.5.3
2. Load Dataset
data <- read_csv("data_commuter.csv")
## Rows: 384 Columns: 30
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (1): Kepuasan Hidup
## dbl (29): No. Responden, A.1, A.2, A.3, A.4, A.5, A.6, B.1, B.2, C.1, C.2, C...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(data)
## # A tibble: 6 × 30
## `No. Responden` A.1 A.2 A.3 A.4 A.5 A.6 B.1 B.2 C.1 C.2
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 30 1 3 1 1 4 4 1 1
## 2 2 1 40 1 3 1 5 4 5 2 2
## 3 3 1 38 1 3 1 5 4 4 1 2
## 4 4 1 27 2 3 1 5 5 4 2 2
## 5 5 2 28 2 3 1 5 5 5 3 2
## 6 6 1 37 1 2 1 5 4 4 1 2
## # ℹ 19 more variables: C.3 <dbl>, C.4 <dbl>, D.1 <dbl>, D.2 <dbl>, D.3 <dbl>,
## # D.4 <dbl>, D.5 <dbl>, E.1 <dbl>, E.2 <dbl>, E.3 <dbl>, F.1 <dbl>,
## # F.2 <dbl>, F.3 <dbl>, F.4 <dbl>, F.5 <dbl>, F.6 <dbl>, F.7 <dbl>,
## # F.8 <dbl>, `Kepuasan Hidup` <chr>
str(data)
## spc_tbl_ [384 × 30] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ No. Responden : num [1:384] 1 2 3 4 5 6 7 8 9 10 ...
## $ A.1 : num [1:384] 1 1 1 1 2 1 1 2 1 1 ...
## $ A.2 : num [1:384] 30 40 38 27 28 37 25 27 40 27 ...
## $ A.3 : num [1:384] 1 1 1 2 2 1 2 2 1 2 ...
## $ A.4 : num [1:384] 3 3 3 3 3 2 3 3 3 3 ...
## $ A.5 : num [1:384] 1 1 1 1 1 1 1 1 1 1 ...
## $ A.6 : num [1:384] 1 5 5 5 5 5 5 3 3 5 ...
## $ B.1 : num [1:384] 4 4 4 5 5 4 4 3 3 4 ...
## $ B.2 : num [1:384] 4 5 4 4 5 4 4 4 5 4 ...
## $ C.1 : num [1:384] 1 2 1 2 3 1 1 3 2 2 ...
## $ C.2 : num [1:384] 1 2 2 2 2 2 3 1 2 2 ...
## $ C.3 : num [1:384] 2 4 3 4 5 3 4 4 4 4 ...
## $ C.4 : num [1:384] 2 2 3 2 1.67 3 4 1.33 2 2 ...
## $ D.1 : num [1:384] 4 4 3 4 5 4 4 4 4 4 ...
## $ D.2 : num [1:384] 4 4 4 4 4 4 4 4 4 5 ...
## $ D.3 : num [1:384] 4 5 5 5 5 5 5 5 5 5 ...
## $ D.4 : num [1:384] 2500000 1200000 1600000 1500000 1200000 2000000 1500000 2000000 1800000 1500000 ...
## $ D.5 : num [1:384] 178.6 85.7 114.3 107.1 85.7 ...
## $ E.1 : num [1:384] 4 4 4 4 4 4 4 4 4 4 ...
## $ E.2 : num [1:384] 4 5 4 5 5 4 4 4 4 4 ...
## $ E.3 : num [1:384] 5 4 5 4 4 5 5 3 3 5 ...
## $ F.1 : num [1:384] 4 4 5 4 4 4 4 4 4 3 ...
## $ F.2 : num [1:384] 3 3 4 5 4 3 4 4 4 4 ...
## $ F.3 : num [1:384] 4 4 4 5 5 4 3 5 3 3 ...
## $ F.4 : num [1:384] 4 4 3 4 3 5 4 5 5 3 ...
## $ F.5 : num [1:384] 4 5 3 3 4 4 3 4 4 4 ...
## $ F.6 : num [1:384] 3 4 3 4 5 4 4 3 4 3 ...
## $ F.7 : num [1:384] 3 4 3 5 5 5 4 4 3 4 ...
## $ F.8 : num [1:384] 3 5 4 4 4 4 5 3 5 4 ...
## $ Kepuasan Hidup: chr [1:384] "Sangat Tidak Puas" "Sangat Tidak Puas" "Sangat Tidak Puas" "Sangat Tidak Puas" ...
## - attr(*, "spec")=
## .. cols(
## .. `No. Responden` = col_double(),
## .. A.1 = col_double(),
## .. A.2 = col_double(),
## .. A.3 = col_double(),
## .. A.4 = col_double(),
## .. A.5 = col_double(),
## .. A.6 = col_double(),
## .. B.1 = col_double(),
## .. B.2 = col_double(),
## .. C.1 = col_double(),
## .. C.2 = col_double(),
## .. C.3 = col_double(),
## .. C.4 = col_double(),
## .. D.1 = col_double(),
## .. D.2 = col_double(),
## .. D.3 = col_double(),
## .. D.4 = col_double(),
## .. D.5 = col_double(),
## .. E.1 = col_double(),
## .. E.2 = col_double(),
## .. E.3 = col_double(),
## .. F.1 = col_double(),
## .. F.2 = col_double(),
## .. F.3 = col_double(),
## .. F.4 = col_double(),
## .. F.5 = col_double(),
## .. F.6 = col_double(),
## .. F.7 = col_double(),
## .. F.8 = col_double(),
## .. `Kepuasan Hidup` = col_character()
## .. )
## - attr(*, "problems")=<externalptr>
dim(data)
## [1] 384 30
names(data)
## [1] "No. Responden" "A.1" "A.2" "A.3"
## [5] "A.4" "A.5" "A.6" "B.1"
## [9] "B.2" "C.1" "C.2" "C.3"
## [13] "C.4" "D.1" "D.2" "D.3"
## [17] "D.4" "D.5" "E.1" "E.2"
## [21] "E.3" "F.1" "F.2" "F.3"
## [25] "F.4" "F.5" "F.6" "F.7"
## [29] "F.8" "Kepuasan Hidup"
summary(data)
## No. Responden A.1 A.2 A.3
## Min. : 1.00 Min. :1.000 Min. :18.00 Min. :1.000
## 1st Qu.: 96.75 1st Qu.:1.000 1st Qu.:28.00 1st Qu.:1.000
## Median :192.50 Median :1.000 Median :35.00 Median :1.000
## Mean :192.50 Mean :1.258 Mean :35.17 Mean :1.315
## 3rd Qu.:288.25 3rd Qu.:2.000 3rd Qu.:40.00 3rd Qu.:1.000
## Max. :384.00 Max. :2.000 Max. :56.00 Max. :5.000
## A.4 A.5 A.6 B.1 B.2
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :2.00 Min. :2.000
## 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:4.00 1st Qu.:4.000
## Median :3.000 Median :1.000 Median :4.000 Median :4.00 Median :4.000
## Mean :3.271 Mean :1.083 Mean :3.521 Mean :3.93 Mean :4.031
## 3rd Qu.:4.000 3rd Qu.:1.000 3rd Qu.:5.000 3rd Qu.:4.00 3rd Qu.:4.000
## Max. :6.000 Max. :5.000 Max. :5.000 Max. :5.00 Max. :5.000
## C.1 C.2 C.3 C.4
## Min. :1.000 Min. :0.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:1.500
## Median :2.000 Median :2.000 Median :4.000 Median :2.000
## Mean :1.721 Mean :1.987 Mean :3.708 Mean :2.373
## 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:3.000
## Max. :5.000 Max. :5.000 Max. :8.000 Max. :6.000
## D.1 D.2 D.3 D.4
## Min. :2.000 Min. :2.000 Min. :2.000 Min. : 200000
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:4.000 1st Qu.: 1500000
## Median :4.000 Median :4.000 Median :4.000 Median : 2000000
## Mean :3.763 Mean :3.805 Mean :3.857 Mean : 2225573
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.: 2650000
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :10000000
## D.5 E.1 E.2 E.3
## Min. : 14.29 Min. :2.000 Min. :1.000 Min. :1.000
## 1st Qu.:107.14 1st Qu.:4.000 1st Qu.:3.000 1st Qu.:3.000
## Median :142.86 Median :4.000 Median :4.000 Median :4.000
## Mean :158.97 Mean :3.945 Mean :3.815 Mean :3.797
## 3rd Qu.:189.28 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :714.29 Max. :5.000 Max. :5.000 Max. :5.000
## F.1 F.2 F.3 F.4 F.5
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.00
## Median :4.000 Median :3.000 Median :3.000 Median :3.000 Median :3.00
## Mean :3.505 Mean :3.229 Mean :3.203 Mean :3.224 Mean :3.19
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.00
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.00
## F.6 F.7 F.8 Kepuasan Hidup
## Min. :1.000 Min. :1.000 Min. :1.00 Length:384
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.00 Class :character
## Median :3.000 Median :3.000 Median :3.00 Mode :character
## Mean :3.273 Mean :3.331 Mean :3.37
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.00
## Max. :5.000 Max. :5.000 Max. :5.00
3. Preprocessing
data_clean <- data %>%
rename(
ID = `No. Responden`,
A1 = `A.1`,
A2 = `A.2`,
A3 = `A.3`,
A4 = `A.4`,
A5 = `A.5`,
A6 = `A.6`,
B1 = `B.1`,
B2 = `B.2`,
C1 = `C.1`,
C2 = `C.2`,
C3 = `C.3`,
C4 = `C.4`,
D1 = `D.1`,
D2 = `D.2`,
D3 = `D.3`,
D4 = `D.4`,
D5 = `D.5`,
E1 = `E.1`,
E2 = `E.2`,
E3 = `E.3`,
F1 = `F.1`,
F2 = `F.2`,
F3 = `F.3`,
F4 = `F.4`,
F5 = `F.5`,
F6 = `F.6`,
F7 = `F.7`,
F8 = `F.8`,
KepuasanHidupKategori = `Kepuasan Hidup`
)
head(data_clean)
## # A tibble: 6 × 30
## ID A1 A2 A3 A4 A5 A6 B1 B2 C1 C2 C3 C4
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 30 1 3 1 1 4 4 1 1 2 2
## 2 2 1 40 1 3 1 5 4 5 2 2 4 2
## 3 3 1 38 1 3 1 5 4 4 1 2 3 3
## 4 4 1 27 2 3 1 5 5 4 2 2 4 2
## 5 5 2 28 2 3 1 5 5 5 3 2 5 1.67
## 6 6 1 37 1 2 1 5 4 4 1 2 3 3
## # ℹ 17 more variables: D1 <dbl>, D2 <dbl>, D3 <dbl>, D4 <dbl>, D5 <dbl>,
## # E1 <dbl>, E2 <dbl>, E3 <dbl>, F1 <dbl>, F2 <dbl>, F3 <dbl>, F4 <dbl>,
## # F5 <dbl>, F6 <dbl>, F7 <dbl>, F8 <dbl>, KepuasanHidupKategori <chr>
names(data_clean)
## [1] "ID" "A1" "A2"
## [4] "A3" "A4" "A5"
## [7] "A6" "B1" "B2"
## [10] "C1" "C2" "C3"
## [13] "C4" "D1" "D2"
## [16] "D3" "D4" "D5"
## [19] "E1" "E2" "E3"
## [22] "F1" "F2" "F3"
## [25] "F4" "F5" "F6"
## [28] "F7" "F8" "KepuasanHidupKategori"
data_sem <- data_clean %>%
mutate(
HousingScore = rowMeans(select(., B1, B2), na.rm = TRUE),
KepuasanHidupNum = case_when(
KepuasanHidupKategori == "Sangat Tidak Puas" ~ 1,
KepuasanHidupKategori == "Biasa" ~ 2,
KepuasanHidupKategori == "Sangat Puas" ~ 3,
TRUE ~ NA_real_
)
) %>%
select(
B1, B2, HousingScore,
D1, D2, D3,
E1, E2, E3,
F1, F2, F3, F4, F5, F6, F7, F8,
KepuasanHidupNum
) %>%
mutate(across(everything(), as.numeric)) %>%
na.omit()
head(data_sem)
## # A tibble: 6 × 18
## B1 B2 HousingScore D1 D2 D3 E1 E2 E3 F1 F2 F3
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4 4 4 4 4 4 4 4 5 4 3 4
## 2 4 5 4.5 4 4 5 4 5 4 4 3 4
## 3 4 4 4 3 4 5 4 4 5 5 4 4
## 4 5 4 4.5 4 4 5 4 5 4 4 5 5
## 5 5 5 5 5 4 5 4 5 4 4 4 5
## 6 4 4 4 4 4 5 4 4 5 4 3 4
## # ℹ 6 more variables: F4 <dbl>, F5 <dbl>, F6 <dbl>, F7 <dbl>, F8 <dbl>,
## # KepuasanHidupNum <dbl>
summary(data_sem)
## B1 B2 HousingScore D1 D2
## Min. :2.00 Min. :2.000 Min. :2.50 Min. :2.000 Min. :2.000
## 1st Qu.:4.00 1st Qu.:4.000 1st Qu.:3.50 1st Qu.:3.000 1st Qu.:3.000
## Median :4.00 Median :4.000 Median :4.00 Median :4.000 Median :4.000
## Mean :3.93 Mean :4.031 Mean :3.98 Mean :3.763 Mean :3.805
## 3rd Qu.:4.00 3rd Qu.:4.000 3rd Qu.:4.50 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :5.00 Max. :5.000 Max. :5.00 Max. :5.000 Max. :5.000
## D3 E1 E2 E3
## Min. :2.000 Min. :2.000 Min. :1.000 Min. :1.000
## 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:3.000 1st Qu.:3.000
## Median :4.000 Median :4.000 Median :4.000 Median :4.000
## Mean :3.857 Mean :3.945 Mean :3.815 Mean :3.797
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000
## F1 F2 F3 F4 F5
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.00
## Median :4.000 Median :3.000 Median :3.000 Median :3.000 Median :3.00
## Mean :3.505 Mean :3.229 Mean :3.203 Mean :3.224 Mean :3.19
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.00
## Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.00
## F6 F7 F8 KepuasanHidupNum
## Min. :1.000 Min. :1.000 Min. :1.00 Min. :1.000
## 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.00 1st Qu.:1.000
## Median :3.000 Median :3.000 Median :3.00 Median :1.000
## Mean :3.273 Mean :3.331 Mean :3.37 Mean :1.549
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.00 3rd Qu.:2.000
## Max. :5.000 Max. :5.000 Max. :5.00 Max. :3.000
dim(data_sem)
## [1] 384 18
Cek Missing Value
colSums(is.na(data_sem))
## B1 B2 HousingScore D1
## 0 0 0 0
## D2 D3 E1 E2
## 0 0 0 0
## E3 F1 F2 F3
## 0 0 0 0
## F4 F5 F6 F7
## 0 0 0 0
## F8 KepuasanHidupNum
## 0 0
4. Statistik Deskriptif
describe(data_sem)
## vars n mean sd median trimmed mad min max range skew
## B1 1 384 3.93 0.68 4 3.94 0.00 2.0 5 3.0 -0.42
## B2 2 384 4.03 0.65 4 4.04 0.00 2.0 5 3.0 -0.09
## HousingScore 3 384 3.98 0.55 4 3.99 0.74 2.5 5 2.5 -0.23
## D1 4 384 3.76 0.62 4 3.75 0.00 2.0 5 3.0 -0.32
## D2 5 384 3.80 0.62 4 3.78 0.00 2.0 5 3.0 -0.23
## D3 6 384 3.86 0.72 4 3.88 0.00 2.0 5 3.0 -0.56
## E1 7 384 3.95 0.51 4 3.94 0.00 2.0 5 3.0 -0.21
## E2 8 384 3.82 0.64 4 3.81 0.00 1.0 5 4.0 -0.76
## E3 9 384 3.80 0.72 4 3.77 0.00 1.0 5 4.0 -0.18
## F1 10 384 3.51 0.77 4 3.56 1.48 1.0 5 4.0 -0.43
## F2 11 384 3.23 0.80 3 3.25 1.48 1.0 5 4.0 -0.12
## F3 12 384 3.20 0.91 3 3.19 1.48 1.0 5 4.0 -0.03
## F4 13 384 3.22 0.87 3 3.20 1.48 1.0 5 4.0 0.10
## F5 14 384 3.19 0.89 3 3.18 1.48 1.0 5 4.0 0.00
## F6 15 384 3.27 0.78 3 3.30 1.48 1.0 5 4.0 -0.09
## F7 16 384 3.33 0.84 3 3.35 1.48 1.0 5 4.0 -0.21
## F8 17 384 3.37 0.82 3 3.41 1.48 1.0 5 4.0 -0.32
## KepuasanHidupNum 18 384 1.55 0.67 1 1.44 0.00 1.0 3 2.0 0.82
## kurtosis se
## B1 0.46 0.03
## B2 -0.45 0.03
## HousingScore -0.15 0.03
## D1 0.28 0.03
## D2 0.19 0.03
## D3 0.45 0.04
## E1 1.17 0.03
## E2 2.29 0.03
## E3 0.26 0.04
## F1 -0.03 0.04
## F2 -0.43 0.04
## F3 -0.33 0.05
## F4 -0.42 0.04
## F5 -0.18 0.05
## F6 -0.20 0.04
## F7 -0.12 0.04
## F8 0.01 0.04
## KepuasanHidupNum -0.48 0.03
5. Korelasi antar indikator
indicator_items_final <- data_sem %>%
select(D1, D2, D3, E1, E2, E3, F2, F3, F4, F5, F6)
cor_matrix_final <- cor(
indicator_items_final,
method = "spearman",
use = "pairwise.complete.obs"
)
round(cor_matrix_final, 3)
## D1 D2 D3 E1 E2 E3 F2 F3 F4 F5 F6
## D1 1.000 0.527 0.258 0.321 0.181 0.199 0.075 -0.020 0.037 -0.005 -0.065
## D2 0.527 1.000 0.384 0.271 0.332 0.401 -0.014 -0.022 0.054 -0.023 -0.085
## D3 0.258 0.384 1.000 0.206 0.376 0.304 0.090 0.145 0.128 0.125 0.091
## E1 0.321 0.271 0.206 1.000 0.380 0.345 0.114 0.081 0.083 0.122 0.090
## E2 0.181 0.332 0.376 0.380 1.000 0.401 0.042 0.009 -0.022 0.097 0.078
## E3 0.199 0.401 0.304 0.345 0.401 1.000 0.108 0.102 0.198 0.099 0.087
## F2 0.075 -0.014 0.090 0.114 0.042 0.108 1.000 0.563 0.588 0.524 0.567
## F3 -0.020 -0.022 0.145 0.081 0.009 0.102 0.563 1.000 0.630 0.616 0.511
## F4 0.037 0.054 0.128 0.083 -0.022 0.198 0.588 0.630 1.000 0.585 0.483
## F5 -0.005 -0.023 0.125 0.122 0.097 0.099 0.524 0.616 0.585 1.000 0.487
## F6 -0.065 -0.085 0.091 0.090 0.078 0.087 0.567 0.511 0.483 0.487 1.000
cor_df <- as.data.frame(as.table(cor_matrix_final))
ggplot(cor_df, aes(Var1, Var2, fill = Freq)) +
geom_tile() +
geom_text(aes(label = round(Freq, 2)), size = 3) +
theme_minimal() +
labs(
title = "Matriks Korelasi Spearman Indikator Model Final",
x = "Indikator",
y = "Indikator",
fill = "Korelasi"
) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))

6. Uji KMO dan Bartlett
KMO(cor_matrix_final)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = cor_matrix_final)
## Overall MSA = 0.8
## MSA for each item =
## D1 D2 D3 E1 E2 E3 F2 F3 F4 F5 F6
## 0.64 0.70 0.82 0.78 0.71 0.77 0.85 0.85 0.83 0.86 0.87
cortest.bartlett(
cor_matrix_final,
n = nrow(indicator_items_final)
)
## $chisq
## [1] 1356.356
##
## $p.value
## [1] 1.583219e-247
##
## $df
## [1] 55
7. CFA awal
model_cfa_awal <- '
EconomicSatisfaction =~ D1 + D2 + D3
CommuteQuality =~ E1 + E2 + E3
LifeSatisfaction =~ F1 + F2 + F3 + F4 + F5 + F6 + F7 + F8
'
ordered_items_awal <- c(
"D1", "D2", "D3",
"E1", "E2", "E3",
"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8"
)
fit_cfa_awal <- cfa(
model_cfa_awal,
data = data_sem,
ordered = ordered_items_awal,
estimator = "WLSMV",
std.lv = TRUE
)
## Warning: lavaan->lav_model_vcov():
## The variance-covariance matrix of the estimated parameters (vcov) does not
## appear to be positive definite! The smallest eigenvalue (= -7.627575e-18)
## is smaller than zero. This may be a symptom that the model is not
## identified.
lavInspect(fit_cfa_awal, "converged")
## [1] TRUE
summary(
fit_cfa_awal,
fit.measures = TRUE,
standardized = TRUE
)
## lavaan 0.6-21 ended normally after 24 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 69
##
## Number of observations 384
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 302.245 306.496
## Degrees of freedom 74 74
## P-value (Unknown) NA 0.000
## Scaling correction factor 1.079
## Shift parameter 26.371
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 7661.827 4211.749
## Degrees of freedom 91 91
## P-value NA 0.000
## Scaling correction factor 1.837
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.970 0.944
## Tucker-Lewis Index (TLI) 0.963 0.931
##
## Robust Comparative Fit Index (CFI) 0.820
## Robust Tucker-Lewis Index (TLI) 0.778
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.090 0.091
## 90 Percent confidence interval - lower 0.079 0.080
## 90 Percent confidence interval - upper 0.100 0.101
## P-value H_0: RMSEA <= 0.050 0.000 0.000
## P-value H_0: RMSEA >= 0.080 0.939 0.953
##
## Robust RMSEA 0.127
## 90 Percent confidence interval - lower 0.114
## 90 Percent confidence interval - upper 0.141
## P-value H_0: Robust RMSEA <= 0.050 0.000
## P-value H_0: Robust RMSEA >= 0.080 1.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.077 0.077
##
## Parameter Estimates:
##
## Parameterization Delta
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction =~
## D1 0.664 0.046 14.517 0.000 0.664 0.664
## D2 0.827 0.033 24.977 0.000 0.827 0.827
## D3 0.638 0.045 14.078 0.000 0.638 0.638
## CommuteQuality =~
## E1 0.666 0.046 14.443 0.000 0.666 0.666
## E2 0.686 0.043 16.010 0.000 0.686 0.686
## E3 0.715 0.042 16.850 0.000 0.715 0.715
## LifeSatisfaction =~
## F1 0.396 0.036 10.924 0.000 0.396 0.396
## F2 0.775 0.024 32.222 0.000 0.775 0.775
## F3 0.828 0.022 36.991 0.000 0.828 0.828
## F4 0.808 0.022 37.563 0.000 0.808 0.808
## F5 0.764 0.024 31.691 0.000 0.764 0.764
## F6 0.765 0.026 29.965 0.000 0.765 0.765
## F7 0.678 0.027 24.762 0.000 0.678 0.678
## F8 0.657 0.029 22.575 0.000 0.657 0.657
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction ~~
## CommuteQuality 0.722 0.056 12.858 0.000 0.722 0.722
## LifeSatisfactn 0.100 0.052 1.911 0.056 0.100 0.100
## CommuteQuality ~~
## LifeSatisfactn 0.218 0.050 4.406 0.000 0.218 0.218
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## D1|t1 -2.037 0.146 -13.989 0.000 -2.037 -2.037
## D1|t2 -0.533 0.067 -7.906 0.000 -0.533 -0.533
## D1|t3 1.400 0.093 15.057 0.000 1.400 1.400
## D2|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## D2|t2 -0.587 0.068 -8.603 0.000 -0.587 -0.587
## D2|t3 1.288 0.088 14.696 0.000 1.288 1.288
## D3|t1 -1.650 0.108 -15.228 0.000 -1.650 -1.650
## D3|t2 -0.691 0.070 -9.882 0.000 -0.691 -0.691
## D3|t3 1.032 0.078 13.211 0.000 1.032 1.032
## E1|t1 -2.794 0.323 -8.639 0.000 -2.794 -2.794
## E1|t2 -1.021 0.078 -13.126 0.000 -1.021 -1.021
## E1|t3 1.273 0.087 14.635 0.000 1.273 1.273
## E2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## E2|t2 -2.092 0.153 -13.693 0.000 -2.092 -2.092
## E2|t3 -0.658 0.069 -9.491 0.000 -0.658 -0.658
## E2|t4 1.303 0.088 14.755 0.000 1.303 1.303
## E3|t1 -2.562 0.245 -10.444 0.000 -2.562 -2.562
## E3|t2 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## E3|t3 -0.431 0.066 -6.502 0.000 -0.431 -0.431
## E3|t4 1.032 0.078 13.211 0.000 1.032 1.032
## F1|t1 -2.562 0.245 -10.444 0.000 -2.562 -2.562
## F1|t2 -1.273 0.087 -14.635 0.000 -1.273 -1.273
## F1|t3 -0.131 0.064 -2.038 0.042 -0.131 -0.131
## F1|t4 1.556 0.102 15.263 0.000 1.556 1.556
## F2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F2|t2 -0.917 0.075 -12.246 0.000 -0.917 -0.917
## F2|t3 0.298 0.065 4.580 0.000 0.298 0.298
## F2|t4 1.827 0.123 14.864 0.000 1.827 1.827
## F3|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F3|t2 -0.803 0.072 -11.133 0.000 -0.803 -0.803
## F3|t3 0.339 0.065 5.188 0.000 0.339 0.339
## F3|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F4|t1 -2.311 0.188 -12.303 0.000 -2.311 -2.311
## F4|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F4|t3 0.346 0.065 5.290 0.000 0.346 0.346
## F4|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F5|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F5|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F5|t3 0.395 0.066 5.997 0.000 0.395 0.395
## F5|t4 1.493 0.098 15.220 0.000 1.493 1.493
## F6|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F6|t2 -1.043 0.078 -13.295 0.000 -1.043 -1.043
## F6|t3 0.284 0.065 4.377 0.000 0.284 0.284
## F6|t4 1.732 0.115 15.107 0.000 1.732 1.732
## F7|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## F7|t2 -1.043 0.078 -13.295 0.000 -1.043 -1.043
## F7|t3 0.171 0.064 2.649 0.008 0.171 0.171
## F7|t4 1.534 0.101 15.254 0.000 1.534 1.534
## F8|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## F8|t2 -1.113 0.081 -13.782 0.000 -1.113 -1.113
## F8|t3 0.098 0.064 1.529 0.126 0.098 0.098
## F8|t4 1.578 0.103 15.265 0.000 1.578 1.578
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .D1 0.559 0.559 0.559
## .D2 0.316 0.316 0.316
## .D3 0.593 0.593 0.593
## .E1 0.557 0.557 0.557
## .E2 0.529 0.529 0.529
## .E3 0.489 0.489 0.489
## .F1 0.843 0.843 0.843
## .F2 0.399 0.399 0.399
## .F3 0.314 0.314 0.314
## .F4 0.346 0.346 0.346
## .F5 0.416 0.416 0.416
## .F6 0.415 0.415 0.415
## .F7 0.540 0.540 0.540
## .F8 0.569 0.569 0.569
## EconomcStsfctn 1.000 1.000 1.000
## CommuteQuality 1.000 1.000 1.000
## LifeSatisfactn 1.000 1.000 1.000
fit_cfa_awal_result <- fitMeasures(
fit_cfa_awal,
c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr")
)
round(fit_cfa_awal_result, 4)
## chisq df pvalue cfi tli rmsea srmr
## 302.245 74.000 NA 0.970 0.963 0.090 0.077
loading_cfa_awal <- standardizedSolution(fit_cfa_awal) %>%
filter(op == "=~") %>%
select(lhs, op, rhs, est.std, se, z, pvalue)
kable(loading_cfa_awal, digits = 3)
| EconomicSatisfaction |
=~ |
D1 |
0.664 |
0.046 |
14.517 |
0 |
| EconomicSatisfaction |
=~ |
D2 |
0.827 |
0.033 |
24.977 |
0 |
| EconomicSatisfaction |
=~ |
D3 |
0.638 |
0.045 |
14.078 |
0 |
| CommuteQuality |
=~ |
E1 |
0.666 |
0.046 |
14.443 |
0 |
| CommuteQuality |
=~ |
E2 |
0.686 |
0.043 |
16.010 |
0 |
| CommuteQuality |
=~ |
E3 |
0.715 |
0.042 |
16.850 |
0 |
| LifeSatisfaction |
=~ |
F1 |
0.396 |
0.036 |
10.924 |
0 |
| LifeSatisfaction |
=~ |
F2 |
0.775 |
0.024 |
32.222 |
0 |
| LifeSatisfaction |
=~ |
F3 |
0.828 |
0.022 |
36.991 |
0 |
| LifeSatisfaction |
=~ |
F4 |
0.808 |
0.022 |
37.563 |
0 |
| LifeSatisfaction |
=~ |
F5 |
0.764 |
0.024 |
31.691 |
0 |
| LifeSatisfaction |
=~ |
F6 |
0.765 |
0.026 |
29.965 |
0 |
| LifeSatisfaction |
=~ |
F7 |
0.678 |
0.027 |
24.762 |
0 |
| LifeSatisfaction |
=~ |
F8 |
0.657 |
0.029 |
22.575 |
0 |
8. CFA Final
model_cfa_final <- '
EconomicSatisfaction =~ D1 + D2 + D3
CommuteQuality =~ E1 + E2 + E3
LifeSatisfaction =~ F2 + F3 + F4 + F5 + F6
'
ordered_items_final <- c(
"D1", "D2", "D3",
"E1", "E2", "E3",
"F2", "F3", "F4", "F5", "F6"
)
fit_cfa_final <- cfa(
model_cfa_final,
data = data_sem,
ordered = ordered_items_final,
estimator = "WLSMV",
std.lv = TRUE
)
## Warning: lavaan->lav_model_vcov():
## The variance-covariance matrix of the estimated parameters (vcov) does not
## appear to be positive definite! The smallest eigenvalue (= -1.446705e-17)
## is smaller than zero. This may be a symptom that the model is not
## identified.
lavInspect(fit_cfa_final, "converged")
## [1] TRUE
summary(
fit_cfa_final,
fit.measures = TRUE,
standardized = TRUE
)
## lavaan 0.6-21 ended normally after 23 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 54
##
## Number of observations 384
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 115.494 129.693
## Degrees of freedom 41 41
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.987
## Shift parameter 12.719
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 5408.429 3367.349
## Degrees of freedom 55 55
## P-value NA 0.000
## Scaling correction factor 1.616
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.986 0.973
## Tucker-Lewis Index (TLI) 0.981 0.964
##
## Robust Comparative Fit Index (CFI) 0.896
## Robust Tucker-Lewis Index (TLI) 0.861
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.069 0.075
## 90 Percent confidence interval - lower 0.054 0.061
## 90 Percent confidence interval - upper 0.084 0.090
## P-value H_0: RMSEA <= 0.050 0.018 0.002
## P-value H_0: RMSEA >= 0.080 0.114 0.306
##
## Robust RMSEA 0.113
## 90 Percent confidence interval - lower 0.094
## 90 Percent confidence interval - upper 0.133
## P-value H_0: Robust RMSEA <= 0.050 0.000
## P-value H_0: Robust RMSEA >= 0.080 0.998
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.064 0.064
##
## Parameter Estimates:
##
## Parameterization Delta
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction =~
## D1 0.659 0.046 14.476 0.000 0.659 0.659
## D2 0.842 0.033 25.260 0.000 0.842 0.842
## D3 0.626 0.045 13.996 0.000 0.626 0.626
## CommuteQuality =~
## E1 0.657 0.046 14.298 0.000 0.657 0.657
## E2 0.696 0.041 16.779 0.000 0.696 0.696
## E3 0.717 0.041 17.417 0.000 0.717 0.717
## LifeSatisfaction =~
## F2 0.805 0.024 33.515 0.000 0.805 0.805
## F3 0.838 0.021 39.366 0.000 0.838 0.838
## F4 0.823 0.021 38.446 0.000 0.823 0.823
## F5 0.787 0.024 33.184 0.000 0.787 0.787
## F6 0.731 0.029 24.940 0.000 0.731 0.731
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction ~~
## CommuteQuality 0.719 0.056 12.827 0.000 0.719 0.719
## LifeSatisfactn 0.079 0.052 1.513 0.130 0.079 0.079
## CommuteQuality ~~
## LifeSatisfactn 0.235 0.051 4.595 0.000 0.235 0.235
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## D1|t1 -2.037 0.146 -13.989 0.000 -2.037 -2.037
## D1|t2 -0.533 0.067 -7.906 0.000 -0.533 -0.533
## D1|t3 1.400 0.093 15.057 0.000 1.400 1.400
## D2|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## D2|t2 -0.587 0.068 -8.603 0.000 -0.587 -0.587
## D2|t3 1.288 0.088 14.696 0.000 1.288 1.288
## D3|t1 -1.650 0.108 -15.228 0.000 -1.650 -1.650
## D3|t2 -0.691 0.070 -9.882 0.000 -0.691 -0.691
## D3|t3 1.032 0.078 13.211 0.000 1.032 1.032
## E1|t1 -2.794 0.323 -8.639 0.000 -2.794 -2.794
## E1|t2 -1.021 0.078 -13.126 0.000 -1.021 -1.021
## E1|t3 1.273 0.087 14.635 0.000 1.273 1.273
## E2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## E2|t2 -2.092 0.153 -13.693 0.000 -2.092 -2.092
## E2|t3 -0.658 0.069 -9.491 0.000 -0.658 -0.658
## E2|t4 1.303 0.088 14.755 0.000 1.303 1.303
## E3|t1 -2.562 0.245 -10.444 0.000 -2.562 -2.562
## E3|t2 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## E3|t3 -0.431 0.066 -6.502 0.000 -0.431 -0.431
## E3|t4 1.032 0.078 13.211 0.000 1.032 1.032
## F2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F2|t2 -0.917 0.075 -12.246 0.000 -0.917 -0.917
## F2|t3 0.298 0.065 4.580 0.000 0.298 0.298
## F2|t4 1.827 0.123 14.864 0.000 1.827 1.827
## F3|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F3|t2 -0.803 0.072 -11.133 0.000 -0.803 -0.803
## F3|t3 0.339 0.065 5.188 0.000 0.339 0.339
## F3|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F4|t1 -2.311 0.188 -12.303 0.000 -2.311 -2.311
## F4|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F4|t3 0.346 0.065 5.290 0.000 0.346 0.346
## F4|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F5|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F5|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F5|t3 0.395 0.066 5.997 0.000 0.395 0.395
## F5|t4 1.493 0.098 15.220 0.000 1.493 1.493
## F6|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F6|t2 -1.043 0.078 -13.295 0.000 -1.043 -1.043
## F6|t3 0.284 0.065 4.377 0.000 0.284 0.284
## F6|t4 1.732 0.115 15.107 0.000 1.732 1.732
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .D1 0.566 0.566 0.566
## .D2 0.291 0.291 0.291
## .D3 0.608 0.608 0.608
## .E1 0.569 0.569 0.569
## .E2 0.515 0.515 0.515
## .E3 0.486 0.486 0.486
## .F2 0.351 0.351 0.351
## .F3 0.297 0.297 0.297
## .F4 0.322 0.322 0.322
## .F5 0.380 0.380 0.380
## .F6 0.465 0.465 0.465
## EconomcStsfctn 1.000 1.000 1.000
## CommuteQuality 1.000 1.000 1.000
## LifeSatisfactn 1.000 1.000 1.000
9. Goodness of Fit CFA Final
fit_cfa_final_result <- fitMeasures(
fit_cfa_final,
c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr")
)
round(fit_cfa_final_result, 4)
## chisq df pvalue cfi tli rmsea srmr
## 115.494 41.000 NA 0.986 0.981 0.069 0.064
10. Loading Factor CFA Final
loading_cfa_final <- standardizedSolution(fit_cfa_final) %>%
filter(op == "=~") %>%
select(lhs, op, rhs, est.std, se, z, pvalue)
kable(loading_cfa_final, digits = 3)
| EconomicSatisfaction |
=~ |
D1 |
0.659 |
0.046 |
14.476 |
0 |
| EconomicSatisfaction |
=~ |
D2 |
0.842 |
0.033 |
25.260 |
0 |
| EconomicSatisfaction |
=~ |
D3 |
0.626 |
0.045 |
13.996 |
0 |
| CommuteQuality |
=~ |
E1 |
0.657 |
0.046 |
14.298 |
0 |
| CommuteQuality |
=~ |
E2 |
0.696 |
0.041 |
16.779 |
0 |
| CommuteQuality |
=~ |
E3 |
0.717 |
0.041 |
17.417 |
0 |
| LifeSatisfaction |
=~ |
F2 |
0.805 |
0.024 |
33.515 |
0 |
| LifeSatisfaction |
=~ |
F3 |
0.838 |
0.021 |
39.366 |
0 |
| LifeSatisfaction |
=~ |
F4 |
0.823 |
0.021 |
38.446 |
0 |
| LifeSatisfaction |
=~ |
F5 |
0.787 |
0.024 |
33.184 |
0 |
| LifeSatisfaction |
=~ |
F6 |
0.731 |
0.029 |
24.940 |
0 |
11. Construct Reliability dan AVE
calculate_cr_ave <- function(fit_object) {
loadings <- standardizedSolution(fit_object) %>%
filter(op == "=~") %>%
select(lhs, rhs, est.std)
result <- loadings %>%
group_by(lhs) %>%
summarise(
CR = (sum(est.std)^2) / ((sum(est.std)^2) + sum(1 - est.std^2)),
AVE = sum(est.std^2) / (sum(est.std^2) + sum(1 - est.std^2)),
.groups = "drop"
) %>%
rename(Construct = lhs)
return(result)
}
cr_ave_final <- calculate_cr_ave(fit_cfa_final)
kable(cr_ave_final, digits = 3)
| CommuteQuality |
0.732 |
0.477 |
| EconomicSatisfaction |
0.756 |
0.512 |
| LifeSatisfaction |
0.897 |
0.637 |
12. SEM Final
model_sem_final <- '
# Measurement Model / Outer Model
EconomicSatisfaction =~ D1 + D2 + D3
CommuteQuality =~ E1 + E2 + E3
LifeSatisfaction =~ F2 + F3 + F4 + F5 + F6
# Structural Model / Inner Model
LifeSatisfaction ~ EconomicSatisfaction + CommuteQuality
'
fit_sem_final <- sem(
model_sem_final,
data = data_sem,
ordered = ordered_items_final,
estimator = "WLSMV",
std.lv = TRUE
)
## Warning: lavaan->lav_model_vcov():
## The variance-covariance matrix of the estimated parameters (vcov) does not
## appear to be positive definite! The smallest eigenvalue (= -8.533089e-18)
## is smaller than zero. This may be a symptom that the model is not
## identified.
lavInspect(fit_sem_final, "converged")
## [1] TRUE
summary(
fit_sem_final,
fit.measures = TRUE,
standardized = TRUE,
rsquare = TRUE
)
## lavaan 0.6-21 ended normally after 23 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 54
##
## Number of observations 384
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 115.494 129.693
## Degrees of freedom 41 41
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.987
## Shift parameter 12.719
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 5408.429 3367.349
## Degrees of freedom 55 55
## P-value NA 0.000
## Scaling correction factor 1.616
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.986 0.973
## Tucker-Lewis Index (TLI) 0.981 0.964
##
## Robust Comparative Fit Index (CFI) 0.896
## Robust Tucker-Lewis Index (TLI) 0.861
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.069 0.075
## 90 Percent confidence interval - lower 0.054 0.061
## 90 Percent confidence interval - upper 0.084 0.090
## P-value H_0: RMSEA <= 0.050 0.018 0.002
## P-value H_0: RMSEA >= 0.080 0.114 0.306
##
## Robust RMSEA 0.113
## 90 Percent confidence interval - lower 0.094
## 90 Percent confidence interval - upper 0.133
## P-value H_0: Robust RMSEA <= 0.050 0.000
## P-value H_0: Robust RMSEA >= 0.080 0.998
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.064 0.064
##
## Parameter Estimates:
##
## Parameterization Delta
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction =~
## D1 0.659 0.046 14.476 0.000 0.659 0.659
## D2 0.842 0.033 25.260 0.000 0.842 0.842
## D3 0.626 0.045 13.996 0.000 0.626 0.626
## CommuteQuality =~
## E1 0.657 0.046 14.298 0.000 0.657 0.657
## E2 0.696 0.041 16.779 0.000 0.696 0.696
## E3 0.717 0.041 17.417 0.000 0.717 0.717
## LifeSatisfaction =~
## F2 0.776 0.028 27.755 0.000 0.805 0.805
## F3 0.808 0.026 31.058 0.000 0.838 0.838
## F4 0.793 0.028 28.692 0.000 0.823 0.823
## F5 0.758 0.028 27.063 0.000 0.787 0.787
## F6 0.705 0.032 22.153 0.000 0.731 0.731
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## LifeSatisfaction ~
## EconomcStsfctn -0.193 0.127 -1.525 0.127 -0.186 -0.186
## CommuteQuality 0.383 0.129 2.971 0.003 0.369 0.369
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction ~~
## CommuteQuality 0.719 0.056 12.827 0.000 0.719 0.719
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## D1|t1 -2.037 0.146 -13.989 0.000 -2.037 -2.037
## D1|t2 -0.533 0.067 -7.906 0.000 -0.533 -0.533
## D1|t3 1.400 0.093 15.057 0.000 1.400 1.400
## D2|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## D2|t2 -0.587 0.068 -8.603 0.000 -0.587 -0.587
## D2|t3 1.288 0.088 14.696 0.000 1.288 1.288
## D3|t1 -1.650 0.108 -15.228 0.000 -1.650 -1.650
## D3|t2 -0.691 0.070 -9.882 0.000 -0.691 -0.691
## D3|t3 1.032 0.078 13.211 0.000 1.032 1.032
## E1|t1 -2.794 0.323 -8.639 0.000 -2.794 -2.794
## E1|t2 -1.021 0.078 -13.126 0.000 -1.021 -1.021
## E1|t3 1.273 0.087 14.635 0.000 1.273 1.273
## E2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## E2|t2 -2.092 0.153 -13.693 0.000 -2.092 -2.092
## E2|t3 -0.658 0.069 -9.491 0.000 -0.658 -0.658
## E2|t4 1.303 0.088 14.755 0.000 1.303 1.303
## E3|t1 -2.562 0.245 -10.444 0.000 -2.562 -2.562
## E3|t2 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## E3|t3 -0.431 0.066 -6.502 0.000 -0.431 -0.431
## E3|t4 1.032 0.078 13.211 0.000 1.032 1.032
## F2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F2|t2 -0.917 0.075 -12.246 0.000 -0.917 -0.917
## F2|t3 0.298 0.065 4.580 0.000 0.298 0.298
## F2|t4 1.827 0.123 14.864 0.000 1.827 1.827
## F3|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F3|t2 -0.803 0.072 -11.133 0.000 -0.803 -0.803
## F3|t3 0.339 0.065 5.188 0.000 0.339 0.339
## F3|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F4|t1 -2.311 0.188 -12.303 0.000 -2.311 -2.311
## F4|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F4|t3 0.346 0.065 5.290 0.000 0.346 0.346
## F4|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F5|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F5|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F5|t3 0.395 0.066 5.997 0.000 0.395 0.395
## F5|t4 1.493 0.098 15.220 0.000 1.493 1.493
## F6|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F6|t2 -1.043 0.078 -13.295 0.000 -1.043 -1.043
## F6|t3 0.284 0.065 4.377 0.000 0.284 0.284
## F6|t4 1.732 0.115 15.107 0.000 1.732 1.732
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .D1 0.566 0.566 0.566
## .D2 0.291 0.291 0.291
## .D3 0.608 0.608 0.608
## .E1 0.569 0.569 0.569
## .E2 0.515 0.515 0.515
## .E3 0.486 0.486 0.486
## .F2 0.351 0.351 0.351
## .F3 0.297 0.297 0.297
## .F4 0.322 0.322 0.322
## .F5 0.380 0.380 0.380
## .F6 0.465 0.465 0.465
## EconomcStsfctn 1.000 1.000 1.000
## CommuteQuality 1.000 1.000 1.000
## .LifeSatisfactn 1.000 0.928 0.928
##
## R-Square:
## Estimate
## D1 0.434
## D2 0.709
## D3 0.392
## E1 0.431
## E2 0.485
## E3 0.514
## F2 0.649
## F3 0.703
## F4 0.678
## F5 0.620
## F6 0.535
## LifeSatisfactn 0.072
13. Goodness of Fit SEM Final
fit_sem_final_result <- fitMeasures(
fit_sem_final,
c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr")
)
round(fit_sem_final_result, 4)
## chisq df pvalue cfi tli rmsea srmr
## 115.494 41.000 NA 0.986 0.981 0.069 0.064
14. Perbandingan CFA Awal, CFA Final, dan SEM Final
fit_compare <- data.frame(
Index = c("chisq", "df", "cfi", "tli", "rmsea", "srmr"),
CFA_Awal = round(as.numeric(fitMeasures(
fit_cfa_awal,
c("chisq", "df", "cfi", "tli", "rmsea", "srmr")
)), 4),
CFA_Final = round(as.numeric(fitMeasures(
fit_cfa_final,
c("chisq", "df", "cfi", "tli", "rmsea", "srmr")
)), 4),
SEM_Final = round(as.numeric(fitMeasures(
fit_sem_final,
c("chisq", "df", "cfi", "tli", "rmsea", "srmr")
)), 4)
)
kable(fit_compare)
| chisq |
302.2448 |
115.4938 |
115.4938 |
| df |
74.0000 |
41.0000 |
41.0000 |
| cfi |
0.9699 |
0.9861 |
0.9861 |
| tli |
0.9629 |
0.9813 |
0.9813 |
| rmsea |
0.0897 |
0.0689 |
0.0689 |
| srmr |
0.0772 |
0.0644 |
0.0644 |
15. Path Coefficient SEM Final
path_sem_final <- standardizedSolution(fit_sem_final) %>%
filter(op == "~") %>%
select(lhs, op, rhs, est.std, se, z, pvalue)
kable(path_sem_final, digits = 3)
| LifeSatisfaction |
~ |
EconomicSatisfaction |
-0.186 |
0.119 |
-1.564 |
0.118 |
| LifeSatisfaction |
~ |
CommuteQuality |
0.369 |
0.117 |
3.153 |
0.002 |
16. R-Square SEM Final
inspect(fit_sem_final, "r2")
## D1 D2 D3 E1
## 0.434 0.709 0.392 0.431
## E2 E3 F2 F3
## 0.485 0.514 0.649 0.703
## F4 F5 F6 LifeSatisfaction
## 0.678 0.620 0.535 0.072
17. Modification Indices
mi_final <- modindices(fit_sem_final, sort. = TRUE)
head(mi_final, 10)
## lhs op rhs mi epc sepc.lv sepc.all sepc.nox
## 104 CommuteQuality =~ D3 32.017 0.646 0.646 0.646 0.646
## 112 LifeSatisfaction =~ D3 31.194 0.183 0.190 0.190 0.190
## 111 LifeSatisfaction =~ D2 19.456 -0.179 -0.186 -0.186 -0.186
## 116 D1 ~~ D2 15.765 0.313 0.313 0.771 0.771
## 158 E3 ~~ F4 15.410 0.188 0.188 0.475 0.475
## 114 LifeSatisfaction =~ E2 15.282 -0.155 -0.161 -0.161 -0.161
## 103 CommuteQuality =~ D2 14.916 -0.632 -0.632 -0.632 -0.632
## 136 D3 ~~ E2 13.149 0.198 0.198 0.353 0.353
## 115 LifeSatisfaction =~ E3 12.132 0.133 0.138 0.138 0.138
## 164 F2 ~~ F6 9.640 0.142 0.142 0.352 0.352
18. Diagram SEM Final
if (requireNamespace("semPlot", quietly = TRUE)) {
library(semPlot)
semPaths(
fit_sem_final,
what = "std",
whatLabels = "std",
layout = "tree",
edge.label.cex = 0.8,
sizeMan = 5,
sizeLat = 8,
residuals = TRUE,
intercepts = FALSE,
nCharNodes = 0
)
} else {
cat("Package semPlot belum tersedia. Jalankan install.packages('semPlot') terlebih dahulu.")
}
## Warning: package 'semPlot' was built under R version 4.5.3

19. Model Pembanding dengan HousingScore
model_sem_housing <- '
# Measurement Model / Outer Model
EconomicSatisfaction =~ D1 + D2 + D3
CommuteQuality =~ E1 + E2 + E3
LifeSatisfaction =~ F2 + F3 + F4 + F5 + F6
# Structural Model / Inner Model
LifeSatisfaction ~ EconomicSatisfaction + CommuteQuality + HousingScore
'
fit_sem_housing <- sem(
model_sem_housing,
data = data_sem,
ordered = ordered_items_final,
estimator = "WLSMV",
std.lv = TRUE
)
summary(
fit_sem_housing,
fit.measures = TRUE,
standardized = TRUE,
rsquare = TRUE
)
## lavaan 0.6-21 ended normally after 22 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 55
##
## Number of observations 384
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 420.037 426.162
## Degrees of freedom 51 51
## P-value (Unknown) NA 0.000
## Scaling correction factor 1.021
## Shift parameter 14.935
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 4889.195 3116.499
## Degrees of freedom 55 55
## P-value NA 0.000
## Scaling correction factor 1.579
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.924 0.877
## Tucker-Lewis Index (TLI) 0.918 0.868
##
## Robust Comparative Fit Index (CFI) NA
## Robust Tucker-Lewis Index (TLI) NA
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.137 0.139
## 90 Percent confidence interval - lower 0.125 0.127
## 90 Percent confidence interval - upper 0.150 0.151
## P-value H_0: RMSEA <= 0.050 0.000 0.000
## P-value H_0: RMSEA >= 0.080 1.000 1.000
##
## Robust RMSEA NA
## 90 Percent confidence interval - lower NA
## 90 Percent confidence interval - upper NA
## P-value H_0: Robust RMSEA <= 0.050 NA
## P-value H_0: Robust RMSEA >= 0.080 NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.071 0.071
##
## Parameter Estimates:
##
## Parameterization Delta
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction =~
## D1 0.541 0.057 9.580 0.000 0.541 0.541
## D2 0.827 0.052 16.048 0.000 0.827 0.827
## D3 0.566 0.053 10.692 0.000 0.566 0.566
## CommuteQuality =~
## E1 0.530 0.054 9.869 0.000 0.530 0.530
## E2 0.603 0.054 11.150 0.000 0.603 0.603
## E3 0.763 0.054 14.138 0.000 0.763 0.763
## LifeSatisfaction =~
## F2 0.773 0.027 28.660 0.000 0.810 0.810
## F3 0.800 0.025 32.191 0.000 0.838 0.838
## F4 0.790 0.027 29.629 0.000 0.828 0.827
## F5 0.751 0.028 27.219 0.000 0.787 0.787
## F6 0.695 0.031 22.259 0.000 0.728 0.728
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## LifeSatisfaction ~
## EconomcStsfctn -0.081 0.099 -0.820 0.412 -0.078 -0.078
## CommuteQuality 0.352 0.098 3.603 0.000 0.336 0.336
## HousingScore -0.051 0.107 -0.474 0.636 -0.048 -0.027
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction ~~
## CommuteQuality 0.584 0.070 8.335 0.000 0.584 0.584
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## D1|t1 1.551 0.537 2.890 0.004 1.551 1.551
## D1|t2 3.190 0.508 6.282 0.000 3.190 3.190
## D1|t3 5.400 0.571 9.457 0.000 5.400 5.400
## D2|t1 0.820 0.460 1.783 0.075 0.820 0.820
## D2|t2 2.506 0.444 5.650 0.000 2.506 2.506
## D2|t3 4.559 0.486 9.372 0.000 4.559 4.559
## D3|t1 0.810 0.449 1.803 0.071 0.810 0.810
## D3|t2 1.823 0.438 4.166 0.000 1.823 1.823
## D3|t3 3.657 0.461 7.931 0.000 3.657 3.657
## E1|t1 0.943 0.526 1.791 0.073 0.943 0.943
## E1|t2 2.915 0.414 7.042 0.000 2.915 2.915
## E1|t3 5.548 0.450 12.331 0.000 5.548 5.548
## E2|t1 0.298 0.530 0.562 0.574 0.298 0.298
## E2|t2 0.636 0.501 1.269 0.204 0.636 0.636
## E2|t3 2.176 0.493 4.416 0.000 2.176 2.176
## E2|t4 4.292 0.538 7.978 0.000 4.292 4.292
## E3|t1 -0.694 0.495 -1.402 0.161 -0.694 -0.694
## E3|t2 -0.289 0.449 -0.643 0.520 -0.289 -0.289
## E3|t3 1.477 0.428 3.449 0.001 1.477 1.477
## E3|t4 2.996 0.448 6.683 0.000 2.996 2.996
## F2|t1 -3.062 0.527 -5.807 0.000 -3.062 -3.061
## F2|t2 -1.541 0.528 -2.921 0.003 -1.541 -1.541
## F2|t3 -0.318 0.500 -0.635 0.526 -0.318 -0.317
## F2|t4 1.203 0.516 2.330 0.020 1.203 1.203
## F3|t1 -2.121 0.376 -5.641 0.000 -2.121 -2.121
## F3|t2 -0.937 0.401 -2.339 0.019 -0.937 -0.937
## F3|t3 0.207 0.396 0.522 0.602 0.207 0.207
## F3|t4 1.340 0.419 3.198 0.001 1.340 1.340
## F4|t1 -2.779 0.492 -5.649 0.000 -2.779 -2.778
## F4|t2 -1.297 0.465 -2.788 0.005 -1.297 -1.297
## F4|t3 -0.106 0.453 -0.235 0.814 -0.106 -0.106
## F4|t4 1.017 0.473 2.150 0.032 1.017 1.017
## F5|t1 -1.722 0.402 -4.287 0.000 -1.722 -1.722
## F5|t2 -0.574 0.409 -1.401 0.161 -0.574 -0.573
## F5|t3 0.660 0.408 1.619 0.105 0.660 0.660
## F5|t4 1.761 0.433 4.064 0.000 1.761 1.761
## F6|t1 -2.382 0.534 -4.463 0.000 -2.382 -2.382
## F6|t2 -1.009 0.482 -2.092 0.036 -1.009 -1.009
## F6|t3 0.318 0.466 0.683 0.494 0.318 0.318
## F6|t4 1.766 0.512 3.451 0.001 1.766 1.766
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .D1 0.707 0.707 0.707
## .D2 0.317 0.317 0.317
## .D3 0.680 0.680 0.680
## .E1 0.719 0.719 0.719
## .E2 0.636 0.636 0.636
## .E3 0.417 0.417 0.417
## .F2 0.344 0.344 0.344
## .F3 0.299 0.299 0.299
## .F4 0.316 0.316 0.316
## .F5 0.381 0.381 0.381
## .F6 0.470 0.470 0.470
## EconomcStsfctn 1.000 1.000 1.000
## CommuteQuality 1.000 1.000 1.000
## .LifeSatisfactn 1.000 0.911 0.911
##
## R-Square:
## Estimate
## D1 0.293
## D2 0.683
## D3 0.320
## E1 0.281
## E2 0.364
## E3 0.583
## F2 0.656
## F3 0.701
## F4 0.684
## F5 0.619
## F6 0.530
## LifeSatisfactn 0.089
fitMeasures(
fit_sem_housing,
c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr")
)
## chisq df pvalue cfi tli rmsea srmr
## 420.037 51.000 NA 0.924 0.918 0.137 0.071
20. Model Pembanding dengan Residual Covariance
model_sem_rescov <- '
# Measurement Model / Outer Model
EconomicSatisfaction =~ D1 + D2 + D3
CommuteQuality =~ E1 + E2 + E3
LifeSatisfaction =~ F2 + F3 + F4 + F5 + F6
# Residual covariance yang masih masuk akal secara teori
F5 ~~ F6
# Structural Model / Inner Model
LifeSatisfaction ~ EconomicSatisfaction + CommuteQuality
'
fit_sem_rescov <- sem(
model_sem_rescov,
data = data_sem,
ordered = ordered_items_final,
estimator = "WLSMV",
std.lv = TRUE
)
## Warning: lavaan->lav_model_vcov():
## The variance-covariance matrix of the estimated parameters (vcov) does not
## appear to be positive definite! The smallest eigenvalue (= -1.148918e-17)
## is smaller than zero. This may be a symptom that the model is not
## identified.
summary(
fit_sem_rescov,
fit.measures = TRUE,
standardized = TRUE,
rsquare = TRUE
)
## lavaan 0.6-21 ended normally after 24 iterations
##
## Estimator DWLS
## Optimization method NLMINB
## Number of model parameters 55
##
## Number of observations 384
##
## Model Test User Model:
## Standard Scaled
## Test Statistic 114.396 127.264
## Degrees of freedom 40 40
## P-value (Unknown) NA 0.000
## Scaling correction factor 0.996
## Shift parameter 12.352
## simple second-order correction
##
## Model Test Baseline Model:
##
## Test statistic 5408.429 3367.349
## Degrees of freedom 55 55
## P-value NA 0.000
## Scaling correction factor 1.616
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 0.986 0.974
## Tucker-Lewis Index (TLI) 0.981 0.964
##
## Robust Comparative Fit Index (CFI) 0.897
## Robust Tucker-Lewis Index (TLI) 0.858
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.070 0.075
## 90 Percent confidence interval - lower 0.055 0.061
## 90 Percent confidence interval - upper 0.085 0.090
## P-value H_0: RMSEA <= 0.050 0.015 0.002
## P-value H_0: RMSEA >= 0.080 0.136 0.322
##
## Robust RMSEA 0.114
## 90 Percent confidence interval - lower 0.095
## 90 Percent confidence interval - upper 0.134
## P-value H_0: Robust RMSEA <= 0.050 0.000
## P-value H_0: Robust RMSEA >= 0.080 0.998
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.064 0.064
##
## Parameter Estimates:
##
## Parameterization Delta
## Standard errors Robust.sem
## Information Expected
## Information saturated (h1) model Unstructured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## EconomicSatisfaction =~
## D1 0.659 0.046 14.477 0.000 0.659 0.659
## D2 0.842 0.033 25.264 0.000 0.842 0.842
## D3 0.626 0.045 13.994 0.000 0.626 0.626
## CommuteQuality =~
## E1 0.657 0.046 14.300 0.000 0.657 0.657
## E2 0.696 0.041 16.786 0.000 0.696 0.696
## E3 0.716 0.041 17.409 0.000 0.716 0.716
## LifeSatisfaction =~
## F2 0.774 0.028 27.795 0.000 0.803 0.803
## F3 0.805 0.026 30.792 0.000 0.835 0.835
## F4 0.789 0.027 28.681 0.000 0.819 0.819
## F5 0.768 0.028 27.097 0.000 0.798 0.798
## F6 0.718 0.033 21.640 0.000 0.745 0.745
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## LifeSatisfaction ~
## EconomcStsfctn -0.194 0.126 -1.533 0.125 -0.187 -0.187
## CommuteQuality 0.383 0.129 2.974 0.003 0.369 0.369
##
## Covariances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .F5 ~~
## .F6 -0.051 0.030 -1.660 0.097 -0.051 -0.126
## EconomicSatisfaction ~~
## CommuteQuality 0.719 0.056 12.827 0.000 0.719 0.719
##
## Thresholds:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## D1|t1 -2.037 0.146 -13.989 0.000 -2.037 -2.037
## D1|t2 -0.533 0.067 -7.906 0.000 -0.533 -0.533
## D1|t3 1.400 0.093 15.057 0.000 1.400 1.400
## D2|t1 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## D2|t2 -0.587 0.068 -8.603 0.000 -0.587 -0.587
## D2|t3 1.288 0.088 14.696 0.000 1.288 1.288
## D3|t1 -1.650 0.108 -15.228 0.000 -1.650 -1.650
## D3|t2 -0.691 0.070 -9.882 0.000 -0.691 -0.691
## D3|t3 1.032 0.078 13.211 0.000 1.032 1.032
## E1|t1 -2.794 0.323 -8.639 0.000 -2.794 -2.794
## E1|t2 -1.021 0.078 -13.126 0.000 -1.021 -1.021
## E1|t3 1.273 0.087 14.635 0.000 1.273 1.273
## E2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## E2|t2 -2.092 0.153 -13.693 0.000 -2.092 -2.092
## E2|t3 -0.658 0.069 -9.491 0.000 -0.658 -0.658
## E2|t4 1.303 0.088 14.755 0.000 1.303 1.303
## E3|t1 -2.562 0.245 -10.444 0.000 -2.562 -2.562
## E3|t2 -2.154 0.162 -13.331 0.000 -2.154 -2.154
## E3|t3 -0.431 0.066 -6.502 0.000 -0.431 -0.431
## E3|t4 1.032 0.078 13.211 0.000 1.032 1.032
## F2|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F2|t2 -0.917 0.075 -12.246 0.000 -0.917 -0.917
## F2|t3 0.298 0.065 4.580 0.000 0.298 0.298
## F2|t4 1.827 0.123 14.864 0.000 1.827 1.827
## F3|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F3|t2 -0.803 0.072 -11.133 0.000 -0.803 -0.803
## F3|t3 0.339 0.065 5.188 0.000 0.339 0.339
## F3|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F4|t1 -2.311 0.188 -12.303 0.000 -2.311 -2.311
## F4|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F4|t3 0.346 0.065 5.290 0.000 0.346 0.346
## F4|t4 1.473 0.097 15.196 0.000 1.473 1.473
## F5|t1 -1.987 0.140 -14.233 0.000 -1.987 -1.987
## F5|t2 -0.840 0.073 -11.509 0.000 -0.840 -0.840
## F5|t3 0.395 0.066 5.997 0.000 0.395 0.395
## F5|t4 1.493 0.098 15.220 0.000 1.493 1.493
## F6|t1 -2.418 0.210 -11.536 0.000 -2.418 -2.418
## F6|t2 -1.043 0.078 -13.295 0.000 -1.043 -1.043
## F6|t3 0.284 0.065 4.377 0.000 0.284 0.284
## F6|t4 1.732 0.115 15.107 0.000 1.732 1.732
##
## Variances:
## Estimate Std.Err z-value P(>|z|) Std.lv Std.all
## .D1 0.566 0.566 0.566
## .D2 0.291 0.291 0.291
## .D3 0.608 0.608 0.608
## .E1 0.569 0.569 0.569
## .E2 0.515 0.515 0.515
## .E3 0.487 0.487 0.487
## .F2 0.355 0.355 0.355
## .F3 0.303 0.303 0.303
## .F4 0.330 0.330 0.330
## .F5 0.364 0.364 0.364
## .F6 0.445 0.445 0.445
## EconomcStsfctn 1.000 1.000 1.000
## CommuteQuality 1.000 1.000 1.000
## .LifeSatisfactn 1.000 0.928 0.928
##
## R-Square:
## Estimate
## D1 0.434
## D2 0.709
## D3 0.392
## E1 0.431
## E2 0.485
## E3 0.513
## F2 0.645
## F3 0.697
## F4 0.670
## F5 0.636
## F6 0.555
## LifeSatisfactn 0.072
fitMeasures(
fit_sem_rescov,
c("chisq", "df", "pvalue", "cfi", "tli", "rmsea", "srmr")
)
## chisq df pvalue cfi tli rmsea srmr
## 114.396 40.000 NA 0.986 0.981 0.070 0.064