View source: R/com_unit_missingness.R
com_unit_missingness | R Documentation |
This implementation examines a crude version of unit missingness or unit-nonresponse (Kalton and Kasprzyk 1986), i.e. if all measurement variables in the study data are missing for an observation it has unit missingness.
The function can be applied on stratified data. In this case strata_vars must be specified.
Descriptor
com_unit_missingness(
study_data,
meta_data,
id_vars = NULL,
strata_vars = NULL,
label_col
)
study_data |
data.frame the data frame that contains the measurements |
meta_data |
data.frame the data frame that contains metadata attributes of study data |
id_vars |
variable list optional, a (vectorized) call of ID-variables that should not be considered in the calculation of unit- missingness |
strata_vars |
variable optional, a string or integer variable used for stratification |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
This implementations calculates a crude rate of unit-missingness. This type of missingness may have several causes and is an important research outcome. For example, unit-nonresponse may be selective regarding the targeted study population or technical reasons such as record-linkage may cause unit-missingness.
It has to be discriminated form segment and item missingness, since different causes and mechanisms may be the reason for unit-missingness.
This function does not support a resp_vars
argument but id_vars
, which
have a roughly inverse logic behind: id_vars with values do not prevent a row
from being considered missing, because an ID is the only hint for a unit that
elsewise would not occur in the data at all.
List function.
A list with:
FlaggedStudyData
: data.frame with id-only-rows flagged in a column
Unit_missing
SummaryData
: data.frame with numbers and percentages of unit
missingness
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.