library(openintro)
library(ggplot2)
library(tidyverse)
library(dplyr)
library(haven)
library(ggpubr)
library(patchwork)
library(corrplot)
library(ggcorrplot)
library(psych)
library(PerformanceAnalytics)
library(GGally)
library(broom)
library(CTT)
library(readxl)
library(readr)
library(lavaan)
library(lavaanPlot)
library(semTools)
library(semPlot)
fin_ogrenci<- read_sav("ASGFINR5.sav")
fin_basari <- read_sav("ATGFINR5.sav")
fin_okul <- read_sav("ACGFINR5.sav")
fin_ev <- read_sav("ASHFINR5.sav")

hun_ogrenci <- read_sav("ASGHUNR5.sav")
hun_basari <- read_sav("ATGHUNR5.sav")
hun_okul <- read_sav("ACGHUNR5.sav")
hun_ev <- read_sav("ASHHUNR5.sav")

tur_ogrenci  <- read_sav("ASGTURR5.sav")
tur_basari <- read_sav("ATGTURR5.sav")
tur_okul <- read_sav("ACGTURR5.sav")
tur_ev <- read_sav("ASHTURR5.sav")

kaz_ogrenci  <- read_sav("ASGKAZA5.sav")  
kaz_basari <- read_sav("ATGKAZA5.sav")
kaz_okul <- read_sav("ACGKAZA5.sav")
kaz_ev <- read_sav("ASHKAZA5.sav")

uz_ogrenci  <- read_sav("ASGUZBR5.sav")
uz_basari <- read_sav("ATGUZBR5.sav")
uz_okul <- read_sav("ACGUZBR5.sav")
uz_ev <- read_sav("ASHUZBR5.sav")


fin_ev$IDCNTRY  <- 246
hun_ev$IDCNTRY  <- 348
tur_ev$IDCNTRY  <- 792
kaz_ev$IDCNTRY <- 398
uz_ev$IDCNTRY  <- 860

full_data_ev <- bind_rows(fin_ev,
                          hun_ev,
                          tur_ev,
                          kaz_ev,
                          uz_ev)
head(full_data_ev,3)
## # A tibble: 3 × 118
##   IDCNTRY IDPOP       IDGRADER IDGRADE WAVE    IDSCHOOL IDCLASS IDSTUD ITLANG_HQ
##     <dbl> <dbl+lbl>   <dbl+lb> <dbl+l> <dbl+l>    <dbl>   <dbl>  <dbl> <dbl+lbl>
## 1     246 1 [Populat… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 43 [Finn…
## 2     246 1 [Populat… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 NA       
## 3     246 1 [Populat… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 43 [Finn…
## # ℹ 109 more variables: LCID_HQ <dbl+lbl>, ASBH01A <dbl+lbl>,
## #   ASBH01B <dbl+lbl>, ASBH01C <dbl+lbl>, ASBH01D <dbl+lbl>, ASBH01E <dbl+lbl>,
## #   ASBH01F <dbl+lbl>, ASBH01G <dbl+lbl>, ASBH01H <dbl+lbl>, ASBH01I <dbl+lbl>,
## #   ASBH01J <dbl+lbl>, ASBH01K <dbl+lbl>, ASBH01L <dbl+lbl>, ASBH01M <dbl+lbl>,
## #   ASBH01N <dbl+lbl>, ASBH01O <dbl+lbl>, ASBH01P <dbl+lbl>, ASBH01Q <dbl+lbl>,
## #   ASBH01R <dbl+lbl>, ASBH02A <dbl+lbl>, ASBH02B <dbl+lbl>, ASBH03A <dbl+lbl>,
## #   ASBH03B <dbl+lbl>, ASBH03C <dbl+lbl>, ASBH03D <dbl+lbl>, …
fin_ogrenci$IDCNTRY  <- 246
hun_ogrenci$IDCNTRY  <- 348
tur_ogrenci$IDCNTRY  <- 792
kaz_ogrenci$IDCNTRY <- 398
uz_ogrenci$IDCNTRY  <- 860

full_data_ogrenci <- bind_rows(fin_ogrenci,
                               hun_ogrenci,
                               tur_ogrenci,
                               kaz_ogrenci,
                               uz_ogrenci)

head(full_data_ogrenci,3)
## # A tibble: 3 × 155
##   IDCNTRY IDPOP         IDGRADER IDGRADE WAVE    IDSCHOOL IDCLASS IDSTUD ITSEX  
##     <dbl> <dbl+lbl>     <dbl+lb> <dbl+l> <dbl+l>    <dbl>   <dbl>  <dbl> <dbl+l>
## 1     246 1 [Populatio… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 2 [Boy]
## 2     246 1 [Populatio… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 2 [Boy]
## 3     246 1 [Populatio… 2 [Uppe… 4       1 [Spr…     5001  500101 5.00e7 2 [Boy]
## # ℹ 146 more variables: ITADMINI <dbl+lbl>, ITLANG_SA <dbl+lbl>,
## #   LCID_SA <dbl+lbl>, ITLANG_SQ <dbl+lbl>, LCID_SQ <dbl+lbl>,
## #   IDBOOK <dbl+lbl>, ASBG01 <dbl+lbl>, ASBG03 <dbl+lbl>, ASBG04 <dbl+lbl>,
## #   ASBG05A <dbl+lbl>, ASBG05B <dbl+lbl>, ASBG05C <dbl+lbl>, ASBG05D <dbl+lbl>,
## #   ASBG05E <dbl+lbl>, ASBG05F <dbl+lbl>, ASBG05G <dbl+lbl>, ASBG05H <dbl+lbl>,
## #   ASBG05I <dbl+lbl>, ASBG05J <dbl+lbl>, ASBG05K <dbl+lbl>, ASBG06 <dbl+lbl>,
## #   ASBG07A <dbl+lbl>, ASBG07B <dbl+lbl>, ASBG08A <dbl+lbl>, …
fin_basari$IDCNTRY  <- 246
hun_basari$IDCNTRY  <- 348
tur_basari$IDCNTRY  <- 792
kaz_basari$IDCNTRY <- 398
uz_basari$IDCNTRY  <- 860

full_data_basari <- bind_rows(fin_basari,
                              hun_basari,
                              tur_basari,
                              kaz_basari,
                              uz_basari)

head(full_data_basari, 3)
## # A tibble: 3 × 185
##   IDCNTRY IDPOP      IDGRADER IDGRADE IDSCHOOL IDTEACH IDLINK IDTEALIN ITLANG_TQ
##     <dbl> <dbl+lbl>  <dbl+lb> <dbl+l>    <dbl>   <dbl> <dbl+>    <dbl> <dbl+lbl>
## 1     246 1 [Popula… 2 [Uppe… 4           5001  500101 1      50010101 43 [Finn…
## 2     246 1 [Popula… 2 [Uppe… 4           5001  500102 2      50010202 43 [Finn…
## 3     246 1 [Popula… 2 [Uppe… 4           5001  500103 3      50010303 43 [Finn…
## # ℹ 176 more variables: LCID_TQ <dbl+lbl>, isDummy <dbl+lbl>, ATBG01 <dbl+lbl>,
## #   ATBG02 <dbl+lbl>, ATBG03 <dbl+lbl>, ATBG04 <dbl+lbl>, ATBG05AA <dbl+lbl>,
## #   ATBG05AB <dbl+lbl>, ATBG05AC <dbl+lbl>, ATBG05AD <dbl+lbl>,
## #   ATBG05BA <dbl+lbl>, ATBG05BB <dbl+lbl>, ATBG05BC <dbl+lbl>,
## #   ATBG05BD <dbl+lbl>, ATBG05BE <dbl+lbl>, ATBG05BF <dbl+lbl>,
## #   ATBG05BG <dbl+lbl>, ATBG05BH <dbl+lbl>, ATBG05BI <dbl+lbl>,
## #   ATBG05BJ <dbl+lbl>, ATBG05BK <dbl+lbl>, ATBG06 <dbl+lbl>, …
fin_okul$IDCNTRY  <- 246
hun_okul$IDCNTRY  <- 348
tur_okul$IDCNTRY  <- 792
kaz_okul$IDCNTRY <- 398
uz_okul$IDCNTRY  <- 860

full_data_okul <- bind_rows(fin_okul,
                            hun_okul,
                            tur_okul,
                            kaz_okul,
                            uz_okul)

head(full_data_okul, 3)
## # A tibble: 3 × 101
##   IDCNTRY IDPOP   IDGRADER IDGRADE IDSCHOOL ITLANG_CQ LCID_CQ    ACBG03A ACBG03B
##     <dbl> <dbl+l> <dbl+lb> <dbl+l>    <dbl> <dbl+lbl> <dbl+lbl>  <dbl+l> <dbl+l>
## 1     246 1 [Pop… 2 [Uppe… 4           5001 43 [Finn… 1035 [Fin… 1 [0 t… 2 [11 …
## 2     246 1 [Pop… 2 [Uppe… 4           5002 32 [Swed… 2077 [Swe… 1 [0 t… 4 [Mor…
## 3     246 1 [Pop… 2 [Uppe… 4           5003 43 [Finn… 1035 [Fin… 1 [0 t… 1 [0 t…
## # ℹ 92 more variables: ACBG04 <dbl+lbl>, ACBG05A <dbl+lbl>, ACBG05B <dbl+lbl>,
## #   ACBG06A <dbl+lbl>, ACBG06B <dbl+lbl>, ACBG06C <dbl+lbl>, ACBG07A <dbl+lbl>,
## #   ACBG07B <dbl+lbl>, ACBG07C <dbl+lbl>, ACBG08 <dbl+lbl>, ACBG09 <dbl+lbl>,
## #   ACBG10AA <dbl+lbl>, ACBG10AB <dbl+lbl>, ACBG10AC <dbl+lbl>,
## #   ACBG10AD <dbl+lbl>, ACBG10AE <dbl+lbl>, ACBG10AF <dbl+lbl>,
## #   ACBG10AG <dbl+lbl>, ACBG10AH <dbl+lbl>, ACBG10AI <dbl+lbl>,
## #   ACBG10AJ <dbl+lbl>, ACBG10BA <dbl+lbl>, ACBG10BB <dbl+lbl>, …
full_data_ev$IDCNTRY <- as.numeric(full_data_ev$IDCNTRY)

full_data_ev$IDCNTRY <- factor(
  full_data_ev$IDCNTRY,
  levels = c(246, 348, 792, 398, 860),
  labels = c("Finlandiya", "Macaristan", "Türkiye", "Kazakistan", "Özbekistan"))




full_data_okul$IDCNTRY <- as.numeric(full_data_okul$IDCNTRY)

full_data_okul$IDCNTRY <- factor(
  full_data_okul$IDCNTRY,
  levels = c(246, 348, 792, 398, 860),
  labels = c("Finlandiya", "Macaristan", "Türkiye", "Kazakistan", "Özbekistan"))




full_data_ogrenci$IDCNTRY <- as.numeric(full_data_ogrenci$IDCNTRY)

full_data_ogrenci$IDCNTRY <- factor(
  full_data_ogrenci$IDCNTRY,
  levels = c(246, 348, 792, 398, 860),
  labels = c("Finlandiya", "Macaristan", "Türkiye", "Kazakistan", "Özbekistan"))

full_data_basari$IDCNTRY <- as.numeric(full_data_basari$IDCNTRY)




full_data_basari$IDCNTRY <- factor(
  full_data_basari$IDCNTRY,
  levels = c(246, 348, 792, 398, 860),
  labels = c("Finlandiya", "Macaristan", "Türkiye", "Kazakistan", "Özbekistan"))

pirls <- bind_rows(full_data_ogrenci, full_data_basari, full_data_okul, full_data_ev)
tutum <- c("ASBR07A", "ASBR07B", "ASBR07C", "ASBR07D", "ASBR07E", "ASBR07F", "ASBR07G", "ASBR07H")

ilgi <- c("ASBR01A", "ASBR01B", "ASBR01C", "ASBR01D", "ASBR01E","ASBR01F", "ASBR01G", "ASBR01H", "ASBR01I")

basari <- c("ASRIBM01", "ASRIBM02", "ASRIBM03", "ASRIBM04", "ASRIBM05")

ev <- c("ASBH01A", "ASBH01B", "ASBH01C", "ASBH01D", "ASBH01E", "ASBH01F", "ASBH01G", "ASBH01H", "ASBH01I", "ASBH01J","ASBH01K", "ASBH01L", "ASBH01M", "ASBH01N", "ASBH01O","ASBH01P", "ASBH01Q", "ASBH01R")

oz <- c("ASBR08A", "ASBR08B", "ASBR08C","ASBR08D", "ASBR08E", "ASBR08F")

tum <- c(tutum, ilgi, basari, ev, oz, "IDCNTRY")

pirls <- pirls %>%
  select(all_of(tum))
missing_report <- pirls %>%
  summarise_all(~ sum(is.na(.))) %>%
  t() %>%
  as.data.frame()

colnames(missing_report) <- "Missing_Count"
missing_report$Variable <- rownames(missing_report)
missing_report$Missing_Percent <- (missing_report$Missing_Count / nrow(pirls)) * 100

head(missing_report[order(-missing_report$Missing_Percent), ], 20)
##         Missing_Count Variable Missing_Percent
## ASBH01C         32851  ASBH01C        57.57172
## ASBH01D         32767  ASBH01D        57.42451
## ASBH01G         32706  ASBH01G        57.31761
## ASBH01F         32684  ASBH01F        57.27905
## ASBH01K         32675  ASBH01K        57.26328
## ASBH01R         32669  ASBH01R        57.25276
## ASBH01M         32651  ASBH01M        57.22122
## ASBH01N         32632  ASBH01N        57.18792
## ASBH01L         32621  ASBH01L        57.16864
## ASBH01E         32620  ASBH01E        57.16689
## ASBH01O         32619  ASBH01O        57.16514
## ASBH01B         32615  ASBH01B        57.15813
## ASBH01Q         32602  ASBH01Q        57.13535
## ASBH01H         32592  ASBH01H        57.11782
## ASBH01J         32592  ASBH01J        57.11782
## ASBH01I         32577  ASBH01I        57.09153
## ASBH01P         32564  ASBH01P        57.06875
## ASBH01A         32489  ASBH01A        56.93731
## ASBR08F         30647  ASBR08F        53.70919
## ASBR08D         30588  ASBR08D        53.60579
names(pirls)
##  [1] "ASBR07A"  "ASBR07B"  "ASBR07C"  "ASBR07D"  "ASBR07E"  "ASBR07F" 
##  [7] "ASBR07G"  "ASBR07H"  "ASBR01A"  "ASBR01B"  "ASBR01C"  "ASBR01D" 
## [13] "ASBR01E"  "ASBR01F"  "ASBR01G"  "ASBR01H"  "ASBR01I"  "ASRIBM01"
## [19] "ASRIBM02" "ASRIBM03" "ASRIBM04" "ASRIBM05" "ASBH01A"  "ASBH01B" 
## [25] "ASBH01C"  "ASBH01D"  "ASBH01E"  "ASBH01F"  "ASBH01G"  "ASBH01H" 
## [31] "ASBH01I"  "ASBH01J"  "ASBH01K"  "ASBH01L"  "ASBH01M"  "ASBH01N" 
## [37] "ASBH01O"  "ASBH01P"  "ASBH01Q"  "ASBH01R"  "ASBR08A"  "ASBR08B" 
## [43] "ASBR08C"  "ASBR08D"  "ASBR08E"  "ASBR08F"  "IDCNTRY"
full_data_ogrenci <- na.omit(pirls)

names(pirls)
##  [1] "ASBR07A"  "ASBR07B"  "ASBR07C"  "ASBR07D"  "ASBR07E"  "ASBR07F" 
##  [7] "ASBR07G"  "ASBR07H"  "ASBR01A"  "ASBR01B"  "ASBR01C"  "ASBR01D" 
## [13] "ASBR01E"  "ASBR01F"  "ASBR01G"  "ASBR01H"  "ASBR01I"  "ASRIBM01"
## [19] "ASRIBM02" "ASRIBM03" "ASRIBM04" "ASRIBM05" "ASBH01A"  "ASBH01B" 
## [25] "ASBH01C"  "ASBH01D"  "ASBH01E"  "ASBH01F"  "ASBH01G"  "ASBH01H" 
## [31] "ASBH01I"  "ASBH01J"  "ASBH01K"  "ASBH01L"  "ASBH01M"  "ASBH01N" 
## [37] "ASBH01O"  "ASBH01P"  "ASBH01Q"  "ASBH01R"  "ASBR08A"  "ASBR08B" 
## [43] "ASBR08C"  "ASBR08D"  "ASBR08E"  "ASBR08F"  "IDCNTRY"
missing_report <- pirls %>%
  summarise_all(~ sum(is.na(.))) %>%
  t() %>%
  as.data.frame()

colnames(missing_report) <- "Missing_Count"
missing_report$Variable <- rownames(missing_report)
missing_report$Missing_Percent <- (missing_report$Missing_Count / nrow(pirls)) * 100

head(missing_report[order(-missing_report$Missing_Percent), ], 20)
##         Missing_Count Variable Missing_Percent
## ASBH01C         32851  ASBH01C        57.57172
## ASBH01D         32767  ASBH01D        57.42451
## ASBH01G         32706  ASBH01G        57.31761
## ASBH01F         32684  ASBH01F        57.27905
## ASBH01K         32675  ASBH01K        57.26328
## ASBH01R         32669  ASBH01R        57.25276
## ASBH01M         32651  ASBH01M        57.22122
## ASBH01N         32632  ASBH01N        57.18792
## ASBH01L         32621  ASBH01L        57.16864
## ASBH01E         32620  ASBH01E        57.16689
## ASBH01O         32619  ASBH01O        57.16514
## ASBH01B         32615  ASBH01B        57.15813
## ASBH01Q         32602  ASBH01Q        57.13535
## ASBH01H         32592  ASBH01H        57.11782
## ASBH01J         32592  ASBH01J        57.11782
## ASBH01I         32577  ASBH01I        57.09153
## ASBH01P         32564  ASBH01P        57.06875
## ASBH01A         32489  ASBH01A        56.93731
## ASBR08F         30647  ASBR08F        53.70919
## ASBR08D         30588  ASBR08D        53.60579
#Burada bir takım sıkıntılarım vukuu buldu. Öncelikle estonya Pirls 2021'e katılmamış ben estonya yerine kısaltmalarını karıştırıp ispanya verilerini çekmişim ama fark edince çıkattım. na.omit ile veri temizledim sem için en güvenilir yol olduğu için ama bu sefer de hepsi gitti :D bu kısımda eksik verilerle nasıl çalışacağımızı öğrenmediğim için ve bu dönem yetişemeyeceği için bu kadar veri setimi düzenlediğim ve çalışmanın arka planını oturttuğum için yapay zeka desteği ile verilerimi temizlemeye çalıştım bu kısımdan sonraki veri temizleme için yaptığım şeyler bana ait değil pek kısacası...

#FIML (Full Information Maximum Likelihood), eksik verili analizlerde kullanılan modern bir yöntemdir. Geleneksel yöntemlerden (listwise deletion) farklı olarak tüm mevcut veriyi kullanır.

#Lavaan paketi bunu yaptığı için şimdilik bir şey yapmayacağım şeklinde anladım o yüzden analizlerime devam ediyorum. Zaten daha önce Jamovide yem yaparken de lavaan paketini kullanmıştım.

#NOTTTT: Buraları chunk içine yazmayın dediniz ama sonrasında chunkı show nothing yaptığımda bu kısım gözükmeyeceği için pratik olacak o yüzden buraya yazıyorum.

The Current Study

Pathways to Reading Achievement: Examining Mediation Effects of Self-Concept and Home Environment

Progress In International Reading Literacy Study (PIRLS)

The current study focuses on the mechanisms through which reading attitude and reading interest influence reading achievement and consists of five hypotheses focused on two research questions.

  1. RQ: How are home literacy and reading self-concept related to the relationship between reading attitude and reading interest and reading achievement?

H1: Home literacy plays a significant mediating role in the relationship between reading attitude and reading achievement.

H2: Home literacy plays a significant mediating role in the relationship between reading interest and reading achievement.

H3: Reading self-concept plays a significant mediating role in the relationship between reading attitude and reading achievement.

H4: Reading self-concept plays a significant mediating role in the relationship between reading interest and reading achievement.

  1. RQ: Is there a significant difference in the above relationships when language family is controlled for?

H5: There is a significant difference in the above relationships by language family.

In summary, the hypothetical model is a multimodal model in which home literacy and reading self-concept mediate the effects of reading attitude and reading interest on reading achievement (Figure 1).

Figure 1. Hypothetical model for the relationship between reading attitude and reading interest and reading achievement.
Figure 1. Hypothetical model for the relationship between reading attitude and reading interest and reading achievement.

Methodogy

Sample

Instruments

  • Reading Attitude : ASBR07A, ASBR07B, ASBR07C, ASBR07D, ASBR07E, ASBR07F, ASBR07G, ASBR07H

  • Reading Interest : ASBR01A, ASBR01B, ASBR01C, ASBR01D, ASBR01E, ASBR01F, ASBR01G, ASBR01H, ASBR01I

  • Reading Achievement: The reading achievement scale is described using data coded ASRIBM01, ASRIBM02, ASRIBM03, ASRIBM04, and ASRIBM05. These data are determined by grading students’ scores from 0 to 400 as 1, 400 to 475 as 2, 475 to 550 as 3, 550 to 625 as 4, and 625 and above as 5.

  • Home Literacy Environment: Scale ASBH01A, ASBH01B, ASBH01C, ASBH01D, ASBH01E, ASBH01F, ASBH01G, ASBH01H, ASBH01I, ASBH01J, ASBH01K, ASBH01L, ASBH01M, ASBH01N, ASBH01O, ASBH01P, ASBH01Q, ASBH01R

  • Reading Self-Concept: ASBR08A, ASBR08B, ASBR08C, ASBR08D, ASBR08E, ASBR08F

Data analysis

The above publicly available data was loaded into the R programme for statistical analysis. Data analysis was conducted in several stages. Structural Equation Modeling (SEM), a second-generation quantitative data analysis method, was used to test and validate the model. In the first step, reliability values, descriptive statistics, and correlation coefficients between composite scale scores were examined for all variables. In the second stage, confirmatory factor analysis (CFA) was conducted to test the validity of the measurement model. In the final stage, SEM was applied to test the predicted relationships of the model. Prior to the application, the assumption of multiple normality (Mardia’s coefficient) was checked.

Results

Descriptive statistics and correlation analyses

pirls$tutum_puan <- rowMeans(pirls[, tutum], na.rm = TRUE)
pirls$ilgi_puan <- rowMeans(pirls[, ilgi], na.rm = TRUE)
pirls$basari_puan <- rowMeans(pirls[, basari], na.rm = TRUE)
pirls$ev_puan <- rowMeans(pirls[, ev], na.rm = TRUE)
pirls$oz_puan <- rowMeans(pirls[, oz], na.rm = TRUE)


describe(pirls$tutum_puan)
##    vars     n mean   sd median trimmed  mad min max range skew kurtosis se
## X1    1 27137  1.9 0.58   1.75    1.83 0.56   1   4     3 0.97     0.72  0
describe(pirls$ilgi_puan)
##    vars     n mean   sd median trimmed  mad min max range skew kurtosis se
## X1    1 27226 1.49 0.51   1.33    1.41 0.49   1   4     3 1.51     2.94  0
describe(pirls$basari_puan)
##    vars     n mean   sd median trimmed  mad min max range  skew kurtosis   se
## X1    1 27415 2.99 1.07      3    3.02 1.19   1   5     4 -0.18    -0.85 0.01
describe(pirls$ev_puan)
##    vars     n mean   sd median trimmed  mad min max range skew kurtosis se
## X1    1 25022 1.61 0.37   1.56    1.58 0.33   1   3     2  0.8     0.95  0
describe(pirls$oz_puan)
##    vars     n mean   sd median trimmed  mad min max range  skew kurtosis se
## X1    1 27045 2.47 0.54    2.5    2.53 0.49   1   4     3 -0.84     0.58  0
olcekler <- pirls[, c("tutum_puan", "ilgi_puan", "basari_puan","ev_puan", "oz_puan")]

view(round(describe(olcekler), 3))

p1 <- ggplot(pirls, aes(tutum_puan)) +
  geom_density(fill = "skyblue", alpha = 0.5) +
  labs(title = "Reading Attitude",
       x = "Reading Attitude Score",
       y = "Density") +
  theme_minimal() +
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        plot.title = element_text(size = 10),
        axis.title = element_text(size = 8))

p2 <- ggplot(pirls, aes(ilgi_puan)) +
  geom_density(fill = "skyblue", alpha = 0.5) +
  labs(title = "Reading Interest",
       x = "Reading Interest Score",
       y = "Density") +
  theme_minimal() +
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        plot.title = element_text(size = 10),
        axis.title = element_text(size = 8))

p3 <- ggplot(pirls, aes(ev_puan)) +
  geom_density(fill = "skyblue", alpha = 0.5) +
  labs(title = "Home Literacy Environment",
       x = "Home Environment Score",
       y = "Density") +
  theme_minimal() +
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        plot.title = element_text(size = 10),
        axis.title = element_text(size = 8))

p4 <- ggplot(pirls, aes(oz_puan)) +
  geom_density(fill = "skyblue", alpha = 0.5) +
  labs(title = "Reading Self-Concept",
       x = "Reading Self-Concept Score",
       y = "Density") +
  theme_minimal() +
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        plot.title = element_text(size = 10),
        axis.title = element_text(size = 8))

p5 <- ggplot(pirls, aes(basari_puan)) +
  geom_density(fill = "skyblue", alpha = 0.5) +
  labs(title = "Reading Achievement",
       x = "Reading Achievement Score",
       y = "Density") +
  theme_minimal() +
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        plot.title = element_text(size = 10),
        axis.title = element_text(size = 8))


(p1 + p2) / (p3 + p4) / (p5 + plot_spacer())

olcekler <- pirls[, c("tutum_puan", "ilgi_puan", "basari_puan","ev_puan", "oz_puan")]


cor(olcekler, use = "pairwise.complete.obs")
##             tutum_puan    ilgi_puan  basari_puan ev_puan   oz_puan
## tutum_puan   1.0000000 0.5346868860 0.1784155797      NA 0.1602999
## ilgi_puan    0.5346869 1.0000000000 0.0008765158      NA 0.0353600
## basari_puan  0.1784156 0.0008765158 1.0000000000      NA 0.3903747
## ev_puan             NA           NA           NA       1        NA
## oz_puan      0.1602999 0.0353599959 0.3903747125      NA 1.0000000
#burada bir takım eksik veriler başıma iş aştı o yüzden ortalama atayarak devam ettim

pirls <- pirls %>%
  mutate(
    tutum_puan = ifelse(is.na(tutum_puan), mean(tutum_puan, na.rm = TRUE), tutum_puan),
    ilgi_puan = ifelse(is.na(ilgi_puan), mean(ilgi_puan, na.rm = TRUE), ilgi_puan),
    basari_puan = ifelse(is.na(basari_puan), mean(basari_puan, na.rm = TRUE), basari_puan),
    ev_puan = ifelse(is.na(ev_puan), mean(ev_puan, na.rm = TRUE), ev_puan),
    oz_puan = ifelse(is.na(oz_puan), mean(oz_puan, na.rm = TRUE), oz_puan)
  )

olcekler <- pirls[, c("tutum_puan", "ilgi_puan", "basari_puan","ev_puan", "oz_puan")]

cor <- cor(olcekler, use = "pairwise.complete.obs")

view(cor)
Variables n mean sd median trimmed mad skew kurtosis se
Reading Attitude 27137 1.897 0.582 1.750 1.832 0.556 0.974 0.724 0.004
Reading Interest 27226 1.494 0.513 1.333 1.414 0.494 1.511 2.938 0.003
Reading Achievement 27415 2.992 1.074 3.000 3.017 1.186 -0.179 -0.846 0.006
Home Literacy Environment 25022 1.606 0.373 1.556 1.581 0.329 0.802 0.955 0.002
Reading Self-Concept 27045 2.474 0.535 2.500 2.535 0.494 -0.842 0.577 0.003
Reading Attitude Reading Interest Reading Achievement Home Literacy Environment Reading Self-Concept
Reading Attitude 1.000000e+00 5.305412e-01 1.771641e-01 -9.407748e-24 1.596063e-01
Reading Interest 5.305412e-01 1.000000e+00 8.727155e-04 7.862450e-24 3.495277e-02
Reading Achievement 1.771641e-01 8.727155e-04 1.000000e+00 -3.184852e-24 3.868405e-01
Home Literacy Environment -9.407748e-24 7.862450e-24 -3.184852e-24 1.000000e+00 2.740915e-24
Reading Self-Concept 1.596063e-01 3.495277e-02 3.868405e-01 2.740915e-24 1.000000e+00

CFA of Data Collection Tools

pirls <- pirls[, c(
  "ASBR07A","ASBR07B","ASBR07C","ASBR07D","ASBR07E","ASBR07F","ASBR07G","ASBR07H",
  "ASBR01A","ASBR01B","ASBR01C","ASBR01D","ASBR01E","ASBR01F","ASBR01G","ASBR01H","ASBR01I",
  "ASRIBM01","ASRIBM02","ASRIBM03","ASRIBM04","ASRIBM05",
  "ASBH01A","ASBH01B","ASBH01C","ASBH01D","ASBH01E","ASBH01F","ASBH01G","ASBH01H","ASBH01I",
  "ASBH01J","ASBH01K","ASBH01L","ASBH01M","ASBH01N","ASBH01O","ASBH01P","ASBH01Q","ASBH01R",
  "ASBR08A","ASBR08B","ASBR08C","ASBR08D","ASBR08E","ASBR08F"
)]

pirls<- data.frame(lapply(pirls, function(x) as.numeric(as.character(x))))

model_tutum <- "tutum =~ ASBR07A + ASBR07B + ASBR07C + ASBR07D + ASBR07E + ASBR07F + ASBR07G + ASBR07H"

model_ilgi <- "ilgi =~ ASBR01A + ASBR01B + ASBR01C + ASBR01D + ASBR01E + ASBR01F + ASBR01G + ASBR01H + ASBR01I"

model_basari <-"basari =~ ASRIBM01 + ASRIBM02 + ASRIBM03 + ASRIBM04 + ASRIBM05"

model_ev <- "ev=~ASBH01A + ASBH01B + ASBH01C + ASBH01D + ASBH01E + ASBH01F + ASBH01G + ASBH01H + ASBH01I + ASBH01J+ ASBH01K + ASBH01L+ ASBH01M + ASBH01N + ASBH01O + ASBH01P + ASBH01Q+ ASBH01R"

model_oz <- "oz=~ASBR08A+ASBR08B +ASBR08C+ASBR08D + ASBR08E+ASBR08F"




cfa_tutum <- cfa(model_tutum, data = pirls, missing = "fiml")

summary(cfa_tutum, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 34 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        24
## 
##                                                   Used       Total
##   Number of observations                         27137       57061
##   Number of missing patterns                       163            
## 
## Model Test User Model:
##                                                       
##   Test statistic                              3372.544
##   Degrees of freedom                                20
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             89143.009
##   Degrees of freedom                                28
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.962
##   Tucker-Lewis Index (TLI)                       0.947
##                                                       
##   Robust Comparative Fit Index (CFI)             0.962
##   Robust Tucker-Lewis Index (TLI)                0.947
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)            -249996.451
##   Loglikelihood unrestricted model (H1)    -248310.179
##                                                       
##   Akaike (AIC)                              500040.902
##   Bayesian (BIC)                            500237.910
##   Sample-size adjusted Bayesian (SABIC)     500161.639
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.079
##   90 Percent confidence interval - lower         0.076
##   90 Percent confidence interval - upper         0.081
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    0.153
##                                                       
##   Robust RMSEA                                   0.080
##   90 Percent confidence interval - lower         0.078
##   90 Percent confidence interval - upper         0.082
##   P-value H_0: Robust RMSEA <= 0.050             0.000
##   P-value H_0: Robust RMSEA >= 0.080             0.536
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.030
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   tutum =~                                                              
##     ASBR07A           1.000                               0.603    0.588
##     ASBR07B           1.199    0.013   93.659    0.000    0.723    0.750
##     ASBR07C          -0.921    0.013  -69.446    0.000   -0.555   -0.510
##     ASBR07D           1.298    0.014   90.972    0.000    0.782    0.723
##     ASBR07E           1.261    0.013   97.282    0.000    0.760    0.816
##     ASBR07F           1.013    0.011   92.384    0.000    0.611    0.736
##     ASBR07G           1.053    0.012   89.589    0.000    0.635    0.706
##     ASBR07H           0.958    0.011   86.387    0.000    0.577    0.675
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR07A           1.891    0.006  302.726    0.000    1.891    1.843
##    .ASBR07B           1.735    0.006  295.114    0.000    1.735    1.800
##    .ASBR07C           3.102    0.007  464.765    0.000    3.102    2.847
##    .ASBR07D           2.040    0.007  308.701    0.000    2.040    1.886
##    .ASBR07E           1.710    0.006  300.951    0.000    1.710    1.835
##    .ASBR07F           1.564    0.005  308.664    0.000    1.564    1.884
##    .ASBR07G           1.643    0.005  299.217    0.000    1.643    1.826
##    .ASBR07H           1.520    0.005  290.771    0.000    1.520    1.777
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR07A           0.689    0.006  108.184    0.000    0.689    0.655
##    .ASBR07B           0.407    0.004   96.748    0.000    0.407    0.438
##    .ASBR07C           0.878    0.008  109.948    0.000    0.878    0.740
##    .ASBR07D           0.557    0.006   99.201    0.000    0.557    0.477
##    .ASBR07E           0.290    0.003   85.966    0.000    0.290    0.334
##    .ASBR07F           0.316    0.003   97.883    0.000    0.316    0.458
##    .ASBR07G           0.407    0.004  100.656    0.000    0.407    0.502
##    .ASBR07H           0.399    0.004  102.932    0.000    0.399    0.545
##     tutum             0.363    0.007   50.262    0.000    1.000    1.000
## 
## R-Square:
##                    Estimate
##     ASBR07A           0.345
##     ASBR07B           0.562
##     ASBR07C           0.260
##     ASBR07D           0.523
##     ASBR07E           0.666
##     ASBR07F           0.542
##     ASBR07G           0.498
##     ASBR07H           0.455
cfa_ilgi <- cfa(model_ilgi, data = pirls, missing = "fiml")

summary(cfa_ilgi, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 38 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        27
## 
##                                                   Used       Total
##   Number of observations                         27226       57061
##   Number of missing patterns                       197            
## 
## Model Test User Model:
##                                                       
##   Test statistic                              6446.599
##   Degrees of freedom                                27
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             66410.476
##   Degrees of freedom                                36
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.903
##   Tucker-Lewis Index (TLI)                       0.871
##                                                       
##   Robust Comparative Fit Index (CFI)             0.903
##   Robust Tucker-Lewis Index (TLI)                0.870
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)            -249896.361
##   Loglikelihood unrestricted model (H1)    -246673.061
##                                                       
##   Akaike (AIC)                              499846.722
##   Bayesian (BIC)                            500068.444
##   Sample-size adjusted Bayesian (SABIC)     499982.638
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.093
##   90 Percent confidence interval - lower         0.092
##   90 Percent confidence interval - upper         0.095
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    1.000
##                                                       
##   Robust RMSEA                                   0.095
##   90 Percent confidence interval - lower         0.093
##   90 Percent confidence interval - upper         0.097
##   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.045
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ilgi =~                                                               
##     ASBR01A           1.000                               0.463    0.604
##     ASBR01B           1.180    0.014   82.140    0.000    0.547    0.616
##     ASBR01C           0.892    0.014   62.346    0.000    0.413    0.462
##     ASBR01D           0.983    0.013   78.029    0.000    0.456    0.606
##     ASBR01E           1.111    0.013   87.220    0.000    0.515    0.679
##     ASBR01F           1.142    0.015   78.623    0.000    0.529    0.628
##     ASBR01G           0.990    0.013   77.645    0.000    0.459    0.628
##     ASBR01H           0.837    0.011   73.072    0.000    0.388    0.580
##     ASBR01I           0.888    0.012   75.231    0.000    0.412    0.596
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR01A           1.517    0.005  325.656    0.000    1.517    1.978
##    .ASBR01B           1.657    0.005  306.595    0.000    1.657    1.868
##    .ASBR01C           1.640    0.005  299.744    0.000    1.640    1.832
##    .ASBR01D           1.483    0.005  322.874    0.000    1.483    1.971
##    .ASBR01E           1.477    0.005  319.632    0.000    1.477    1.950
##    .ASBR01F           1.594    0.005  310.586    0.000    1.594    1.893
##    .ASBR01G           1.419    0.004  318.426    0.000    1.419    1.943
##    .ASBR01H           1.320    0.004  323.348    0.000    1.320    1.973
##    .ASBR01I           1.331    0.004  315.671    0.000    1.331    1.925
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR01A           0.373    0.004  101.505    0.000    0.373    0.635
##    .ASBR01B           0.488    0.005  100.841    0.000    0.488    0.620
##    .ASBR01C           0.630    0.006  109.411    0.000    0.630    0.787
##    .ASBR01D           0.359    0.004  102.331    0.000    0.359    0.633
##    .ASBR01E           0.309    0.003   95.191    0.000    0.309    0.539
##    .ASBR01F           0.430    0.004  100.257    0.000    0.430    0.605
##    .ASBR01G           0.323    0.003   99.642    0.000    0.323    0.605
##    .ASBR01H           0.297    0.003  103.395    0.000    0.297    0.664
##    .ASBR01I           0.308    0.003  102.626    0.000    0.308    0.645
##     ilgi              0.215    0.004   49.821    0.000    1.000    1.000
## 
## R-Square:
##                    Estimate
##     ASBR01A           0.365
##     ASBR01B           0.380
##     ASBR01C           0.213
##     ASBR01D           0.367
##     ASBR01E           0.461
##     ASBR01F           0.395
##     ASBR01G           0.395
##     ASBR01H           0.336
##     ASBR01I           0.355
cfa_basari <- cfa(model_basari, data = pirls, missing = "fiml")

summary(cfa_basari, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 30 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        15
## 
##                                                   Used       Total
##   Number of observations                         27415       57061
##   Number of missing patterns                         1            
## 
## Model Test User Model:
##                                                       
##   Test statistic                                 3.369
##   Degrees of freedom                                 5
##   P-value (Chi-square)                           0.643
## 
## Model Test Baseline Model:
## 
##   Test statistic                            173932.621
##   Degrees of freedom                                10
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    1.000
##   Tucker-Lewis Index (TLI)                       1.000
##                                                       
##   Robust Comparative Fit Index (CFI)             1.000
##   Robust Tucker-Lewis Index (TLI)                1.000
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)            -125589.166
##   Loglikelihood unrestricted model (H1)    -125587.482
##                                                       
##   Akaike (AIC)                              251208.332
##   Bayesian (BIC)                            251331.615
##   Sample-size adjusted Bayesian (SABIC)     251283.945
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.007
##   P-value H_0: RMSEA <= 0.050                    1.000
##   P-value H_0: RMSEA >= 0.080                    0.000
##                                                       
##   Robust RMSEA                                   0.000
##   90 Percent confidence interval - lower         0.000
##   90 Percent confidence interval - upper         0.007
##   P-value H_0: Robust RMSEA <= 0.050             1.000
##   P-value H_0: Robust RMSEA >= 0.080             0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   basari =~                                                             
##     ASRIBM01          1.000                               1.057    0.928
##     ASRIBM02          0.997    0.004  281.077    0.000    1.054    0.926
##     ASRIBM03          0.999    0.004  281.554    0.000    1.056    0.926
##     ASRIBM04          1.004    0.004  282.967    0.000    1.062    0.928
##     ASRIBM05          1.002    0.004  281.871    0.000    1.059    0.927
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASRIBM01          3.008    0.007  437.189    0.000    3.008    2.640
##    .ASRIBM02          2.997    0.007  436.152    0.000    2.997    2.634
##    .ASRIBM03          2.980    0.007  432.906    0.000    2.980    2.615
##    .ASRIBM04          2.986    0.007  432.074    0.000    2.986    2.610
##    .ASRIBM05          2.988    0.007  433.050    0.000    2.988    2.615
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASRIBM01          0.181    0.002   92.769    0.000    0.181    0.140
##    .ASRIBM02          0.185    0.002   93.404    0.000    0.185    0.143
##    .ASRIBM03          0.184    0.002   93.211    0.000    0.184    0.142
##    .ASRIBM04          0.183    0.002   92.718    0.000    0.183    0.139
##    .ASRIBM05          0.185    0.002   93.116    0.000    0.185    0.141
##     basari            1.117    0.011  101.124    0.000    1.000    1.000
## 
## R-Square:
##                    Estimate
##     ASRIBM01          0.860
##     ASRIBM02          0.857
##     ASRIBM03          0.858
##     ASRIBM04          0.861
##     ASRIBM05          0.859
cfa_ev <- cfa(model_ev, data = pirls, missing = "fiml")

summary(cfa_ev, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 59 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        54
## 
##                                                   Used       Total
##   Number of observations                         25022       57061
##   Number of missing patterns                       630            
## 
## Model Test User Model:
##                                                        
##   Test statistic                              28250.077
##   Degrees of freedom                                135
##   P-value (Chi-square)                            0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                            128696.512
##   Degrees of freedom                               153
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.781
##   Tucker-Lewis Index (TLI)                       0.752
##                                                       
##   Robust Comparative Fit Index (CFI)             0.781
##   Robust Tucker-Lewis Index (TLI)                0.752
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)            -381706.811
##   Loglikelihood unrestricted model (H1)    -367581.773
##                                                       
##   Akaike (AIC)                              763521.623
##   Bayesian (BIC)                            763960.508
##   Sample-size adjusted Bayesian (SABIC)     763788.898
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.091
##   90 Percent confidence interval - lower         0.090
##   90 Percent confidence interval - upper         0.092
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    1.000
##                                                       
##   Robust RMSEA                                   0.093
##   90 Percent confidence interval - lower         0.092
##   90 Percent confidence interval - upper         0.094
##   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.061
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   ev =~                                                                 
##     ASBH01A           1.000                               0.266    0.446
##     ASBH01B           1.167    0.021   56.429    0.000    0.311    0.514
##     ASBH01C           0.928    0.020   46.055    0.000    0.247    0.375
##     ASBH01D           1.607    0.027   60.315    0.000    0.428    0.609
##     ASBH01E           0.797    0.016   48.538    0.000    0.212    0.399
##     ASBH01F           1.279    0.022   57.926    0.000    0.340    0.537
##     ASBH01G           1.585    0.026   61.106    0.000    0.422    0.622
##     ASBH01H           1.470    0.025   59.649    0.000    0.391    0.582
##     ASBH01I           1.400    0.024   58.380    0.000    0.373    0.551
##     ASBH01J           1.567    0.027   58.694    0.000    0.417    0.580
##     ASBH01K           1.707    0.028   61.294    0.000    0.454    0.641
##     ASBH01L           1.318    0.022   61.154    0.000    0.351    0.612
##     ASBH01M           1.247    0.022   57.297    0.000    0.332    0.533
##     ASBH01N           1.010    0.020   49.727    0.000    0.269    0.418
##     ASBH01O           1.067    0.021   50.766    0.000    0.284    0.430
##     ASBH01P           1.521    0.025   60.617    0.000    0.405    0.616
##     ASBH01Q           1.412    0.023   60.176    0.000    0.376    0.603
##     ASBH01R           1.372    0.025   55.737    0.000    0.365    0.515
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBH01A           1.460    0.004  383.989    0.000    1.460    2.447
##    .ASBH01B           1.550    0.004  402.016    0.000    1.550    2.566
##    .ASBH01C           1.633    0.004  386.172    0.000    1.633    2.478
##    .ASBH01D           1.778    0.004  396.060    0.000    1.778    2.532
##    .ASBH01E           1.320    0.003  388.457    0.000    1.320    2.482
##    .ASBH01F           1.638    0.004  404.669    0.000    1.638    2.586
##    .ASBH01G           1.705    0.004  393.680    0.000    1.705    2.514
##    .ASBH01H           1.610    0.004  375.785    0.000    1.610    2.397
##    .ASBH01I           1.669    0.004  387.045    0.000    1.669    2.468
##    .ASBH01J           1.740    0.005  379.239    0.000    1.740    2.419
##    .ASBH01K           1.778    0.005  393.276    0.000    1.778    2.510
##    .ASBH01L           1.399    0.004  382.943    0.000    1.399    2.443
##    .ASBH01M           1.497    0.004  376.618    0.000    1.497    2.405
##    .ASBH01N           1.450    0.004  352.355    0.000    1.450    2.251
##    .ASBH01O           1.571    0.004  372.570    0.000    1.571    2.380
##    .ASBH01P           1.574    0.004  375.903    0.000    1.574    2.396
##    .ASBH01Q           1.545    0.004  388.419    0.000    1.545    2.477
##    .ASBH01R           2.045    0.005  451.193    0.000    2.045    2.883
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBH01A           0.285    0.003  106.896    0.000    0.285    0.801
##    .ASBH01B           0.268    0.003  105.074    0.000    0.268    0.736
##    .ASBH01C           0.373    0.003  107.555    0.000    0.373    0.860
##    .ASBH01D           0.310    0.003  101.144    0.000    0.310    0.629
##    .ASBH01E           0.238    0.002  107.583    0.000    0.238    0.841
##    .ASBH01F           0.286    0.003  104.282    0.000    0.286    0.711
##    .ASBH01G           0.282    0.003  100.974    0.000    0.282    0.613
##    .ASBH01H           0.298    0.003  102.167    0.000    0.298    0.661
##    .ASBH01I           0.319    0.003  104.016    0.000    0.319    0.696
##    .ASBH01J           0.344    0.003  102.807    0.000    0.344    0.664
##    .ASBH01K           0.295    0.003   99.458    0.000    0.295    0.589
##    .ASBH01L           0.205    0.002  101.643    0.000    0.205    0.625
##    .ASBH01M           0.277    0.003  104.214    0.000    0.277    0.715
##    .ASBH01N           0.343    0.003  107.113    0.000    0.343    0.826
##    .ASBH01O           0.355    0.003  107.025    0.000    0.355    0.815
##    .ASBH01P           0.268    0.003  100.479    0.000    0.268    0.621
##    .ASBH01Q           0.248    0.002  101.954    0.000    0.248    0.637
##    .ASBH01R           0.370    0.004  105.154    0.000    0.370    0.735
##     ev                0.071    0.002   34.601    0.000    1.000    1.000
## 
## R-Square:
##                    Estimate
##     ASBH01A           0.199
##     ASBH01B           0.264
##     ASBH01C           0.140
##     ASBH01D           0.371
##     ASBH01E           0.159
##     ASBH01F           0.289
##     ASBH01G           0.387
##     ASBH01H           0.339
##     ASBH01I           0.304
##     ASBH01J           0.336
##     ASBH01K           0.411
##     ASBH01L           0.375
##     ASBH01M           0.285
##     ASBH01N           0.174
##     ASBH01O           0.185
##     ASBH01P           0.379
##     ASBH01Q           0.363
##     ASBH01R           0.265
cfa_oz <- cfa(model_oz, data = pirls, missing = "fiml")

summary(cfa_oz, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 55 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        18
## 
##                                                   Used       Total
##   Number of observations                         27045       57061
##   Number of missing patterns                        56            
## 
## Model Test User Model:
##                                                       
##   Test statistic                              7194.962
##   Degrees of freedom                                 9
##   P-value (Chi-square)                           0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                             38221.567
##   Degrees of freedom                                15
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.812
##   Tucker-Lewis Index (TLI)                       0.687
##                                                       
##   Robust Comparative Fit Index (CFI)             0.812
##   Robust Tucker-Lewis Index (TLI)                0.687
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)            -195779.095
##   Loglikelihood unrestricted model (H1)    -192181.614
##                                                       
##   Akaike (AIC)                              391594.190
##   Bayesian (BIC)                            391741.885
##   Sample-size adjusted Bayesian (SABIC)     391684.681
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.172
##   90 Percent confidence interval - lower         0.168
##   90 Percent confidence interval - upper         0.175
##   P-value H_0: RMSEA <= 0.050                    0.000
##   P-value H_0: RMSEA >= 0.080                    1.000
##                                                       
##   Robust RMSEA                                   0.175
##   90 Percent confidence interval - lower         0.171
##   90 Percent confidence interval - upper         0.178
##   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.083
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Observed
##   Observed information based on                Hessian
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   oz =~                                                                 
##     ASBR08A           1.000                               0.189    0.290
##     ASBR08B           1.239    0.034   36.726    0.000    0.235    0.360
##     ASBR08C          -2.767    0.073  -37.693    0.000   -0.524   -0.468
##     ASBR08D          -4.415    0.106  -41.671    0.000   -0.836   -0.781
##     ASBR08E          -4.240    0.102  -41.614    0.000   -0.803   -0.782
##     ASBR08F          -3.613    0.088  -40.851    0.000   -0.684   -0.623
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR08A           1.381    0.004  347.245    0.000    1.381    2.118
##    .ASBR08B           1.375    0.004  344.719    0.000    1.375    2.111
##    .ASBR08C           2.501    0.007  364.574    0.000    2.501    2.234
##    .ASBR08D           3.140    0.007  478.725    0.000    3.140    2.933
##    .ASBR08E           3.289    0.006  523.150    0.000    3.289    3.203
##    .ASBR08F           3.225    0.007  478.356    0.000    3.225    2.936
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR08A           0.389    0.003  112.864    0.000    0.389    0.916
##    .ASBR08B           0.369    0.003  110.627    0.000    0.369    0.870
##    .ASBR08C           0.979    0.009  107.348    0.000    0.979    0.781
##    .ASBR08D           0.448    0.006   68.864    0.000    0.448    0.390
##    .ASBR08E           0.409    0.006   68.895    0.000    0.409    0.388
##    .ASBR08F           0.739    0.008   96.717    0.000    0.739    0.612
##     oz                0.036    0.002   21.461    0.000    1.000    1.000
## 
## R-Square:
##                    Estimate
##     ASBR08A           0.084
##     ASBR08B           0.130
##     ASBR08C           0.219
##     ASBR08D           0.610
##     ASBR08E           0.612
##     ASBR08F           0.388
fit_table <- bind_rows(glance(cfa_tutum)  %>% mutate(Scale = "Reading Attitude"),
                       glance(cfa_ilgi)   %>% mutate(Scale = "Reading Interest"),
                       glance(cfa_basari) %>% mutate(Scale = "Reading Achievement"),
                       glance(cfa_ev)     %>% mutate(Scale = "Home Literacy Environment"),
                       glance(cfa_oz)     %>% mutate(Scale = "Reading Self-Concept")
)

view(fit_table)
Variables AGFI AIC BIC CFI chisq RMSEA rmsea.conf.high SRMR TLI
Reading Attitude 0.9902840 500040.9 500237.9 0.9623796 3372.543739 0.07859435 0.080841864 0.029507049 0.9473314
Reading Interest 0.9594887 499846.7 500068.4 0.9032821 6446.598930 0.09345018 0.095377832 0.045161181 0.8710428
Reading Achievement 0.9999522 251208.3 251331.6 1.0000000 3.369365 0.00000000 0.006809242 0.000350572 1.0000188
Home Literacy Environment 0.9386178 763521.6 763960.5 0.7812797 28250.077218 0.09123086 0.092128486 0.061405420 0.7521170
Reading Self-Concept 0.9812449 391594.2 391741.9 0.8119181 7194.962061 0.17182158 0.175168426 0.083498308 0.6865302
Figure 2. The mediation model with the names of paths.
Figure 2. The mediation model with the names of paths.

D: Direct, M: Mediation, I: Indirect

Multiple Correlation Coefficient and Coefficient of Determination

model1 <- lm(basari_puan ~ tutum_puan,data=olcekler)

sqrt(glance(model1)[,1])
## # A tibble: 1 × 1
##   r.squared
##       <dbl>
## 1     0.177
model2 <- lm(basari_puan ~ ilgi_puan,data=olcekler)

sqrt(glance(model2)[,1])
## # A tibble: 1 × 1
##   r.squared
##       <dbl>
## 1  0.000873
model <- lm(basari_puan ~tutum_puan + ilgi_puan ,data=olcekler)

glance(model)[,1]
## # A tibble: 1 × 1
##   r.squared
##       <dbl>
## 1    0.0435
model <- 'basari_puan ~ tutum_puan + ilgi_puan'

fit1 <- sem(model, data = olcekler)

labels <- list(
  tutum_puan = "Reading Attitude",
  ilgi_puan = "Reading Interest",
  basari_puan = "Reading Achievement")

lavaanPlot(model = fit1, 
           coefs = TRUE, 
           stand = TRUE, 
           sig = 0.05,
           labels = labels,
           graph_options = list(rankdir = "LR"))
tekdegisken_tutum <- lm(basari_puan ~ tutum_puan, data = olcekler)


glance(tekdegisken_tutum)
## # A tibble: 1 × 12
##   r.squared adj.r.squared sigma statistic p.value    df  logLik     AIC     BIC
##       <dbl>         <dbl> <dbl>     <dbl>   <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1    0.0314        0.0314 0.733     1849.       0     1 -63241. 126488. 126515.
## # ℹ 3 more variables: deviance <dbl>, df.residual <int>, nobs <int>
tekdegisken_ilgi <- lm(basari_puan ~ ilgi_puan, data = olcekler)


glance(tekdegisken_ilgi)
## # A tibble: 1 × 12
##     r.squared adj.r.squared sigma statistic p.value    df  logLik     AIC    BIC
##         <dbl>         <dbl> <dbl>     <dbl>   <dbl> <dbl>   <dbl>   <dbl>  <dbl>
## 1 0.000000762    -0.0000168 0.745    0.0435   0.835     1 -64151. 128308. 1.28e5
## # ℹ 3 more variables: deviance <dbl>, df.residual <int>, nobs <int>
pirls$ReadingAttitude <- rowMeans(pirls[, tutum], na.rm = TRUE)
pirls$ReadingInterest <- rowMeans(pirls[, ilgi], na.rm = TRUE)
pirls$ReadingAchievement <- rowMeans(pirls[, basari], na.rm = TRUE)
pirls$HomeLiteracyEnvironment <- rowMeans(pirls[, ev], na.rm = TRUE)
pirls$ReadingSelfConcept <- rowMeans(pirls[, oz], na.rm = TRUE)

#ortalama ile de denemeye kalktım da ondan sütun ekledim nolur nolmaz sonra kullanırım diye 


tumdegisken <- lm(basari_puan ~ tutum_puan + ilgi_puan, data = olcekler)
glance(tumdegisken)
## # A tibble: 1 × 12
##   r.squared adj.r.squared sigma statistic p.value    df  logLik     AIC     BIC
##       <dbl>         <dbl> <dbl>     <dbl>   <dbl> <dbl>   <dbl>   <dbl>   <dbl>
## 1    0.0435        0.0434 0.728     1296.       0     2 -62883. 125775. 125810.
## # ℹ 3 more variables: deviance <dbl>, df.residual <int>, nobs <int>
tidy(anova(tumdegisken,tekdegisken_tutum, tekdegisken_ilgi))
## # A tibble: 3 × 7
##   term                       df.residual    rss    df sumsq statistic    p.value
##   <chr>                            <dbl>  <dbl> <dbl> <dbl>     <dbl>      <dbl>
## 1 basari_puan ~ tutum_puan …       57058 30275.    NA   NA        NA  NA        
## 2 basari_puan ~ tutum_puan         57059 30657.    -1 -382.      720.  1.36e-157
## 3 basari_puan ~ ilgi_puan          57059 31650.     0 -993.       NA  NA
full_sem_model <- '

  Attitude =~ ASBR07A + ASBR07B + ASBR07C + ASBR07D + 
              ASBR07E + ASBR07F + ASBR07G + ASBR07H
  
  Interest =~ ASBR01A + ASBR01B + ASBR01C + ASBR01D + ASBR01E + 
              ASBR01F + ASBR01G + ASBR01H + ASBR01I
  
  Achievement =~ ASRIBM01 + ASRIBM02 + ASRIBM03 + ASRIBM04 + ASRIBM05
  
  HomeEnv =~ ASBH01A + ASBH01B + ASBH01C + ASBH01D + ASBH01E + 
             ASBH01F + ASBH01G + ASBH01H + ASBH01I + ASBH01J + 
             ASBH01K + ASBH01L + ASBH01M + ASBH01N + ASBH01O + 
             ASBH01P + ASBH01Q + ASBH01R
  
  SelfConcept =~ ASBR08A + ASBR08B + ASBR08C + 
                 ASBR08D + ASBR08E + ASBR08F
  
  

  HomeEnv ~ M1*Attitude + M3*Interest
  SelfConcept ~ M2*Attitude + M4*Interest
  
  Achievement ~ I1*HomeEnv + I2*SelfConcept + D1*Attitude + D2*Interest
  
  

  indirect_att_home := M1 * I1
  indirect_att_self := M2 * I2
  total_indirect_att := (M1 * I1) + (M2 * I2)
  
  indirect_int_home := M3 * I1
  indirect_int_self := M4 * I2
  total_indirect_int := (M3 * I1) + (M4 * I2)
  
  total_attitude := D1 + total_indirect_att
  total_interest := D2 + total_indirect_int
'


for(var in tutum) {
  pirls[[var]] <- ifelse(is.na(pirls[[var]]), 
                         mean(pirls[[var]], na.rm = TRUE), 
                         pirls[[var]])
}

for(var in ilgi) {
  pirls[[var]] <- ifelse(is.na(pirls[[var]]), 
                         mean(pirls[[var]], na.rm = TRUE), 
                         pirls[[var]])
}

for(var in basari) {
  pirls[[var]] <- ifelse(is.na(pirls[[var]]), 
                         mean(pirls[[var]], na.rm = TRUE), 
                         pirls[[var]])
}

for(var in ev) {
  pirls[[var]] <- ifelse(is.na(pirls[[var]]), 
                         mean(pirls[[var]], na.rm = TRUE), 
                         pirls[[var]])
}

for(var in oz) {
  pirls[[var]] <- ifelse(is.na(pirls[[var]]), 
                         mean(pirls[[var]], na.rm = TRUE), 
                         pirls[[var]])
}

fit_full <- sem(full_sem_model, data = pirls, std.lv = TRUE)

summary(fit_full, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 90 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       101
## 
##   Number of observations                         57061
## 
## Model Test User Model:
##                                                         
##   Test statistic                              140145.371
##   Degrees of freedom                                 980
##   P-value (Chi-square)                             0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                           1140883.240
##   Degrees of freedom                              1035
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.878
##   Tucker-Lewis Index (TLI)                       0.871
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)           -1589202.294
##   Loglikelihood unrestricted model (H1)   -1519129.609
##                                                       
##   Akaike (AIC)                             3178606.588
##   Bayesian (BIC)                           3179510.728
##   Sample-size adjusted Bayesian (SABIC)    3179189.748
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.050
##   90 Percent confidence interval - lower         0.050
##   90 Percent confidence interval - upper         0.050
##   P-value H_0: RMSEA <= 0.050                    0.801
##   P-value H_0: RMSEA >= 0.080                    0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.056
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   Attitude =~                                                           
##     ASBR07A           0.419    0.003  149.086    0.000    0.419    0.594
##     ASBR07B           0.491    0.002  200.203    0.000    0.491    0.745
##     ASBR07C          -0.376    0.003 -122.996    0.000   -0.376   -0.506
##     ASBR07D           0.524    0.003  187.918    0.000    0.524    0.711
##     ASBR07E           0.513    0.002  223.778    0.000    0.513    0.804
##     ASBR07F           0.421    0.002  199.276    0.000    0.421    0.742
##     ASBR07G           0.433    0.002  185.290    0.000    0.433    0.704
##     ASBR07H           0.389    0.002  172.297    0.000    0.389    0.666
##   Interest =~                                                           
##     ASBR01A           0.347    0.002  164.921    0.000    0.347    0.658
##     ASBR01B           0.387    0.002  158.358    0.000    0.387    0.637
##     ASBR01C           0.269    0.003  102.508    0.000    0.269    0.440
##     ASBR01D           0.303    0.002  143.515    0.000    0.303    0.588
##     ASBR01E           0.359    0.002  176.534    0.000    0.359    0.693
##     ASBR01F           0.349    0.002  148.514    0.000    0.349    0.605
##     ASBR01G           0.296    0.002  144.689    0.000    0.296    0.592
##     ASBR01H           0.247    0.002  129.388    0.000    0.247    0.540
##     ASBR01I           0.267    0.002  136.202    0.000    0.267    0.563
##   Achievement =~                                                        
##     ASRIBM01          0.628    0.002  268.139    0.000    0.732    0.927
##     ASRIBM02          0.626    0.002  267.423    0.000    0.730    0.926
##     ASRIBM03          0.627    0.002  267.597    0.000    0.732    0.926
##     ASRIBM04          0.630    0.002  268.212    0.000    0.736    0.928
##     ASRIBM05          0.629    0.002  267.769    0.000    0.734    0.927
##   HomeEnv =~                                                            
##     ASBH01A           0.174    0.002  105.193    0.000    0.174    0.443
##     ASBH01B           0.202    0.002  123.429    0.000    0.202    0.510
##     ASBH01C           0.160    0.002   86.698    0.000    0.160    0.372
##     ASBH01D           0.277    0.002  151.389    0.000    0.277    0.605
##     ASBH01E           0.138    0.001   92.975    0.000    0.138    0.396
##     ASBH01F           0.221    0.002  130.239    0.000    0.221    0.534
##     ASBH01G           0.274    0.002  155.343    0.000    0.274    0.618
##     ASBH01H           0.255    0.002  143.658    0.000    0.255    0.580
##     ASBH01I           0.243    0.002  134.396    0.000    0.243    0.548
##     ASBH01J           0.272    0.002  143.004    0.000    0.272    0.578
##     ASBH01K           0.295    0.002  161.889    0.000    0.295    0.638
##     ASBH01L           0.228    0.001  152.771    0.000    0.228    0.609
##     ASBH01M           0.216    0.002  129.335    0.000    0.216    0.531
##     ASBH01N           0.175    0.002   97.912    0.000    0.175    0.415
##     ASBH01O           0.185    0.002  101.226    0.000    0.185    0.428
##     ASBH01P           0.264    0.002  153.906    0.000    0.264    0.613
##     ASBH01Q           0.245    0.002  149.927    0.000    0.245    0.600
##     ASBH01R           0.237    0.002  123.794    0.000    0.237    0.511
##   SelfConcept =~                                                        
##     ASBR08A           0.137    0.002   69.298    0.000    0.140    0.313
##     ASBR08B           0.167    0.002   85.900    0.000    0.171    0.384
##     ASBR08C          -0.339    0.003 -103.196    0.000   -0.347   -0.454
##     ASBR08D          -0.542    0.003 -189.840    0.000   -0.554   -0.760
##     ASBR08E          -0.526    0.003 -192.324    0.000   -0.537   -0.768
##     ASBR08F          -0.461    0.003 -151.244    0.000   -0.471   -0.631
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   HomeEnv ~                                                             
##     Attitude  (M1)    0.000    0.007    0.000    1.000    0.000    0.000
##     Interest  (M3)   -0.000    0.007   -0.000    1.000   -0.000   -0.000
##   SelfConcept ~                                                         
##     Attitude  (M2)    0.160    0.007   21.656    0.000    0.156    0.156
##     Interest  (M4)    0.063    0.008    8.378    0.000    0.062    0.062
##   Achievement ~                                                         
##     HomeEnv   (I1)    0.000    0.005    0.000    1.000    0.000    0.000
##     SelfCncpt (I2)   -0.581    0.006  -99.628    0.000   -0.509   -0.509
##     Attitude  (D1)    0.297    0.007   40.947    0.000    0.254    0.254
##     Interest  (D2)   -0.066    0.007   -9.208    0.000   -0.057   -0.057
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   Attitude ~~                                                           
##     Interest          0.659    0.003  214.643    0.000    0.659    0.659
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR07A           0.321    0.002  158.191    0.000    0.321    0.647
##    .ASBR07B           0.194    0.001  144.332    0.000    0.194    0.446
##    .ASBR07C           0.411    0.003  162.181    0.000    0.411    0.744
##    .ASBR07D           0.268    0.002  148.726    0.000    0.268    0.494
##    .ASBR07E           0.144    0.001  132.686    0.000    0.144    0.353
##    .ASBR07F           0.144    0.001  144.696    0.000    0.144    0.449
##    .ASBR07G           0.191    0.001  149.556    0.000    0.191    0.505
##    .ASBR07H           0.189    0.001  153.197    0.000    0.189    0.556
##    .ASBR01A           0.158    0.001  146.418    0.000    0.158    0.568
##    .ASBR01B           0.220    0.001  148.770    0.000    0.220    0.594
##    .ASBR01C           0.302    0.002  161.849    0.000    0.302    0.806
##    .ASBR01D           0.173    0.001  153.312    0.000    0.173    0.654
##    .ASBR01E           0.139    0.001  141.621    0.000    0.139    0.520
##    .ASBR01F           0.211    0.001  151.891    0.000    0.211    0.634
##    .ASBR01G           0.162    0.001  152.988    0.000    0.162    0.649
##    .ASBR01H           0.149    0.001  156.821    0.000    0.149    0.709
##    .ASBR01I           0.153    0.001  155.216    0.000    0.153    0.683
##    .ASRIBM01          0.087    0.001  134.175    0.000    0.087    0.140
##    .ASRIBM02          0.089    0.001  135.056    0.000    0.089    0.143
##    .ASRIBM03          0.089    0.001  134.845    0.000    0.089    0.142
##    .ASRIBM04          0.088    0.001  134.082    0.000    0.088    0.139
##    .ASRIBM05          0.089    0.001  134.635    0.000    0.089    0.141
##    .ASBH01A           0.123    0.001  163.467    0.000    0.123    0.804
##    .ASBH01B           0.116    0.001  161.075    0.000    0.116    0.740
##    .ASBH01C           0.159    0.001  165.345    0.000    0.159    0.862
##    .ASBH01D           0.133    0.001  156.039    0.000    0.133    0.634
##    .ASBH01E           0.102    0.001  164.763    0.000    0.102    0.843
##    .ASBH01F           0.123    0.001  160.019    0.000    0.123    0.715
##    .ASBH01G           0.121    0.001  155.157    0.000    0.121    0.619
##    .ASBH01H           0.129    0.001  157.628    0.000    0.129    0.664
##    .ASBH01I           0.137    0.001  159.324    0.000    0.137    0.699
##    .ASBH01J           0.148    0.001  157.755    0.000    0.148    0.666
##    .ASBH01K           0.127    0.001  153.585    0.000    0.127    0.593
##    .ASBH01L           0.088    0.001  155.736    0.000    0.088    0.629
##    .ASBH01M           0.119    0.001  160.165    0.000    0.119    0.718
##    .ASBH01N           0.147    0.001  164.266    0.000    0.147    0.827
##    .ASBH01O           0.152    0.001  163.913    0.000    0.152    0.817
##    .ASBH01P           0.116    0.001  155.483    0.000    0.116    0.624
##    .ASBH01Q           0.107    0.001  156.352    0.000    0.107    0.640
##    .ASBH01R           0.159    0.001  161.021    0.000    0.159    0.738
##    .ASBR08A           0.180    0.001  164.681    0.000    0.180    0.902
##    .ASBR08B           0.169    0.001  162.196    0.000    0.169    0.853
##    .ASBR08C           0.464    0.003  158.787    0.000    0.464    0.794
##    .ASBR08D           0.224    0.002  112.896    0.000    0.224    0.423
##    .ASBR08E           0.201    0.002  110.121    0.000    0.201    0.410
##    .ASBR08F           0.336    0.002  142.556    0.000    0.336    0.602
##     Attitude          1.000                               1.000    1.000
##     Interest          1.000                               1.000    1.000
##    .Achievement       1.000                               0.734    0.734
##    .HomeEnv           1.000                               1.000    1.000
##    .SelfConcept       1.000                               0.959    0.959
## 
## R-Square:
##                    Estimate
##     ASBR07A           0.353
##     ASBR07B           0.554
##     ASBR07C           0.256
##     ASBR07D           0.506
##     ASBR07E           0.647
##     ASBR07F           0.551
##     ASBR07G           0.495
##     ASBR07H           0.444
##     ASBR01A           0.432
##     ASBR01B           0.406
##     ASBR01C           0.194
##     ASBR01D           0.346
##     ASBR01E           0.480
##     ASBR01F           0.366
##     ASBR01G           0.351
##     ASBR01H           0.291
##     ASBR01I           0.317
##     ASRIBM01          0.860
##     ASRIBM02          0.857
##     ASRIBM03          0.858
##     ASRIBM04          0.861
##     ASRIBM05          0.859
##     ASBH01A           0.196
##     ASBH01B           0.260
##     ASBH01C           0.138
##     ASBH01D           0.366
##     ASBH01E           0.157
##     ASBH01F           0.285
##     ASBH01G           0.381
##     ASBH01H           0.336
##     ASBH01I           0.301
##     ASBH01J           0.334
##     ASBH01K           0.407
##     ASBH01L           0.371
##     ASBH01M           0.282
##     ASBH01N           0.173
##     ASBH01O           0.183
##     ASBH01P           0.376
##     ASBH01Q           0.360
##     ASBH01R           0.262
##     ASBR08A           0.098
##     ASBR08B           0.147
##     ASBR08C           0.206
##     ASBR08D           0.577
##     ASBR08E           0.590
##     ASBR08F           0.398
##     Achievement       0.266
##     HomeEnv           0.000
##     SelfConcept       0.041
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     indirect_tt_hm    0.000                               0.000    0.000
##     indirct_tt_slf   -0.093    0.004  -21.059    0.000   -0.080   -0.080
##     total_ndrct_tt   -0.093    0.004  -21.059    0.000   -0.080   -0.080
##     indirect_nt_hm   -0.000                              -0.000   -0.000
##     indirct_nt_slf   -0.037    0.004   -8.378    0.000   -0.031   -0.031
##     total_ndrct_nt   -0.037    0.004   -8.378    0.000   -0.031   -0.031
##     total_attitude    0.204    0.008   26.186    0.000    0.174    0.174
##     total_interest   -0.103    0.008  -12.983    0.000   -0.088   -0.088
fit_full <- sem(full_sem_model, data = pirls, std.lv = TRUE)

summary(fit_full, fit.measures = TRUE, standardized = TRUE, rsquare = TRUE)
## lavaan 0.6-20 ended normally after 90 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                       101
## 
##   Number of observations                         57061
## 
## Model Test User Model:
##                                                         
##   Test statistic                              140145.371
##   Degrees of freedom                                 980
##   P-value (Chi-square)                             0.000
## 
## Model Test Baseline Model:
## 
##   Test statistic                           1140883.240
##   Degrees of freedom                              1035
##   P-value                                        0.000
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.878
##   Tucker-Lewis Index (TLI)                       0.871
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)           -1589202.294
##   Loglikelihood unrestricted model (H1)   -1519129.609
##                                                       
##   Akaike (AIC)                             3178606.588
##   Bayesian (BIC)                           3179510.728
##   Sample-size adjusted Bayesian (SABIC)    3179189.748
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.050
##   90 Percent confidence interval - lower         0.050
##   90 Percent confidence interval - upper         0.050
##   P-value H_0: RMSEA <= 0.050                    0.801
##   P-value H_0: RMSEA >= 0.080                    0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.056
## 
## Parameter Estimates:
## 
##   Standard errors                             Standard
##   Information                                 Expected
##   Information saturated (h1) model          Structured
## 
## Latent Variables:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   Attitude =~                                                           
##     ASBR07A           0.419    0.003  149.086    0.000    0.419    0.594
##     ASBR07B           0.491    0.002  200.203    0.000    0.491    0.745
##     ASBR07C          -0.376    0.003 -122.996    0.000   -0.376   -0.506
##     ASBR07D           0.524    0.003  187.918    0.000    0.524    0.711
##     ASBR07E           0.513    0.002  223.778    0.000    0.513    0.804
##     ASBR07F           0.421    0.002  199.276    0.000    0.421    0.742
##     ASBR07G           0.433    0.002  185.290    0.000    0.433    0.704
##     ASBR07H           0.389    0.002  172.297    0.000    0.389    0.666
##   Interest =~                                                           
##     ASBR01A           0.347    0.002  164.921    0.000    0.347    0.658
##     ASBR01B           0.387    0.002  158.358    0.000    0.387    0.637
##     ASBR01C           0.269    0.003  102.508    0.000    0.269    0.440
##     ASBR01D           0.303    0.002  143.515    0.000    0.303    0.588
##     ASBR01E           0.359    0.002  176.534    0.000    0.359    0.693
##     ASBR01F           0.349    0.002  148.514    0.000    0.349    0.605
##     ASBR01G           0.296    0.002  144.689    0.000    0.296    0.592
##     ASBR01H           0.247    0.002  129.388    0.000    0.247    0.540
##     ASBR01I           0.267    0.002  136.202    0.000    0.267    0.563
##   Achievement =~                                                        
##     ASRIBM01          0.628    0.002  268.139    0.000    0.732    0.927
##     ASRIBM02          0.626    0.002  267.423    0.000    0.730    0.926
##     ASRIBM03          0.627    0.002  267.597    0.000    0.732    0.926
##     ASRIBM04          0.630    0.002  268.212    0.000    0.736    0.928
##     ASRIBM05          0.629    0.002  267.769    0.000    0.734    0.927
##   HomeEnv =~                                                            
##     ASBH01A           0.174    0.002  105.193    0.000    0.174    0.443
##     ASBH01B           0.202    0.002  123.429    0.000    0.202    0.510
##     ASBH01C           0.160    0.002   86.698    0.000    0.160    0.372
##     ASBH01D           0.277    0.002  151.389    0.000    0.277    0.605
##     ASBH01E           0.138    0.001   92.975    0.000    0.138    0.396
##     ASBH01F           0.221    0.002  130.239    0.000    0.221    0.534
##     ASBH01G           0.274    0.002  155.343    0.000    0.274    0.618
##     ASBH01H           0.255    0.002  143.658    0.000    0.255    0.580
##     ASBH01I           0.243    0.002  134.396    0.000    0.243    0.548
##     ASBH01J           0.272    0.002  143.004    0.000    0.272    0.578
##     ASBH01K           0.295    0.002  161.889    0.000    0.295    0.638
##     ASBH01L           0.228    0.001  152.771    0.000    0.228    0.609
##     ASBH01M           0.216    0.002  129.335    0.000    0.216    0.531
##     ASBH01N           0.175    0.002   97.912    0.000    0.175    0.415
##     ASBH01O           0.185    0.002  101.226    0.000    0.185    0.428
##     ASBH01P           0.264    0.002  153.906    0.000    0.264    0.613
##     ASBH01Q           0.245    0.002  149.927    0.000    0.245    0.600
##     ASBH01R           0.237    0.002  123.794    0.000    0.237    0.511
##   SelfConcept =~                                                        
##     ASBR08A           0.137    0.002   69.298    0.000    0.140    0.313
##     ASBR08B           0.167    0.002   85.900    0.000    0.171    0.384
##     ASBR08C          -0.339    0.003 -103.196    0.000   -0.347   -0.454
##     ASBR08D          -0.542    0.003 -189.840    0.000   -0.554   -0.760
##     ASBR08E          -0.526    0.003 -192.324    0.000   -0.537   -0.768
##     ASBR08F          -0.461    0.003 -151.244    0.000   -0.471   -0.631
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   HomeEnv ~                                                             
##     Attitude  (M1)    0.000    0.007    0.000    1.000    0.000    0.000
##     Interest  (M3)   -0.000    0.007   -0.000    1.000   -0.000   -0.000
##   SelfConcept ~                                                         
##     Attitude  (M2)    0.160    0.007   21.656    0.000    0.156    0.156
##     Interest  (M4)    0.063    0.008    8.378    0.000    0.062    0.062
##   Achievement ~                                                         
##     HomeEnv   (I1)    0.000    0.005    0.000    1.000    0.000    0.000
##     SelfCncpt (I2)   -0.581    0.006  -99.628    0.000   -0.509   -0.509
##     Attitude  (D1)    0.297    0.007   40.947    0.000    0.254    0.254
##     Interest  (D2)   -0.066    0.007   -9.208    0.000   -0.057   -0.057
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   Attitude ~~                                                           
##     Interest          0.659    0.003  214.643    0.000    0.659    0.659
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .ASBR07A           0.321    0.002  158.191    0.000    0.321    0.647
##    .ASBR07B           0.194    0.001  144.332    0.000    0.194    0.446
##    .ASBR07C           0.411    0.003  162.181    0.000    0.411    0.744
##    .ASBR07D           0.268    0.002  148.726    0.000    0.268    0.494
##    .ASBR07E           0.144    0.001  132.686    0.000    0.144    0.353
##    .ASBR07F           0.144    0.001  144.696    0.000    0.144    0.449
##    .ASBR07G           0.191    0.001  149.556    0.000    0.191    0.505
##    .ASBR07H           0.189    0.001  153.197    0.000    0.189    0.556
##    .ASBR01A           0.158    0.001  146.418    0.000    0.158    0.568
##    .ASBR01B           0.220    0.001  148.770    0.000    0.220    0.594
##    .ASBR01C           0.302    0.002  161.849    0.000    0.302    0.806
##    .ASBR01D           0.173    0.001  153.312    0.000    0.173    0.654
##    .ASBR01E           0.139    0.001  141.621    0.000    0.139    0.520
##    .ASBR01F           0.211    0.001  151.891    0.000    0.211    0.634
##    .ASBR01G           0.162    0.001  152.988    0.000    0.162    0.649
##    .ASBR01H           0.149    0.001  156.821    0.000    0.149    0.709
##    .ASBR01I           0.153    0.001  155.216    0.000    0.153    0.683
##    .ASRIBM01          0.087    0.001  134.175    0.000    0.087    0.140
##    .ASRIBM02          0.089    0.001  135.056    0.000    0.089    0.143
##    .ASRIBM03          0.089    0.001  134.845    0.000    0.089    0.142
##    .ASRIBM04          0.088    0.001  134.082    0.000    0.088    0.139
##    .ASRIBM05          0.089    0.001  134.635    0.000    0.089    0.141
##    .ASBH01A           0.123    0.001  163.467    0.000    0.123    0.804
##    .ASBH01B           0.116    0.001  161.075    0.000    0.116    0.740
##    .ASBH01C           0.159    0.001  165.345    0.000    0.159    0.862
##    .ASBH01D           0.133    0.001  156.039    0.000    0.133    0.634
##    .ASBH01E           0.102    0.001  164.763    0.000    0.102    0.843
##    .ASBH01F           0.123    0.001  160.019    0.000    0.123    0.715
##    .ASBH01G           0.121    0.001  155.157    0.000    0.121    0.619
##    .ASBH01H           0.129    0.001  157.628    0.000    0.129    0.664
##    .ASBH01I           0.137    0.001  159.324    0.000    0.137    0.699
##    .ASBH01J           0.148    0.001  157.755    0.000    0.148    0.666
##    .ASBH01K           0.127    0.001  153.585    0.000    0.127    0.593
##    .ASBH01L           0.088    0.001  155.736    0.000    0.088    0.629
##    .ASBH01M           0.119    0.001  160.165    0.000    0.119    0.718
##    .ASBH01N           0.147    0.001  164.266    0.000    0.147    0.827
##    .ASBH01O           0.152    0.001  163.913    0.000    0.152    0.817
##    .ASBH01P           0.116    0.001  155.483    0.000    0.116    0.624
##    .ASBH01Q           0.107    0.001  156.352    0.000    0.107    0.640
##    .ASBH01R           0.159    0.001  161.021    0.000    0.159    0.738
##    .ASBR08A           0.180    0.001  164.681    0.000    0.180    0.902
##    .ASBR08B           0.169    0.001  162.196    0.000    0.169    0.853
##    .ASBR08C           0.464    0.003  158.787    0.000    0.464    0.794
##    .ASBR08D           0.224    0.002  112.896    0.000    0.224    0.423
##    .ASBR08E           0.201    0.002  110.121    0.000    0.201    0.410
##    .ASBR08F           0.336    0.002  142.556    0.000    0.336    0.602
##     Attitude          1.000                               1.000    1.000
##     Interest          1.000                               1.000    1.000
##    .Achievement       1.000                               0.734    0.734
##    .HomeEnv           1.000                               1.000    1.000
##    .SelfConcept       1.000                               0.959    0.959
## 
## R-Square:
##                    Estimate
##     ASBR07A           0.353
##     ASBR07B           0.554
##     ASBR07C           0.256
##     ASBR07D           0.506
##     ASBR07E           0.647
##     ASBR07F           0.551
##     ASBR07G           0.495
##     ASBR07H           0.444
##     ASBR01A           0.432
##     ASBR01B           0.406
##     ASBR01C           0.194
##     ASBR01D           0.346
##     ASBR01E           0.480
##     ASBR01F           0.366
##     ASBR01G           0.351
##     ASBR01H           0.291
##     ASBR01I           0.317
##     ASRIBM01          0.860
##     ASRIBM02          0.857
##     ASRIBM03          0.858
##     ASRIBM04          0.861
##     ASRIBM05          0.859
##     ASBH01A           0.196
##     ASBH01B           0.260
##     ASBH01C           0.138
##     ASBH01D           0.366
##     ASBH01E           0.157
##     ASBH01F           0.285
##     ASBH01G           0.381
##     ASBH01H           0.336
##     ASBH01I           0.301
##     ASBH01J           0.334
##     ASBH01K           0.407
##     ASBH01L           0.371
##     ASBH01M           0.282
##     ASBH01N           0.173
##     ASBH01O           0.183
##     ASBH01P           0.376
##     ASBH01Q           0.360
##     ASBH01R           0.262
##     ASBR08A           0.098
##     ASBR08B           0.147
##     ASBR08C           0.206
##     ASBR08D           0.577
##     ASBR08E           0.590
##     ASBR08F           0.398
##     Achievement       0.266
##     HomeEnv           0.000
##     SelfConcept       0.041
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     indirect_tt_hm    0.000                               0.000    0.000
##     indirct_tt_slf   -0.093    0.004  -21.059    0.000   -0.080   -0.080
##     total_ndrct_tt   -0.093    0.004  -21.059    0.000   -0.080   -0.080
##     indirect_nt_hm   -0.000                              -0.000   -0.000
##     indirct_nt_slf   -0.037    0.004   -8.378    0.000   -0.031   -0.031
##     total_ndrct_nt   -0.037    0.004   -8.378    0.000   -0.031   -0.031
##     total_attitude    0.204    0.008   26.186    0.000    0.174    0.174
##     total_interest   -0.103    0.008  -12.983    0.000   -0.088   -0.088
fitMeasures(fit_full, c("chisq", "df", "pvalue", "cfi", "tli", 
                        "rmsea", "rmsea.ci.lower", "rmsea.ci.upper", 
                        "srmr", "nfi", "ifi", "rfi"))
##          chisq             df         pvalue            cfi            tli 
##     140145.371        980.000          0.000          0.878          0.871 
##          rmsea rmsea.ci.lower rmsea.ci.upper           srmr            nfi 
##          0.050          0.050          0.050          0.056          0.877 
##            ifi            rfi 
##          0.878          0.870

Model Fit Indices

uyum <- fitMeasures(fit_full, c("chisq", "df", "pvalue", "cfi", "tli", 
                                "rmsea", "rmsea.ci.lower", "rmsea.ci.upper",
                                "srmr", "nfi", "ifi", "rfi"))

uyum_tablo <- data.frame(
  Index = c("χ²", "df", "p-value", "CFI", "TLI", "RMSEA", 
            "RMSEA Lower", "RMSEA Upper", "SRMR", "NFI", "IFI", "RFI"),
  Value = round(uyum, 3),
  Criteria = c("", "", ">0.05", "≥0.90", "≥0.90", "≤0.08", 
               "", "", "≤0.08", "≥0.90", "≥0.90", "≥0.90"),
  Result = c("", "", ifelse(uyum[3] > 0.05, "✓", "✗"),
             ifelse(uyum[4] >= 0.90, "✓", "Acceptable"),
             ifelse(uyum[5] >= 0.90, "✓", "Acceptable"),
             ifelse(uyum[6] <= 0.08, "✓", "✗"),
             "", "",
             ifelse(uyum[8] <= 0.08, "✓", "✗"),
             ifelse(uyum[9] >= 0.90, "✓", "Acceptable"),
             ifelse(uyum[10] >= 0.90, "✓", "Acceptable"),
             ifelse(uyum[11] >= 0.90, "✓", "Acceptable"))
)

View(uyum_tablo)
write.csv(uyum_tablo, "1_model_uyum.csv", row.names = FALSE)
Index Value Criteria Result
chisq χ² 140145.371
df df 980.000
pvalue p-value 0.000 >0.05
cfi CFI 0.878 ≥0.90 Acceptable
tli TLI 0.871 ≥0.90 Acceptable
rmsea RMSEA 0.050 ≤0.08
rmsea.ci.lower RMSEA Lower 0.050
rmsea.ci.upper RMSEA Upper 0.050
srmr SRMR 0.056 ≤0.08
nfi NFI 0.877 ≥0.90 Acceptable
ifi IFI 0.878 ≥0.90 Acceptable
rfi RFI 0.870 ≥0.90 Acceptable

The structural equation model demonstrated acceptable to good fit indices. The RMSEA value of 0.050 (90% CI [0.050, 0.050]) and SRMR value of 0.056 both fell within acceptable ranges (≤0.08), indicating good model fit. However, the comparative fit indices (CFI = 0.878, TLI = 0.871, NFI = 0.877, IFI = 0.878, RFI = 0.870) were slightly below the ideal threshold of 0.90, though still within the acceptable range (>0.85). The significant chi-square test (χ² = 140145.371, df = 980, p < 0.001) was expected given the large sample size (N = 57,061). Overall, the model demonstrated adequate fit to the data, justifying further examination of the structural paths.

Structural Model Coefficients (Regression Paths)

yapisal <- parameterEstimates(fit_full, standardized = TRUE) %>%
  filter(op == "~") %>%
  select(lhs, rhs, est, se, z = z, pvalue, std.all) %>%
  mutate(
    sig = case_when(
      pvalue < 0.001 ~ "***",
      pvalue < 0.01 ~ "**",
      pvalue < 0.05 ~ "*",
      TRUE ~ "ns"))

View(yapisal)
write.csv(yapisal, "2_structural_paths.csv", row.names = FALSE)
lhs rhs est se z pvalue std.all sig
HomeEnv Attitude 1.648105e-25 0.006935399 2.376366e-23 1 1.648105e-25 ns
HomeEnv Interest -1.946887e-25 0.007110071 -2.738210e-23 1 -1.946887e-25 ns
SelfConcept Attitude 1.597476e-01 0.007376711 2.165567e+01 0 1.564381e-01 ***
SelfConcept Interest 6.300088e-02 0.007519747 8.378058e+00 0 6.169565e-02 ***
Achievement HomeEnv 3.431988e-26 0.004723839 7.265251e-24 1 2.940463e-26 ns
Achievement SelfConcept -5.812168e-01 0.005833896 -9.962756e+01 0 -5.085109e-01 ***
Achievement Attitude 2.965158e-01 0.007241424 4.094717e+01 0 2.540493e-01 ***
Achievement Interest -6.608165e-02 0.007176928 -9.207512e+00 0 -5.661753e-02 ***

The structural model revealed significant paths through Reading Self-Concept but not through Home Literacy Environment. Reading Attitude (β = 0.156, p < 0.001) and Reading Interest (β = 0.062, p < 0.001) both significantly predicted Reading Self-Concept as a mediator variable. However, neither Reading Attitude (β = 0.000, p = 1.000) nor Reading Interest (β = 0.000, p = 1.000) predicted Home Literacy Environment, and Home Environment showed no significant effect on Reading Achievement (β = 0.000, p = 1.000), indicating that Home Literacy Environment did not function as a mediator in this model. Regarding direct effects on Reading Achievement, Reading Attitude demonstrated a significant positive effect (β = 0.254, p < 0.001), while Reading Self-Concept showed an unexpected significant negative effect (β = -0.509, p < 0.001). Reading Interest also exhibited a small but significant negative direct effect on Achievement (β = -0.057, p < 0.001). These findings suggest that Reading Self-Concept partially mediates the relationship between reading attitudes/interest and achievement, though the negative direction warrants further investigation.

Indirect Effects

dolayli <- parameterEstimates(fit_full, standardized = TRUE) %>%
  filter(op == ":=") %>%
  select(label, est, se, z, pvalue, std.all) %>%
  mutate(
    sig = case_when(
      pvalue < 0.001 ~ "***",
      pvalue < 0.01 ~ "**",
      pvalue < 0.05 ~ "*",
      TRUE ~ "ns"))

View(dolayli)
write.csv(dolayli, "3_indirect_effects.csv", row.names = FALSE)
label est se z pvalue std.all sig
indirect_att_home 5.656275e-51 0.000000000 NA NA 4.846191e-51 ns
indirect_att_self -9.284801e-02 0.004408858 -21.059423 0 -7.955045e-02 ***
total_indirect_att -9.284801e-02 0.004408858 -21.059423 0 -7.955045e-02 ***
indirect_int_home -6.681691e-51 0.000000000 NA NA -5.724749e-51 ns
indirect_int_self -3.661717e-02 0.004370747 -8.377782 0 -3.137291e-02 ***
total_indirect_int -3.661717e-02 0.004370747 -8.377782 0 -3.137291e-02 ***
total_attitude 2.036678e-01 0.007777831 26.185686 0 1.744988e-01 ***
total_interest -1.026988e-01 0.007910529 -12.982547 0 -8.799044e-02 ***

The mediation analysis revealed that Reading Self-Concept served as a significant mediator, while Home Literacy Environment did not. For Reading Attitude, the indirect effect through Self-Concept was significant but negative (β = -0.080, p < 0.001), resulting in a total indirect effect of -0.080. Similarly, Reading Interest showed a significant negative indirect effect through Self-Concept (β = -0.031, p < 0.001). In contrast, both indirect paths through Home Literacy Environment were non-significant (β = 0.000, p > 0.05). The total effects showed that Reading Attitude maintained a positive overall influence on Achievement (β = 0.174, p < 0.001), combining its positive direct effect (0.254) with the negative indirect effect (-0.080). However, Reading Interest demonstrated a negative total effect on Achievement (β = -0.088, p < 0.001), suggesting a suppression effect. These findings indicate partial mediation through Reading Self-Concept, though the negative direction of the indirect effects contradicts theoretical expectations and warrants further investigation into the nature of this relationship.

R² (Explained Variance)

r2_values <- inspect(fit_full, "r2")

r2_tablo <- data.frame(
  Variable = names(r2_values),
  R_Square = round(r2_values, 3),
  Percentage = paste0(round(r2_values * 100, 1), "%"))

View(r2_tablo)
write.csv(r2_tablo, "4_r_square.csv", row.names = FALSE)
Variable Variable’ R_Square Percentage
ASBR07A ASBR07A 0.353 35.3%
ASBR07B ASBR07B 0.554 55.4%
ASBR07C ASBR07C 0.256 25.6%
ASBR07D ASBR07D 0.506 50.6%
ASBR07E ASBR07E 0.647 64.7%
ASBR07F ASBR07F 0.551 55.1%
ASBR07G ASBR07G 0.495 49.5%
ASBR07H ASBR07H 0.444 44.4%
ASBR01A ASBR01A 0.432 43.2%
ASBR01B ASBR01B 0.406 40.6%
ASBR01C ASBR01C 0.194 19.4%
ASBR01D ASBR01D 0.346 34.6%
ASBR01E ASBR01E 0.480 48%
ASBR01F ASBR01F 0.366 36.6%
ASBR01G ASBR01G 0.351 35.1%
ASBR01H ASBR01H 0.291 29.1%
ASBR01I ASBR01I 0.317 31.7%
ASRIBM01 ASRIBM01 0.860 86%
ASRIBM02 ASRIBM02 0.857 85.7%
ASRIBM03 ASRIBM03 0.858 85.8%
ASRIBM04 ASRIBM04 0.861 86.1%
ASRIBM05 ASRIBM05 0.859 85.9%
ASBH01A ASBH01A 0.196 19.6%
ASBH01B ASBH01B 0.260 26%
ASBH01C ASBH01C 0.138 13.8%
ASBH01D ASBH01D 0.366 36.6%
ASBH01E ASBH01E 0.157 15.7%
ASBH01F ASBH01F 0.285 28.5%
ASBH01G ASBH01G 0.381 38.1%
ASBH01H ASBH01H 0.336 33.6%
ASBH01I ASBH01I 0.301 30.1%
ASBH01J ASBH01J 0.334 33.4%
ASBH01K ASBH01K 0.407 40.7%
ASBH01L ASBH01L 0.371 37.1%
ASBH01M ASBH01M 0.282 28.2%
ASBH01N ASBH01N 0.173 17.3%
ASBH01O ASBH01O 0.183 18.3%
ASBH01P ASBH01P 0.376 37.6%
ASBH01Q ASBH01Q 0.360 36%
ASBH01R ASBH01R 0.262 26.2%
ASBR08A ASBR08A 0.098 9.8%
ASBR08B ASBR08B 0.147 14.7%
ASBR08C ASBR08C 0.206 20.6%
ASBR08D ASBR08D 0.577 57.7%
ASBR08E ASBR08E 0.590 59%
ASBR08F ASBR08F 0.398 39.8%
Achievement Achievement 0.266 26.6%
HomeEnv HomeEnv 0.000 0%
SelfConcept SelfConcept 0.041 4.1%

The R² values indicate the proportion of variance in endogenous variables explained by their predictors. Reading Achievement showed moderate variance explained (R² = 0.266, 26.6%), suggesting that Reading Attitude, Reading Interest, Home Literacy Environment, and Reading Self-Concept collectively accounted for approximately one-quarter of the variance in reading achievement scores. Reading Self-Concept demonstrated low but significant variance explained (R² = 0.041, 4.1%), indicating that Reading Attitude and Interest explained only a small portion of self-concept variance. Most notably, Home Literacy Environment showed no variance explained (R² = 0.000, 0.0%) by Reading Attitude and Interest, confirming that these variables did not predict home environment in this model. This finding aligns with the non-significant paths to Home Literacy Environment observed in the structural model, explaining why it failed to function as a mediator.

Path

#R da çizemedim de çizdiremedim de pes ettim canvadan yapacağım

NOTE: In the PIRLS 2021 data structure, student (ASG), school (ACG), and achievement (ATG) files for some countries are presented in two different versions: A5 and R5. This is related to the use of two different survey and test forms in the data collection process in these countries. In countries with large sample sizes, such as Finland, Estonia, and Hungary, some of the items administered to students were administered on Form A (A5), while others were administered on Form R (R5). This practice is a result of the rotated booklet design approach used to reduce student response load, balance test time, and obtain more comprehensive data. Because R5 files generally contain all items and full sample information, using R5 versions in analyses is considered more compatible with international reporting standards.

Öğrenme Günlüğü: Eksik veriler başıma iş aştı. Modelim de zaten çok kötü oldu. o yüzden dil ailesini dahil edecek zamanım da kalmadı. bu halityle paylaşıyorum. notlarımı da yazamadım. öğrenme günlüğü için şunu diyebilirim ama regresyon notları ile hepsini kurcalamış oldum. Korelasyon analizleri yaparken Pearson ve Spearman korelasyonlarını hesaplamayı ve korelasyon matrisleri oluşturmayı öğrendim. corrplot paketi sayesinde korelasyonları grafiklerle görselleştirdim ve bu görselleri daha anlaşılır hale getirmeyi başardım. Bu süreç bana, sayılarla çalışmanın sadece hesaplama değil aynı zamanda yorumlama gerektirdiğini fark ettirdi. Regresyon analizlerinde basit ve çoklu regresyon modelleri kurmayı öğrendim. Bağımsız değişkenleri modele eklemeyi, sonuçları yorumlamayı ve R² değerlerinin ne anlama geldiğini daha iyi kavradım. Ayrıca modellerin varsayımlarını test etmeyi, artıklar üzerinden grafikler oluşturmayı ve çoklu bağlantı problemlerini incelemeyi deneyimledim. Yapısal eşitlik modellemesi ve doğrulayıcı faktör analiziyle tanışmam, benim için bu sürecin en öğretici kısımlarından biri oldu. lavaan paketini kullanarak model kurmayı, model uyum indekslerini okumayı ve maddelerin faktör yüklerini incelemeyi öğrendim. Lavaan paketini kullanan jamovi ile yem daha önce yapmnıştım ona göre tbiii ki çok karmaşık geldi ama daha deneyerek çözeceğim.