com_unit_missingness {dataquieR} | R Documentation |
Counts all individuals with no measurements at all
Description
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.
Usage
com_unit_missingness(
id_vars = NULL,
strata_vars = NULL,
label_col,
study_data,
item_level = "item_level",
meta_data = item_level,
meta_data_v2
)
Arguments
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 |
study_data |
data.frame the data frame that contains the measurements |
item_level |
data.frame the data frame that contains metadata attributes of study data |
meta_data |
data.frame old name for |
meta_data_v2 |
character path to workbook like metadata file, see
|
Details
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.
Hint
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.
Value
A list with:
-
FlaggedStudyData
: data.frame with id-only-rows flagged in a columnUnit_missing
-
SummaryData
: data.frame with numbers and percentages of unit missingness