Main Function
The function mv_person() is used to analyse missing values per person.
This analysis includes information on all user-defined missing values
specified in the argument mvs. In addition, statistics are also
computed for all missing values jointly defined in mvs. Missing values
not included in mvs are not included in this sum. It is therefore
important to include all existing user-defined missing values in mvs
if the aggregate value (“ALL”) is to be meaningfully interpreted. An
exception are design-related missing responses, which are automatically
excluded from the dataset prior to the analysis. For this purpose, the
corresponding user-defined missing value must be specified in the
argument missing_by_design (default is -54). It is very important to
specify the correct value here, otherwise incorrect responses will be
filtered out and the number of persons to whom each item was
administered will also be incorrect.
The analyses can also be conducted separately for different groups
(e.g., test booklets). These must be defined in the argument grouping.
Missing values are then calculated per group only for the items that
were also administered to that group. The name of the grouping (e.g.,
“test version”) can be specified using the argument name_grouping for
labelling the plots. If results are required not only by group but also
for the total sample (both in tables and plots), the argument show_all
must be set to TRUE.
If the analyses are conducted for a multistage test, the function
argument stages needs to be defined. This argument is a named numeric
vector which contains for each stage as vector element the number of
items per stage and as name of the vector element the name of the stage
variable as name. For example, if the test consisted of two stages with
10 items in the first and 8 items in the second stage, the argument
should be stages = c(stage1 = 10, stage2 = 8).
Example code:
NEPSroutines::mv_person(
resp = resp,
vars = vars,
select = "mixed",
valid = "valid",
grouping = c("easy", "difficult"),
mvs = mvs,
labels_mvs = labels_mvs,
missing_by_design = -54,
plots = TRUE,
print = TRUE,
save = TRUE,
return = FALSE,
path_results = "results",
path_table = "tables",
path_plots = "plots/missings_by_person",
show_all = FALSE,
overwrite = TRUE,
name_grouping = "test version",
digits = 3
)Information on the individual function arguments can be obtained via the
help function (?mvp_analysis).