prepILSA: Prepare ILSA Data

View source: R/prepILSA.R

prepILSAR Documentation

Prepare ILSA Data

Description

Modifies ILSA data to meet official participation cases, selects columns and transforms data into simple data frames converting missing values to NAs.

Usage

prepILSA(
  df,
  study = NULL,
  year = NULL,
  specification = NULL,
  fixN = TRUE,
  columns = NULL
)

Arguments

df

a data frame.

study

an optional character vector indicating the subjects to be analyzed, for a list of available subjects, check ILSAinfo.

year

a numeric vector indicating the ILSA name, for a list of available cycles, check ILSAinfo.

specification

a character value indicating extra specification like grade (e.g., "G8" for TIMSS) or subject (e.g., "Math" for TIMSSADVANCED).

fixN

a logical value indicating if data should be "fixed" to meet official criteria. For example, reducing the sample for certain countries in TIMSS 1995. Default is TRUE.

columns

a character vector indicating which columns should be selected. If NULL, all columns will be selected.

Examples


data(timss99)

head(timss99)

newdata <- prepILSA(df = timss99, columns = paste0("BSMMAT0",1:5),fixN = FALSE)

head(newdata)


ILSAstats documentation built on March 13, 2026, 5:07 p.m.