# User Examples SC4 - Estimating Plausible Values

Author

Eva Zink, Timo Gnambs, Tanja Kutscher & Marie-Ann Sengewald

Published

2026-02-17 10:57:24

## 1 Introduction

This user example shows the estimation of plausible values in Starting Cohort 4 of the National Educational Panel Study (NEPS) for all competence domains and measurement waves. This guides users through the typical workflow in the application of the `NEPSscaling` package that involves:

1. Accessing the data with a valid data user agreement from the NEPS website and storing the Scientific Use Files in the recommended folder structure.

2. Preparing the relevant background data according to the planned achievement analysis for which plausible values will be estimated.

3. Applying the `plausible_values()` function from the `NEPSscaling` package to estimate plausible values with the prepared background data.

Important note: The plausible values provided in the Scientific Use Files (SUFs) were generated based on this user example and are suitable for specific achievement analyses that match the variable selection in the user example. Using the `NEPSscaling` package, researchers can generate customized plausible values, tailored to their specific research questions. Accordingly, the user example should be adapted to match the variable selection in the planned achievement analysis.

For more information on the NEPS and all available data, see https://neps-data.de.

Details on the estimation of plausible values in the NEPS and the `NEPSscaling` package can be found in Scharl et al. (2020) and Scharl and Zink (2022).

### 1.1 Folder stucture

Working directory *
|– SUFs **
| |– SC4
|– X_Background_data ***
| |– SC4
* The working directory is the root folder into which the estimated plausible values will be saved.
** The SUFs folder contains a subfolder for the respective Starting Cohort, storing the respective Scientific Use File used for background data preparation and plausible values estimation.
*** The X_Background_data folder stores the prepared background data sets.

If you are working with only one Starting Cohort (e.g., SC4), it is sufficient to include only the relevant subfolders (`SC4/`) in both the `SUFs` and `X_Background_data` directories. Alternatively, you can customize the file paths in your code to define where input data are read from and where output (e.g., background data or plausible values) is saved.

## 2 Data preparation

### 2.1 Background Model

We illustrate the data preparation and implementation of the `NEPSscaling` package with a selection of different variable types that can be used in background models:

- Gender (as a dichotomous variable)

- School type (as a dichotomized categorical variable)

- Generation Status (as a dichotomized categorical variable)

- Number of books at home (as a metric variable)

- Age (as a metric variable)

In addition, we include a possibly large set of competence variables, the Weighted Likelihood Estimates (WLEs) of all other competence domains from the same and previous waves to account for interrelations across domains and over time.

The selection of variables can—and should—be adapted for specific research questions (i.e., to match the variable set in the subsequent achievement analysis).

### 2.2 Load required packages

The following packages are needed for preparing the background data. If not yet installed, please download the packages to your device using the `install.packages()` function.

    library(haven)
    library(dplyr)
    library(tidyr)
    library(purrr)

### 2.3 Setting working directory

The working directory can be specified on your own convenience, by adapting the following example.

    working_dir <- file.path("C:/Users/yourName/Documents/Plausible Values")
    data_dir <- file.path(working_dir, "SUFs")
    output_dir <- file.path(working_dir, "X_Background_data")

### 2.4 Import Scientific Use File (SUF)

We import three SUF datasets, as variables from each are used in the background model for plausible value estimation. The `pTarget` data frame contains student-level information such as gender and date of birth, the `pTargetCATI` data frame contains student-level background information collected in the Computer-Assisted Telephone Interview (CATI), the `CohortProfile` data frame provides cohort-level details, and the `xTargetCompetencies` data frame stores the competence data.

    pTarget <- read_sav(file.path(data_dir, "SC4", "SC4_pTarget_D_14-0-0.sav"))
    pTargetCATI <- read_sav(file.path(data_dir, "SC4", "SC4_pTargetCATI_D_14-0-0.sav"))
    xTargetCompetencies <- read_sav(file.path(data_dir, "SC4", "SC4_xTargetCompetencies_D_14-0-0.sav"))
    CohortProfile <- read_sav(file.path(data_dir, "SC4", "SC4_CohortProfile_D_14-0-0.sav"))

### 2.5 Variable Preparation

The selected background model should match the variables in the subsequent achievement analysis. Accordingly, the following example can be adapted.
The presented example uses different variable types to illustrate the selection of possibly relevant background variables and the subsequent steps in the data preparation.

    pTarget <- pTarget |>
      dplyr::select(
        ID_t, wave,
        "t700031",             # gender
        "t400500_g1",          # generation status
        "t70004y",             # year of birth
        "t34005a"              # number of books
      )

    pTargetCATI <- pTargetCATI |>
      dplyr::select(
        ID_t, wave,
        "t34005a"              # number of books
      )

    CohortProfile <- CohortProfile |>
      dplyr::select(
        ID_t, wave,
        "tx80106", # schooltype
        "tx8610y"  # year of data collection
      )

#### 2.5.1 Categorical variables

##### 2.5.1.1 Gender

The dichotomous gender variable was recoded such that males were coded as 0 and females as 1.

    pTarget$t700031 <- ifelse(
      pTarget$t700031 %in% 2, 1,
      ifelse(is.na(pTarget$t700031), NA, 0)
    )
    table(pTarget$t700031)

        0     1
    26517 27740

##### 2.5.1.2 School Type

The school type variable is originally categorical. To reduce the model complexity, we construct a dichotomous variable (1 = Gymnasium, 0 = other). Alternative categorizations are possible, but if some categories contain only a small number of cases, this may cause estimation problems.

    CohortProfile$tx80106 <- ifelse(CohortProfile$tx80106 == 6, 1, 0)
    table(CohortProfile$tx80106)

         0      1
    155862  74088

##### 2.5.1.3 Generation Status - Proxy for Migration Background

The variable generation status originally includes many categories. We construct a dichotomous variable that indicates whether any migration background is observed (1 = migration background, 0 = no migration background). Alternative categorizations are possible, but if some categories contain only a small number of cases, this may cause estimation problems.

    pTarget$t400500_g1 <- ifelse(pTarget$t400500_g1 %in% 1:3, 1,
                                 ifelse(is.na(pTarget$t400500_g1), NA, 0))
    table(pTarget$t400500_g1)

        0     1
    13411  2796

#### 2.5.2 Metric Variables

##### 2.5.2.1 Number of Books at Home - Proxy for Cultural Capital

In SC4, the variable number of books at home (`t34005a`) is available in both the `pTarget` and the `pTargetCATI` data frame. We consider the variable number of books at home as a metric variable, treating the categories as ordered levels. As such, functional form assumptions are necessary in subsequent analysis (e.g., linear relations). Alternative strategies for preparing the variable are possible, for instance, to dichotomize the variable.

    pTarget$t34005a <- as.numeric(pTarget$t34005a)
    table(pTarget$t34005a)

       1    2    3    4    5    6
    1496 2027 3457 3142 2985 2138

    pTargetCATI$t34005a <- as.numeric(pTargetCATI$t34005a)
    table(pTargetCATI$t34005a)

       1    2    3    4    5    6
    2272 2544 5194 2443 1853  992

##### 2.5.2.2 Age

The age of all respondents is not directly available in the Scientific Use Files, but needs to be constructed. We calculate the age in years at the beginning of the data collection for wave 1 (i.e., as the difference between the survey year of wave 1 and the respondent’s year of birth) and use it as a metric variable. Alternative strategies for preparing the variable are possible, for instance, by calculating the age in months.

    pTarget <- pTarget |>  mutate(age_wave1 = 2010 - t70004y)

### 2.6 Data frame formatting

#### 2.6.1 pTarget

The `pTarget` data frame is initially in long format, with multiple rows per respondent (one for each wave). We transform it into wide format, such that each respondent has a single row and all background information is stored in one column per variable.

    pTarget <- pTarget |>
      dplyr::select(-t70004y)|>
        pivot_wider(
        id_cols = c(ID_t),
        names_from  = c(wave),
        values_from = c("t700031",    # gender
                        "t400500_g1", # generation status
                        "t34005a",    # number of books
                        "age_wave1"   # age in years
        )
      )

    pTargetCATI <- pTargetCATI |>
      pivot_wider(
        id_cols = c(ID_t),
        names_from  = c(wave),
        values_from = c("t34005a"),      # number of books
        names_prefix = "t34005a."
      )

Finally, we merge the CATI and CAWI sources and harmonize the book variable across survey modes to one common pTarget dataset.

    pTarget <- pTarget |>
      full_join(y = pTargetCATI, by = "ID_t") |>
      mutate(
        t34005a.12 = case_when(
          is.na(t34005a.9) & is.na(t34005a.11) ~ NA_real_,
          is.na(t34005a.9) ~ t34005a.11,
          is.na(t34005a.11) ~ t34005a.9,
          t34005a.9 == t34005a.11 ~ t34005a.9,
          TRUE ~ 0
        )
      )

To ensure we have a single, consistent column for each background variable, we perform three steps:

1. Define variable names

       vars <- c("t700031","t400500_g1", "t34005a", "age_wave1")

2. Coalesce across waves
   This step merges the wave-specific variables into a single column per variable (i.e., if an information is not available at wave 1 the first available information of the subsequent waves is used instead for the variables gender, generation status, number of books, year of birth).

       for (v in vars) {
         col_pattern <- paste0("^", v, "_\\d+$")  # Match e.g. age_wave1_1 to age_wave1_13
         cols <- names(pTarget)[grepl(col_pattern, names(pTarget))]

         if (length(cols) > 0) {
           pTarget[[v]] <- reduce(pTarget[cols], coalesce)
         }
       }

3. Keep only the relevant variables

       pTarget <- pTarget |>   dplyr::select(ID_t, all_of(vars))

#### 2.6.2 Cohort Profile

The CohortProfile data frame is initially in long format, with multiple rows per respondent (one for each wave). We transform it into wide format and only use the variable school type (tx80106) at wave 1.

    CohortProfile <- CohortProfile |>  filter(wave == 1) |>  dplyr::select(ID_t, tx80106)

### 2.7 Merge data frames

The variable ID_t is a unique person identifier that allows for merging the different data sets.

    background_data <- list(pTarget, CohortProfile, xTargetCompetencies) |>
      map(~ mutate(., ID_t = as.numeric(ID_t))) |>
      reduce(full_join, by = "ID_t")

#### 2.7.1 Categorical Variables as Factors

All categorical variables must be specified as factors to be correctly processed in the `NEPSscaling` package. Here, we specify a vector containing all relevant categorical variables and convert them accordingly for the background data:

    categorical <- c("t700031", "t400500_g1" ,"t34005a", "tx80106")
    background_data <- background_data |>
      mutate(across(all_of(categorical), as_factor))

### 2.8 Save data frame

We save the prepared data frame for subsequent analysis.

    save(background_data, file = file.path(output_dir, "background_data.RData"))

## 3 Estimation of Plausible Values

The estimation of plausible values refers to specific competence domains and measurement waves. Accordingly, we provide detailed examples for each domain and the respective measurement waves that are currently available in the NEPS - Starting Cohort 3.

- Mathematics: waves 1, 7 and 10

- Reading: waves 2, 7 and 10

- ICT: waves 1, 7 and 14

- Science: waves 1, 5 and 14

- Native Russian: wave 2

- Native Turkish: wave 2

- English as a foreign language: waves 3 and 7

- Scientific Thinking: wave 7

The plausible values are estimated using the `plausible_values()`function from the `NEPSscaling` package. This function expects several arguments specifying the plausible values estimation; most of them are optional. For an extensive overview of the possible specification, see Scharl and Zink (2022) as we will only explain the following arguments:

- SC (required): The Starting Cohort is given by specifying its integer equivalent.

- domain (required): The chosen competence domain is indicated by the two or three letter abbreviations summarized in Fuß et al. (2024). Because not all competence domains have been assessed in each cohort, users have to specify the correct combination of SC and domain as indicated by the function `currently_implemented()`.

- wave (required): The assessment wave is given by an integer value as summarized in Fuß et al. (2024). For example, the tests of the Starting Cohort 6 (adults) took place in waves 3, 5, and 9.

- path (required): Because the function automatically loads the relevant data from the SUF files, the path to the data on the hard drive nieeds to be specified as a string (e.g., “C:/Users/name/NEPS_data/” on a windows machine).

- npv (optional): The number of randomly drawn plausible values can be explicitly set, but defaults to a value of 10. Importantly, only npv plausible values are returned even if more sets are estimated.

- bgdata (optional): The background data needs to be provided as a `data.frame` containing the person identifier ID_t. If no background data is provided, plausible values without a background model are estimated. Note that the package automatically includes the number of not-reached missing values as a proxy for processing times and, if the assessment took place in the school context, the mean competence per school as a proxy for the multi-level sampling design; this default setting can be changed using the arguments `include_nr` and `approximate_school_context`.

- longitudinal (optional): The logical argument indicates whether cross-sectional plausible values for the specified wave or longitudinally linked plausible vales of the specified cohort should be estimated. In the longitudinal case, all available waves of the specified cohort are included in the estimation.

### 3.1 Preparation for the estimation of Plausible Values

Using the `NEPSscaling` package and the dplyr package. The `NEPSscaling` package can be downloaded using:

    install.packages("NEPSscaling", repos=c("http://nocrypt.neps-data.de/r", getOption("repos")))

The package explicitly requires that you specify the path to where the NEPS competence data is stored:

    path <- file.path(data_dir, "SC4")

### 3.2 Set Seed

A seed must be set to ensure that the estimates plausible values are reproducible. We generated the seed using the system time, resulting in a random value. This seed was then used for all subsequent analyses to ensure reproducibility. If you conduct your own analyses, you should specify your own seed, ideally by generating it randomly (e.g., using the system time).

    #in_seed<- Sys.time()
    #in_seed <- as.integer(in_seed)
    #the_seed <- in_seed %% 100000
    #print(the_seed)
    # 50822
    set.seed(50822)

### 3.3 Mathematics

#### 3.3.1 Wave 1

##### 3.3.1.1 Background Model for Wave 1

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 1 we include only competencies assessed in wave 1).

    dat1 <- background_data |>
      select(ID_t,                                              # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,  # demographics
             scg9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,  # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat1, file = file.path(output_dir, "MA_background_data_w1.RData"))

##### 3.3.1.2 Estimating Plausible Values for Wave 1

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective test data and the file with the prepared background data.

    math1 <- plausible_values(SC = 4, domain = "MA", wave = 1, path = path, npv = 10, bgdata = dat1)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(math1, file = file.path(output_dir, "math1.Rdata"))
    write_pv(pv.obj = math1, path = './', ext = "SPSS")
    write_pv(pv.obj = math1, path = './', ext = "Stata")
    write_pv(pv.obj = math1, path = './', ext = "Mplus")

#### 3.3.2 Wave 7

##### 3.3.2.1 Background Model Wave 7

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 7 we include competencies assessed in wave 1-7).

    dat7 <- background_data |>
      select(ID_t,                                                  # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,      # demographics
             scg9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,      # other competencies
             mag9_sc1, efg10_sc1, scg11_sc1,icg12_sc1, reg12_sc1,
             stg12_sc1, efg12_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5, mpg11sc_sc5, mpg12re_sc5,
             mpg12ma_sc5, mpg12ic_sc5, mpg12ef_sc5, mpg12st_sc5)

Save the background data for subsequent analysis.

    save(dat7, file = file.path(output_dir, "MA_background_data_w7.RData"))

##### 3.3.2.2 Estimating Plausible Values for Wave 5

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    math7 <- plausible_values(SC = 4, domain = "MA", wave = 7, path = path, npv = 10, bgdata = dat7)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(math7, file = file.path(output_dir, "math7.Rdata"))
    write_pv(pv.obj = math7, path = './', ext = "SPSS")
    write_pv(pv.obj = math7, path = './', ext = "Stata")
    write_pv(pv.obj = math7, path = './', ext = "Mplus")

#### 3.3.3 Wave 10

##### 3.3.3.1 Background Model Wave 10

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 10 we include competencies assessed in wave 1-10).

    dat10 <- background_data |>
      select(ID_t,                                                  # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,      # demographics
             scg9_sc1, mag9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,      # other competencies
             reg9_sc1, efg10_sc1, scg11_sc1, icg12_sc1, mag12_sc1,
             stg12_sc1, reg12_sc1, efg12_sc1, rea10_sc1, mpg9vo_sc5,
             mpg9ma_sc5,mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5, mpg11sc_sc5, mpg12re_sc5,
             mpg12ma_sc5, mpg12ic_sc5, mpg12ef_sc5, mpg12st_sc5,
             mpa10re_sc5, mpa10ma_sc5)

Save the background data for subsequent analysis.

    save(dat10, file = file.path(output_dir, "MA_background_data_w10.RData"))

##### 3.3.3.2 Estimating Plausible Values for Wave 10

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    math10 <- plausible_values(SC = 4, domain = "MA", wave = 10, path = path, npv = 10, bgdata = dat10)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(math10, file = file.path(output_dir, "math10.Rdata"))
    write_pv(pv.obj = math10, path = './', ext = "SPSS")
    write_pv(pv.obj = math10, path = './', ext = "Stata")
    write_pv(pv.obj = math10, path = './', ext = "Mplus")

#### 3.3.4 Longitudinal Model

##### 3.3.4.1 Longitudinal Background Model

In the longitudinal case, the selected variables include the prepared background data with demographic information, as well as all other competencies assessed up to the first measurement of the target competence - here, Mathematics. Since Mathematics was first assessed in Wave 1, only the competencies measured in wave 1 are included in the background model.

    datl <- background_data |>
      select(ID_t,                                              # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,  # demographics
             scg9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,  # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(datl, file = file.path(output_dir, "MA_background_data_long.RData"))

##### 3.3.4.2 Estimating Plausible Values for Longitudinal Analysis

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data. In addition, it is necessary to specify the argument `longitudinal = TRUE` in the `plausible_values()` function. undefined

    mathl <- plausible_values(SC = 4, domain = "MA", wave = 1, path = path, npv = 10, bgdata = datl, longitudinal = TRUE)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(mathl, file = file.path(output_dir, "mathl.Rdata"))
    write_pv(pv.obj = mathl, path = './', ext = "SPSS")
    write_pv(pv.obj = mathl, path = './', ext = "Stata")
    write_pv(pv.obj = mathl, path = './', ext = "Mplus")

### 3.4 Reading

#### 3.4.1 Wave 2

##### 3.4.1.1 Background Model for Wave 2

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 2, we include competencies assessed in wave 1 and 2).

    dat2 <- background_data |>
      select(ID_t,                                              # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,  # demographics
             scg9_sc1, mag9_sc1, icg9_sc1,nrg9_sc1, ntg9_sc1,   # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5,mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat2, file = file.path(output_dir, "RE_background_data_w2.RData"))

##### 3.4.1.2 Estimating Plausible Values for Wave 2

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    read2 <- plausible_values(SC = 4, domain = "RE", wave = 2, path = path, npv = 10, bgdata = dat2)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(read2, file = file.path(output_dir, "read2.Rdata"))
    write_pv(pv.obj = read2, path = './', ext = "SPSS")
    write_pv(pv.obj = read2, path = './', ext = "Stata")
    write_pv(pv.obj = read2, path = './', ext = "Mplus")

#### 3.4.2 Wave 7

##### 3.4.2.1 Background Model for Wave 7

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e. for wave 7, competencies assessed in wave 1-7 are included).

    dat7 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             scg9_sc1, mag9_sc1, icg9_sc1, nrg9_sc1,ntg9_sc1,      # other competencies
             reg9_sc1, efg10_sc1, scg11_sc1, icg12_sc1, mag12_sc1,
             stg12_sc1, efg12_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5, mpg11sc_sc5, mpg12re_sc5,
             mpg12ma_sc5, mpg12ic_sc5, mpg12ef_sc5, mpg12st_sc5)

It is recommended to save the background data to facilitate future use and ensure proper documentation of the analysis process.

    save(dat7, file = file.path(output_dir, "RE_background_data_w7.RData"))

##### 3.4.2.2 Estimating Plausible Values for Wave 3

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective test data and the file with the prepared background data.

    read7 <- plausible_values(SC = 4, domain = "RE", wave = 7, path = path, npv = 10, bgdata = dat7)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(read7, file = file.path(output_dir, "read7.Rdata"))
    write_pv(pv.obj = read7, path = './', ext = "SPSS")
    write_pv(pv.obj = read7, path = './', ext = "Stata")
    write_pv(pv.obj = read7, path = './', ext = "Mplus")

#### 3.4.3 Wave 10

##### 3.4.3.1 Background Model Wave 10

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e. for wave 10, competencies assessed in wave 1-10 are included).

    dat10 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             scg9_sc1, mag9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,     # other competencies
             reg9_sc1, efg10_sc1, scg11_sc1, icg12_sc1, mag12_sc1,
             stg12_sc1, reg12_sc1, efg12_sc1, maa10_sc1,
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5, mpg10ef_sc5,
             mpg11sc_sc5, mpg12re_sc5, mpg12ma_sc5, mpg12ic_sc5,
             mpg12ef_sc5, mpg12st_sc5, mpa10re_sc5, mpa10ma_sc5)

It is recommended to save the background data to facilitate future use and ensure proper documentation of the analysis process.

    save(dat10, file = file.path(output_dir, "RE_background_data_w10.RData"))

##### 3.4.3.2 Estimating Plausible Values for Wave 10

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective test data and the file with the prepared background data.

    read10 <- plausible_values(SC = 4, domain = "RE", wave = 10, path = path, npv = 10, bgdata = dat10)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(read10, file = file.path(output_dir, "read10.Rdata"))
    write_pv(pv.obj = read10, path = './', ext = "SPSS")
    write_pv(pv.obj = read10, path = './', ext = "Stata")
    write_pv(pv.obj = read10, path = './', ext = "Mplus")

#### 3.4.4 Longitudinal Model

##### 3.4.4.1 Longitudinal Background Model

For longitudinal achievement analysis, the selected variables include the prepared background data with demographic information, as well as all other competencies assessed up to the first measurement of the target competence domain - here, Reading. Since Reading was first assessed in wave 2, the competencies measured in waves 1 and 2 are included in the background model.

    datl <- background_data |>
      select(ID_t,                                              # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,  # demographics
             scg9_sc1, mag9_sc1, icg9_sc1,nrg9_sc1, ntg9_sc1,   # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5,mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

It is recommended to save the background data to facilitate future use and ensure proper documentation of the analysis process.

    save(datl, file = file.path(output_dir, "RE_background_data_long.RData"))

##### 3.4.4.2 Estimating Plausible Values for Longitudinal Analysis

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data. In addition, it is necessary to specify the argument `longitudinal = TRUE` in the `plausible_values()` function. Note that the specified assessment wave can be any of the waves from the SC and domain combination in the longitudinal estimation.

    readl <- plausible_values(SC = 4, domain = "RE", wave = 2, path = path, npv = 10, bgdata = datl, longitudinal = TRUE)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(readl, file = file.path(output_dir, "readl.Rdata"))
    write_pv(pv.obj = readl, path = './', ext = "SPSS")
    write_pv(pv.obj = readl, path = './', ext = "Stata")
    write_pv(pv.obj = readl, path = './', ext = "Mplus")

### 3.5 ICT

#### 3.5.1 Wave 1

##### 3.5.1.1 Background Model for Wave 1

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 1 we include competencies assessed only in wave 1).

    dat1 <- background_data |>
      select(ID_t,                                               # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,   # demographics
             mag9_sc1, reg9_sc1, scg9_sc1, nrg9_sc1, ntg9_sc1,   # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat1, file = file.path(output_dir, "ICT_background_data_w1.RData"))

##### 3.5.1.2 Estimating Plausible Values for Wave 1

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    ict1 <- plausible_values(SC = 4, domain = "IC", wave = 1, path = path, npv = 10, bgdata = dat1)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(ict1, file = file.path(output_dir, "ict1.Rdata"))
    write_pv(pv.obj = ict1, path = './', ext = "SPSS")
    write_pv(pv.obj = ict1, path = './', ext = "Stata")
    write_pv(pv.obj = ict1, path = './', ext = "Mplus")

#### 3.5.2 Wave 7

##### 3.5.2.1 Background Model for Wave 7

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 7 we include competencies assessed in wave 1-7).

    dat7 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             scg9_sc1, mag9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1,     # other competencies
             ntg9_sc1, mag9_sc1, efg12_sc1, mag12_sc1, reg12_sc1,
             scg11_sc1, efg10_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5,mpg12ef_sc5, mpg11sc_sc5)

Save the background data for subsequent analysis.

    save(dat7, file = file.path(output_dir, "ICT_background_data_w7.RData"))

##### 3.5.2.2 Estimating Plausible Values for Wave 7

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    ict7 <- plausible_values(SC = 4, domain = "IC", wave = 7, path = path, npv = 10, bgdata = dat7)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(ict7, file = file.path(output_dir, "ict7.Rdata"))
    write_pv(pv.obj = ict7, path = './', ext = "SPSS")
    write_pv(pv.obj = ict7, path = './', ext = "Stata")
    write_pv(pv.obj = ict7, path = './', ext = "Mplus")

#### 3.5.3 Wave 14

##### 3.5.3.1 Background Model Wave 14

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 14 we include competencies assessed in wave 1-14).

    dat14 <- background_data |>
      select(ID_t,                                                  # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,      # demographics
             scg9_sc1, mag9_sc1, reg9_sc1,icg9_sc1,icg12_sc1,       # other competencies
             nrg9_sc1, ntg9_sc1, mag9_sc1, efg12_sc1, mag12_sc1,
             reg12_sc1, scg11_sc1, efg10_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5,mpg12ef_sc5, mpg11sc_sc5)

Save the background data for subsequent analysis.

    save(dat14, file = file.path(output_dir, "ICT_background_data_w14.RData"))

##### 3.5.3.2 Estimating Plausible Values for Wave 14

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    ict14 <- plausible_values(SC = 4, domain = "IC", wave = 14, path = path, npv = 10, bgdata = dat14)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(ict14, file = file.path(output_dir, "ict14.Rdata"))
    write_pv(pv.obj = ict14, path = './', ext = "SPSS")
    write_pv(pv.obj = ict14, path = './', ext = "Stata")
    write_pv(pv.obj = ict14, path = './', ext = "Mplus")

#### 3.5.4 Longitudinal Model

##### 3.5.4.1 Longitudinal Background Model

For longitudinal achievement analysis, the selected variables include the prepared background data with demographic information, as well as all other competencies assessed up to the first measurement of the target competence domain - here, ICT. Since ICT was first assessed in wave 1, the competencies only measured in wave 1 are included in the background model.

    datl <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             mag9_sc1, reg9_sc1, scg9_sc1, nrg9_sc1, ntg9_sc1,   # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(datl, file = file.path(output_dir, "ICT_background_data_long.RData"))

##### 3.5.4.2 Estimating Plausible Values for Longitudinal Analysis

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data. In addition, it is necessary to specify the argument `longitudinal = TRUE` in the `plausible_values()` function.

    ictl <- plausible_values(SC = 4, domain = "IC", wave = 1, path = path, npv = 10, bgdata = datl, longitudinal = TRUE)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(ictl, file = file.path(output_dir, "ictl.Rdata"))
    write_pv(pv.obj = ictl, path = './', ext = "SPSS")
    write_pv(pv.obj = ictl, path = './', ext = "Stata")
    write_pv(pv.obj = ictl, path = './', ext = "Mplus")

### 3.6 Science

#### 3.6.1 Wave 1

##### 3.6.1.1 Background Model for Wave 1

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 1 we include competencies assessed in wave 1).

    dat1 <- background_data |>
      select(ID_t,                                                # person idenifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,    # demographics
             mag9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,    # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat1, file = file.path(output_dir, "SC_background_data_w1.RData"))

##### 3.6.1.2 Estimating Plausible Values for Wave 1

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    science1 <- plausible_values(SC = 4, domain = "SC", wave = 1, path = path, npv = 10, bgdata = dat1)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(science1, file = file.path(output_dir, "science1.Rdata"))
    write_pv(pv.obj = science1, path = './', ext = "SPSS")
    write_pv(pv.obj = science1, path = './', ext = "Stata")
    write_pv(pv.obj = science1, path = './', ext = "Mplus")

#### 3.6.2 Wave 5

##### 3.6.2.1 Background Model for Wave 5

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 5 we include competencies assessed in wave 1-5).

    dat5 <- background_data |>
      select(ID_t,                                                  # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,      # demographics
             scg9_sc1, mag9_sc1, reg9_sc1, icg9_sc1,nrg9_sc1,       # other competencies
             ntg9_sc1, mag9_sc1, efg10_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg10ef_sc5, mpg11sc_sc5)

Save the background data for subsequent analysis.

    save(dat5, file = file.path(output_dir, "SC_background_data_w5.RData"))

##### 3.6.2.2 Estimating Plausible Values for Wave 5

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    science5 <- plausible_values(SC = 4, domain = "SC", wave = 5, path = path, npv = 10, bgdata = dat5)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(science5, file = file.path(output_dir, "science5.Rdata"))
    write_pv(pv.obj = science5, path = './', ext = "SPSS")
    write_pv(pv.obj = science5, path = './', ext = "Stata")
    write_pv(pv.obj = science5, path = './', ext = "Mplus")

#### 3.6.3 Wave 14

##### 3.6.3.1 Background Model Wave 14

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 14 we include competencies assessed in wave 1-14).

    dat14 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             scg9_sc1,sca14_sc1, mag9_sc1, reg9_sc1, icg9_sc1,     # other competencies
             nrg9_sc1, ntg9_sc1, mag9_sc1, efg10_sc1, mpg9vo_sc5,
             mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5,
             mpg9nr_sc5, mpg9nt_sc5, mpg10ef_sc5, mpg11sc_sc5)

Save the background data for subsequent analysis.

    save(dat14, file = file.path(output_dir, "SC_background_data_w14.RData"))

##### 3.6.3.2 Estimating Plausible Values for Wave 14

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    science14 <- plausible_values(SC = 4, domain = "SC", wave = 14, path = path, npv = 10, bgdata = dat14)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(science14, file = file.path(output_dir, "science14.Rdata"))
    write_pv(pv.obj = science14, path = './', ext = "SPSS")
    write_pv(pv.obj = science14, path = './', ext = "Stata")
    write_pv(pv.obj = science14, path = './', ext = "Mplus")

#### 3.6.4 Longitudinal Model

##### 3.6.4.1 Longitudinal Background Model

For longitudinal achievement analysis, the selected variables include the prepared background data with demographic information, as well as all other competencies assessed up to the first measurement of the target competence domain - here, Science. Since Science was first assessed in wave 1, only the competencies measured in wave 1 are included in the background model.

    datl <- background_data |>
      select(ID_t,                                                # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,    # demographics
             mag9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1, ntg9_sc1,    # other competencies
             mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5,
             mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(datl, file = file.path(output_dir, "SC_background_data_long.RData"))

##### 3.6.4.2 Estimating Plausible Values for Longitudinal Analysis

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data. In addition, it is necessary to specify the argument `longitudinal = TRUE` in the `plausible_values()` function.

    sciencel <- plausible_values(SC = 4, domain = "SC", wave = 1, path = path, npv = 10, bgdata = datl, longitudinal = TRUE)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(sciencel, file = file.path(output_dir, "sciencel.Rdata"))
    write_pv(pv.obj = sciencel, path = './', ext = "SPSS")
    write_pv(pv.obj = sciencel, path = './', ext = "Stata")
    write_pv(pv.obj = sciencel, path = './', ext = "Mplus")

### 3.7 Native Russian Listening Competence

#### 3.7.1 Wave 2

##### 3.7.1.1 Background Model for Wave 2

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 2 we include competencies assessed in wave 1-2).

    dat2 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             reg9_sc1, mag9_sc1, scg9_sc1, icg9_sc1, mpg9vo_sc5,   # other competencies
             mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5,
             mpg9nr_sc5)

Save the background data for subsequent analysis.

    save(dat2, file = file.path(output_dir, "NR_background_data_w2.RData"))

##### 3.7.1.2 Estimating Plausible Values for Wave 2

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    nr2 <- plausible_values(SC = 4, domain = "NR", wave = 2, path = path, npv = 10, bgdata = dat2)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(nr2, file = file.path(output_dir, "nr2.Rdata"))
    write_pv(pv.obj = nr2, path = './', ext = "SPSS")
    write_pv(pv.obj = nr2, path = './', ext = "Stata")
    write_pv(pv.obj = nr2, path = './', ext = "Mplus")

### 3.8 Native Turkish Listening Competence

#### 3.8.1 Wave 2

##### 3.8.1.1 Background Model for Wave 2

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 2 we include competencies assessed in wave 1-2).

    dat2 <- background_data |>
      select(ID_t,                                                # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,    # demographics
             reg9_sc1, mag9_sc1, scg9_sc1, icg9_sc1, mpg9vo_sc5,  # other competencies
             mpg9ma_sc5, mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5,
             mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat2, file = file.path(output_dir, "NT_background_data_w2.RData"))

##### 3.8.1.2 Estimating Plausible Values for Wave 2

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    nt2 <- plausible_values(SC = 4, domain = "NT", wave = 2, path = path, npv = 10, bgdata = dat2)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(nt2, file = file.path(output_dir, "nt2.Rdata"))
    write_pv(pv.obj = nt2, path = './', ext = "SPSS")
    write_pv(pv.obj = nt2, path = './', ext = "Stata")
    write_pv(pv.obj = nt2, path = './', ext = "Mplus")

### 3.9 English as a foreign language

#### 3.9.1 Wave 3

##### 3.9.1.1 Background Model for Wave 3

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 3 we include competencies assessed in wave 1-3).

    dat3 <- background_data |>
             select(ID_t,                                        # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,   # demographics
             reg9_sc1, mag9_sc1, scg9_sc1, icg9_sc1, nrg9_sc1,   # other competencies
             ntg9_sc1, mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5,
             mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(dat3, file = file.path(output_dir, "EF_background_data_w3.RData"))

##### 3.9.1.2 Estimating Plausible Values for Wave 3

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    english3 <- plausible_values(SC = 4, domain = "EF", wave = 3, path = path, npv = 10, bgdata = dat3)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(english3, file = file.path(output_dir, "english3.Rdata"))
    write_pv(pv.obj = english3, path = './', ext = "SPSS")
    write_pv(pv.obj = english3, path = './', ext = "Stata")
    write_pv(pv.obj = english3, path = './', ext = "Mplus")

#### 3.9.2 Wave 7

##### 3.9.2.1 Background Model for Wave 7

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 7 we include competencies assessed in wave 1-7).

    dat7 <- background_data |>
      select(ID_t,                                                # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,    # demographics
             scg9_sc1, mag9_sc1, reg9_sc1, icg9_sc1, nrg9_sc1,    # other competencies
             ntg9_sc1, mag12_sc1, reg12_sc1, scg11_sc1,
             efg10_sc1, mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5,
             mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5,
             mpg10ef_sc5, mpg12ef_sc5, mpg11sc_sc5)

Save the background data for subsequent analysis.

    save(dat7, file = file.path(output_dir, "EF_background_data_w7.RData"))

##### 3.9.2.2 Estimating Plausible Values for Wave 7

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    english7 <- plausible_values(SC = 4, domain = "EF", wave = 7, path = path, npv = 10, bgdata = dat7)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(english7, file = file.path(output_dir, "english7.Rdata"))
    write_pv(pv.obj = english7 , path = './', ext = "SPSS")
    write_pv(pv.obj = english7 , path = './', ext = "Stata")
    write_pv(pv.obj = english7 , path = './', ext = "Mplus")

#### 3.9.3 Longitudinal Model

##### 3.9.3.1 Longitudinal Background Model

For longitudinal achievement analysis, the selected variables include the prepared background data with demographic information, as well as all other competencies assessed up to the first measurement of the target competence domain - here, English. Since English was first assessed in wave 3, the competencies measured in waves 1-3 are included in the background model.

    datl <- background_data |>
             select(ID_t,                                        # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,   # demographics
             reg9_sc1, mag9_sc1, scg9_sc1, icg9_sc1, nrg9_sc1,   # other competencies
             ntg9_sc1, mpg9vo_sc5, mpg9ma_sc5, mpg9ic_sc5,
             mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5, mpg9nt_sc5)

Save the background data for subsequent analysis.

    save(datl, file = file.path(output_dir, "EF_background_data_long.RData"))

##### 3.9.3.2 Estimating Plausible Values for Longitudinal Analysis

We estimate 10 plausible values are for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data. In addition, it is necessary to specify the argument `longitudinal = TRUE` in the `plausible_values()` function.

    englishl <- plausible_values(SC = 4, domain = "EF", wave = 3, path = path, npv = 10, bgdata = datl, longitudinal = TRUE)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(englishl, file = file.path(output_dir, "englishl.Rdata"))
    write_pv(pv.obj = englishl, path = './', ext = "SPSS")
    write_pv(pv.obj = englishl, path = './', ext = "Stata")
    write_pv(pv.obj = englishl, path = './', ext = "Mplus")

### 3.10 Scientific thinking

#### 3.10.1 Wave 7

##### 3.10.1.1 Background Model for Wave 7

The selected variables include the prepared background data with demographic information and all other competencies which are assessed up to the wave under investigation (i.e., for wave 7 we include competencies assessed in wave 1-7).

    dat7 <- background_data |>
      select(ID_t,                                                 # person identifier
             t700031, t400500_g1, t34005a, age_wave1, tx80106,     # demographics
             reg9_sc1, mag9_sc1, scg9_sc1, icg9_sc1, ntg9_sc1,     # other competencies
             nrg9_sc1, reg12_sc1, mag12_sc1, scg11_sc1, icg12_sc1,
             efg10_sc1, efg12_sc1, mpg9vo_sc5, mpg9ma_sc5,
             mpg9ic_sc5, mpg9sc_sc5, mpg9re_sc5, mpg9nr_sc5,
             mpg9nt_sc5, mpg12ma_sc5, mpg12ic_sc5, mpg11sc_sc5,
             mpg12re_sc5, mpg10ef_sc5, mpg12ef_sc5)

Save the background data for subsequent analysis.

    save(dat7, file = file.path(output_dir, "ST_background_data_w7.RData"))

##### 3.10.1.2 Estimating Plausible Values for Wave 7

We estimate 10 plausible values for each respondent. For this, it is necessary to specify the respective competence test data and the file with the prepared background data.

    st7 <- plausible_values(SC = 4, domain = "ST", wave = 7, path = path, npv = 10, bgdata = dat7)

Save plausible values as R data or export the data as SPSS, Stata or Mplus file.

    save(st7, file = file.path(output_dir, "st7.Rdata"))
    write_pv(pv.obj = st7, path = './', ext = "SPSS")
    write_pv(pv.obj = st7, path = './', ext = "Stata")
    write_pv(pv.obj = st7, path = './', ext = "Mplus")

## 4 Session information

    print(sessionInfo(), locale = FALSE)

    R version 4.5.2 (2025-10-31 ucrt)
    Platform: x86_64-w64-mingw32/x64
    Running under: Windows 11 x64 (build 26200)

    Matrix products: default
      LAPACK version 3.12.1

    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base

    other attached packages:
    [1] NEPSscaling_4.0.0 purrr_1.1.0       tidyr_1.3.1       dplyr_1.1.4
    [5] haven_2.5.5

    loaded via a namespace (and not attached):
     [1] vctrs_0.6.5       cli_3.6.5         knitr_1.50        rlang_1.1.6
     [5] xfun_0.51         forcats_1.0.0     generics_0.1.4    jsonlite_2.0.0
     [9] glue_1.8.0        htmltools_0.5.8.1 hms_1.1.3         rmarkdown_2.29
    [13] evaluate_1.0.5    tibble_3.3.0      tzdb_0.5.0        fastmap_1.2.0
    [17] yaml_2.3.10       lifecycle_1.0.4   compiler_4.5.2    htmlwidgets_1.6.4
    [21] pkgconfig_2.0.3   rstudioapi_0.17.1 digest_0.6.37     R6_2.6.1
    [25] readr_2.1.5       tidyselect_1.2.1  pillar_1.11.0     magrittr_2.0.3
    [29] withr_3.0.2       tools_4.5.2