collapseMissings: Recode Character Missings of Different Types to 0 or 'NA'

Description Usage Arguments Details Value Author(s) References

View source: R/collapseMissings.R

Description

This function is used to recode character missings in datasets that were prepared with functions from the eatPrep package to 0 or NA. It is called by several functions of the eat package family.

Usage

1
collapseMissings(dat, missing.rule = NULL, items)

Arguments

dat

data frame containing character missings (e.g. type mbd - missing by design)

missing.rule

A list with definitions how to recode the different types of missings in the dataset. If NULL, the default described in 'Details' is used.

items

A character vector containing the column names of the data frame for which character missings are to be recoded.

Details

One of the main ideas of the eat package family is that different types of missing values should remain distinguishable during data preparation, thus allowing the user to flexibly recode them to different values during the IRT scaling process. collapseMissings can be used to facilitate the recoding of the different types of character missings before scaling or when exporting the data to other software packages (e. g., SPSS).

The eat package family currently supports six different types of missings, namely

mvi (text volume insufficient): used in writing tasks if a person wrote to little to evaluate whether they met a specific criterion.

mnr (missing not reached): used whenever a person did not reach the respective task in his or her test booklet. All consecutive missing values clustered at the end of a test session can be coded mnr, e.g., by the function recodeMbiToMnr from package eatPrep.

mci (missing coding impossible): used whenever a response cannot be coded due to technical problems (e.g., problems in digitalizing the booklets)

mbd (missing by desing): used whenever an item was not administered to a specific person.

mir (missing invalid response): used whenever a person attempted to answer an item but this answer cannot be classified in the existing coding scheme. Can also be used for multiple choice-items when the respondent selected more than one option.

mbi (missing by intention): used whenever a person was expected to answer an item but did not provide a response.

The default recode values for these missing types are: text volume insufficient = 0, missing not reached = 0, missing coding impossible = NA, missing by design = NA, missing invalid response = 0, missing by intention = 0

Value

A data frame with recoded missings.

Author(s)

Karoline Sachse, Martin Hecht

References

OECD (2005). PISA 2003 Technical Report. OECD Publishing.


eatTools documentation built on May 2, 2019, 4:44 p.m.