*! version 1.1 2022.01.25
help uirt_dif

Title

uirt_dif -- Postestimation command of uirt to perform DIF analysis

Syntax

uirt_dif [varlist] [,options]

varlist must include only variables that were declared in the main list of items of current uirt run.
If varlist is skipped or asterisk * is used, uirt_dif will either display the results that are currently stored in e(dif_results) matrix
(display mode), or it will conduct DIF analysis on all items declared in the main list of items of current uirt run (estimation mode).
This behavior depends on whether any DIF analysis was produced by current uirt run or not.

Options

format(str) file format for DIF graphs (png|gph|eps); default: format(png)

colors(str) color names to override default plot colors used in DIF graphs

tw(twoway_options) twoway graph options to override default graph layout

cleargraphs suppress storing of graphs in Stata memory

Description

uirt_dif is a postestimation command of uirt
that allows for differential item functioning (DIF) analysis after a two-group model was fit.
For each item specified for DIF analysis a two-group model with common item parameters in both groups
is compared against a model with group-specific parameters for that item.
Statistical significance of DIF is verified by a LR test.
Effect measures are computed on the observed score metric (P-DIF) by subtracting expected mean scores of an item
under each of the group-specific item parameter estimates (Wainer, 1993).
Namely, P-DIF|GR=E(parR,GR)-E(parF,GR), where GR indicates that the reference group distribution was used for integration
and parR and parF stand for item parameters estimated in GR and GF respectively. Analogous P-DIF|GF measure is also computed.
DIF significance and effect size information is stored in r(dif_results).
Group-specific item parameter estimates are stored in r(dif_item_par_GR) and r(dif_item_par_GF).
Using uirt_dif in estimation mode will also result in plotting graphs with group-specific ICCs and PDFs, which are saved in the working directory.

Options

format(str) specifies the file format in which the DIF graphs are saved (png|gph|eps).
Default value is format(png).

colors(str) is used to override default color codes used for group-specific ICC and PDF lines.
By default, the plots in the reference group are red, and the plots in the focal group are blue.
It requires a pair of color names separated by spaces.
The first color applies to the reference group, the second applies to the focal group.

tw(twoway_options) it is used to add user-defined twoway graph options to override the default graph layout,
like: xtitle() or scheme() etc.

cleargraphs is used to suppress the dafault behaviour of storing all DIF graphs in Stata memory.
After specifying this, all graphs are still saved in the current working directory, but only the last graph is active in Stata.

Examples

Setup

. webuse masc2

Fit a 2-group IRT model with default settings of uirt using items q1-q9 and female variable for grouping

. uirt q*,gr(female)

Analyze DIF only for item q1

. uirt_dif q1

Perform DIF analysis for all items, change graph scheme and group-specific coloring of plots

. uirt_dif *, tw(scheme(sj)) c(gs2 gs6)

Stored results

uirt_dif stores the following in r():

Matrices

r(dif_results) LR test results and effect size measures after DIF analysis

r(dif_item_par_GR) parameters of DIF items obtained in the reference group

r(dif_item_par_GF) parameters of DIF items obtained in the focal group

Author

Bartosz Kondratek
everythingthatcounts@gmail.com

References

Wainer, H. 1993.
Model-Based Standardized Measurement of an Item's Differential Impact.
In: Differential Item Functioning.
ed. Holland, P. W. & Wainer, H., 123-136.
Hillsdale: Lawrence Erlbaum.