knitr::opts_chunk$set(echo = TRUE)
library("devtools") install_github("eldafani/intsvy") library("intsvy")
library("intsvy") dir <- "/home/eldani/eldani/International LSA/PIRLS/PIRLS 2021/3_International Database/1_SPSS Data/"
The object dir specifies the directory path where the PIRLS 2021 data is located (eg. "/home/data"). Variable selection can be done with aid of pirls.var.label(dir).
pirls <- pirls.select.merge(folder= dir, student= c("ITSEX", "ASBG03"), home= c("ASBHSES", "ASDHSES"), school= c("ACBG05B"))
pirls.mean.pv(pvlabel = paste0("ASRREA0", 1:5), by = "IDCNTRYL", data = pirls)
pirls.mean.pv(pvlabel = paste0("ASRREA0", 1:5), by = c("IDCNTRYL", "ITSEX"), data = pirls[!is.na(pirls$ITSEX), ])
pirls.ben.pv(pvlabel= paste0("ASRREA0", 1:5), cutoff = 400, by="IDCNTRYL", data=pirls)
pirls.reg.pv(pvlabel= paste0("ASRREA0", 1:5), x="ITSEX", by = "IDCNTRYL", data=pirls[!is.na(pirls$ITSEX), ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.