Main Function
The function dis_analysis() computes correlations between correct or
incorrect item responses (distractors) and the total score. Distractors
are analysed for all raw multiple-choice items (function argument
select_raw). During data preparation, a corresponding variable was
already created in vars; in our example, it is called distan.
The output of the function consists of aggregated results reporting the
minimum and maximum correlations of correct responses and distractors
with the total score. In addition, a table is produced that details the
number of responses and the correlations between item responses and the
total score for each task. Both outputs are saved in Excel and RDS
format. If the file names need to be modified (e.g., because a test is
scaled simultaneously for several cohorts), use the function argument
name_group that adds a suffix to each file name (e.g., "cohort_6").
A summary is printed in the console.
Example code:
NEPSroutines::dis_analysis(
resp = resp,
vars = vars,
valid = "valid",
select_raw = "distan",
print = TRUE,
save = FALSE,
overwrite = TRUE,
path_table = "tables",
path_results = "results",
)Information on the individual function arguments can be obtained via the
help function (?dis_analysis).