df: a data frame of individual survey data, where each row is an individual
vars_metric: a character vector of items to use in the Rasch Analysis
vars_DIF: a string with the column names to use for analyzing differential item functioning (DIF). Default is NULL, to skip analysis of DIF.
residuals_PCM: a matrix giving the residuals of the person parameters from the Rasch Model. Row names are the numbers of the people and the columns are for each variable.
split_strategy: a named list giving the strategy to take for splitting variables by categories, passed to rasch_split(). One element of the list per variable to split by. Each element of the list must be a character vector of column names to split. The names of the list are the variables to split each group of variables by. Default is NULL, to not split items.
print_results: a logical value indicating whether or not to print various files displaying results from the Rasch Model. Default is FALSE, to not print the files.
path_output: a string with the path to the output folder. Default is NULL.
breaks: a numeric value giving the number if class intervals. Default is 6.
Returns
a list with results from the DIF analysis: - df_DIF_class: the person residuals from the Rasch Model, the assigned class intervals, and the variables used for DIF analysis
tab_aov_DIF: the results of the ANOVA used to analyze DIF
DIF_results: string of various that exhibit some form of DIF
Details
Differential Item Functioning (DIF) refers to the circumstance when different groups in a sample respond to items in different ways. For instance, DIF would be observed if men and women had different patterns of responses to a set of survey questions. DIF can cause poor fit for the Rasch Model, and therefore should be analyzed. This function uses ANOVA to find DIF by the variables supplied and by a generated class interval.
Note
Currently the calculation of the class intervals is quite slow. Reducing the number of breaks can improve speed.