library("devtools")
install_github("eldafani/intsvy")
library("intsvy")
## ── Attaching core tidyverse packages ──────────────────────────────────────────────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Grade 8

Read data

The object dir specifies the directory path where the TIMSS 2023 data is located (eg. “/home/data”). Variable selection can be done with aid of timssg8.var.label(dir)

timss <- timssg8.select.merge(folder= dir,
         student= c("ITSEX", "BSDGSLM", "BSDGSVM", "BSDGEDUP"), 
         school= c("BCBG05A", "BCDGSBC"), 
         countries = c("ARE", "CHL", "GEO", "SGP"))

Calculate mean math performance by education system

timss.mean.pv(pvlabel=paste0("BSMMAT0", 1:5), by= "IDCNTRYL", data=timss)
##               IDCNTRYL  Freq   Mean s.e.     SD  s.e
## 1                Chile  4478 415.97 3.21  83.71 2.11
## 2              Georgia  4872 466.75 3.22  92.08 2.13
## 3            Singapore  4772 605.32 6.05  96.98 3.55
## 4 United Arab Emirates 32740 488.51 1.73 103.86 1.39

Calculate mean math performance by education system and student’s sex

timss.mean.pv(pvlabel= paste0("BSMMAT0", 1:5), by= c("IDCNTRYL", "ITSEX"), 
              data=timss %>% drop_na(ITSEX))
##               IDCNTRYL ITSEX  Freq   Mean s.e.     SD  s.e
## 1                Chile     1  2218 404.71 3.47  82.06 1.95
## 2                Chile     2  2260 426.85 3.67  83.84 3.00
## 3              Georgia     1  2389 462.61 3.47  89.88 2.25
## 4              Georgia     2  2483 470.82 3.86  93.99 2.60
## 5            Singapore     1  2305 601.87 6.91  93.51 3.74
## 6            Singapore     2  2467 608.45 8.26  99.92 4.10
## 7 United Arab Emirates     1 16662 482.13 1.89  99.46 1.42
## 8 United Arab Emirates     2 16077 494.70 2.18 107.61 1.75

International benchmarks by education system

intsvy.ben.pv(pvnames= paste0("BSMMAT0", 1:5), cutoff =   c(400, 475, 550, 625), 
              by= c("IDCNTRYL", "ITSEX"), data=timss %>% drop_na(ITSEX), 
              config = timss8_conf)
##                IDCNTRYL ITSEX       Benchmark Percentage Std. err.
## 1                 Chile     1 At or above 400      50.93      1.96
## 2                 Chile     1 At or above 475      19.22      1.21
## 3                 Chile     1 At or above 550       4.32      0.61
## 4                 Chile     1 At or above 625       0.60      0.25
## 5                 Chile     2 At or above 400      62.43      1.90
## 6                 Chile     2 At or above 475      28.15      1.52
## 7                 Chile     2 At or above 550       7.20      0.84
## 8                 Chile     2 At or above 625       0.85      0.25
## 9               Georgia     1 At or above 400      73.86      1.58
## 10              Georgia     1 At or above 475      45.62      1.96
## 11              Georgia     1 At or above 550      17.14      1.42
## 12              Georgia     1 At or above 625       2.89      0.53
## 13              Georgia     2 At or above 400      76.28      1.90
## 14              Georgia     2 At or above 475      47.67      1.90
## 15              Georgia     2 At or above 550      21.39      1.45
## 16              Georgia     2 At or above 625       4.73      0.93
## 17            Singapore     1 At or above 400      96.68      0.80
## 18            Singapore     1 At or above 475      89.37      1.70
## 19            Singapore     1 At or above 550      74.20      2.50
## 20            Singapore     1 At or above 625      44.84      3.20
## 21            Singapore     2 At or above 400      96.88      0.82
## 22            Singapore     2 At or above 475      89.31      1.83
## 23            Singapore     2 At or above 550      74.08      2.89
## 24            Singapore     2 At or above 625      47.70      3.45
## 25 United Arab Emirates     1 At or above 400      78.02      0.76
## 26 United Arab Emirates     1 At or above 475      52.71      0.88
## 27 United Arab Emirates     1 At or above 550      25.47      0.75
## 28 United Arab Emirates     1 At or above 625       7.74      0.47
## 29 United Arab Emirates     2 At or above 400      79.13      0.85
## 30 United Arab Emirates     2 At or above 475      57.25      0.91
## 31 United Arab Emirates     2 At or above 550      32.12      0.91
## 32 United Arab Emirates     2 At or above 625      11.67      0.67

International benchmarks by education system and student’s sex

intsvy.ben.pv(pvnames= paste0("BSMMAT0", 1:5), cutoff =   c(400, 475, 550, 625), 
              by= c("IDCNTRYL", "ITSEX"), data=timss %>% drop_na(ITSEX), 
              config = timss8_conf)
##                IDCNTRYL ITSEX       Benchmark Percentage Std. err.
## 1                 Chile     1 At or above 400      50.93      1.96
## 2                 Chile     1 At or above 475      19.22      1.21
## 3                 Chile     1 At or above 550       4.32      0.61
## 4                 Chile     1 At or above 625       0.60      0.25
## 5                 Chile     2 At or above 400      62.43      1.90
## 6                 Chile     2 At or above 475      28.15      1.52
## 7                 Chile     2 At or above 550       7.20      0.84
## 8                 Chile     2 At or above 625       0.85      0.25
## 9               Georgia     1 At or above 400      73.86      1.58
## 10              Georgia     1 At or above 475      45.62      1.96
## 11              Georgia     1 At or above 550      17.14      1.42
## 12              Georgia     1 At or above 625       2.89      0.53
## 13              Georgia     2 At or above 400      76.28      1.90
## 14              Georgia     2 At or above 475      47.67      1.90
## 15              Georgia     2 At or above 550      21.39      1.45
## 16              Georgia     2 At or above 625       4.73      0.93
## 17            Singapore     1 At or above 400      96.68      0.80
## 18            Singapore     1 At or above 475      89.37      1.70
## 19            Singapore     1 At or above 550      74.20      2.50
## 20            Singapore     1 At or above 625      44.84      3.20
## 21            Singapore     2 At or above 400      96.88      0.82
## 22            Singapore     2 At or above 475      89.31      1.83
## 23            Singapore     2 At or above 550      74.08      2.89
## 24            Singapore     2 At or above 625      47.70      3.45
## 25 United Arab Emirates     1 At or above 400      78.02      0.76
## 26 United Arab Emirates     1 At or above 475      52.71      0.88
## 27 United Arab Emirates     1 At or above 550      25.47      0.75
## 28 United Arab Emirates     1 At or above 625       7.74      0.47
## 29 United Arab Emirates     2 At or above 400      79.13      0.85
## 30 United Arab Emirates     2 At or above 475      57.25      0.91
## 31 United Arab Emirates     2 At or above 550      32.12      0.91
## 32 United Arab Emirates     2 At or above 625      11.67      0.67