knitr::opts_chunk$set(echo = TRUE)
library("tidyverse") library("haven")
library("intsvy") options(width=120)
dir <- "/home/eldani/eldani/International LSA/SEA-PLM/Data/SEA-PLM_Regional_Students-sav" student <- read_spss(file.path(dir, "SEA-PLM_Regional_Students.sav")) dir <- "/home/eldani/eldani/International LSA/SEA-PLM/Data/SEA-PLM_Regional_Schools-sav" school <- read_spss(file.path(dir, "SEA-PLM_Regional_Schools.sav"))
sea <- left_join(student, school, by = c("CNT", "SchID"))
sea$Sex <- factor(sea$Gender, 1:2, labels = c("Female", "Male")) sea$Language <- factor(sea$S_LANG, 0:1, labels = c("No", "Yes")) sea$Location <- factor(sea$SC09Q01, 1:5, labels = c("Rural", rep("Urban", 4)))
intsvy.ben.pv(pvnames= paste0("PV", 1:5, "_R"), cutoff = c(304, 317), by= c("CNT"), data=sea, config = sea_conf)
intsvy.ben.pv(pvnames= paste0("PV", 1:5, "_R"), cutoff = c(304, 317), by= c("CNT", "Sex"), data=sea, config = sea_conf)
intsvy.mean.pv(pvnames=paste0("PV", 1:5, "_R"), by= c("CNT"), data=sea, config = sea_conf) intsvy.mean.pv(pvnames=paste0("PV", 1:5, "_R"), by= c("CNT", "Location"), data=sea, config = sea_conf) intsvy.mean.pv(pvnames=paste0("PV", 1:5, "_R"), by= c("CNT", "Sex"), data=sea[!is.na(sea$Sex), ], config = sea_conf) intsvy.mean.pv(pvnames= paste0("PV", 1:5, "_R"), by= c("CNT", "Language"), data=sea, config = sea_conf)
intsvy.mean.pv(pvnames=paste0("PV", 1:5, "_W"), by= c("CNT"), data=sea, config = sea_conf) intsvy.mean.pv(pvnames=paste0("PV", 1:5, "_M"), by= c("CNT"), data=sea, config = sea_conf)
intsvy.reg.pv(pvnames= paste0("PV", 1:5, "_R"), x= "SES", by= c("CNT"), data=sea, config = sea_conf)
intsvy.reg.pv(pvnames= paste0("PV", 1:5, "_M"), x= c("SES", "Sex"), by= c("CNT"), data=sea, config = sea_conf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.