Learn R Programming

mirt (version 1.17.1)

empirical_ES: Empirical effect sizes based on latent trait estimates

Description

Computes effect size measures of differential item functioning and differential test/bundle functioning based on expected scores from Meade (2010). Item parameters from both reference and focal group are used in conjunction with focal group empirical theta estimates (and an assumed normally distributed theta) to compute expected scores.

Usage

empirical_ES(mod, Theta.focal = NULL, focal_items = 1L:extract.mirt(mod,
  "nitems"), DIF = TRUE, npts = 61, theta_lim = c(-6, 6), ref.group = 1,
  plot = FALSE, par.strip.text = list(cex = 0.7), digits = 3,
  par.settings = list(strip.background = list(col = "#9ECAE1"), strip.border =
  list(col = "black")), ...)

Arguments

mod
a multipleGroup object which estimated only 2 groups
Theta.focal
an optional matrix of Theta values from the focal group to be evaluated. If not supplied the default values to fscores will be used in conjunction with the ... arguments passed
focal_items
a numeric vector indicating which items to include the tests. The default uses all of the items. Selecting fewer items will result in tests of 'differential bundle functioning' when DIF = FALSE
DIF
logical; return a data.frame of item-level imputation properties? If FALSE, only DBF and DTF statistics will be reported
npts
number of points to use in the integration. Default is 61
theta_lim
lower and upper limits of the latent trait (theta) to be evaluated, and is used in conjunction with npts
ref.group
either 1 or 2 to indicate which group is considered the 'reference' group. Default is 1
plot
logical; plot expected scores of items/test where expected scores are computed using focal group thetas and both focal and reference group item parameters
par.strip.text
plotting argument passed to lattice
digits
number of digits to round the output, default is 3
par.settings
plotting argument passed to lattice
...
additional arguments to be passed to fscores and xyplot

References

Meade, A. W. (2010). A taxonomy of effect size measures for the differential functioning of items and scales. Journal of Applied Psychology, 95, 728-743.

Examples

Run this code
#no DIF
set.seed(12345)
a <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d <- matrix(rnorm(15,0,.7),ncol=1)
itemtype <- rep('dich', nrow(a))
N <- 1000
dataset1 <- simdata(a, d, N, itemtype)
dataset2 <- simdata(a, d, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('Ref', N), rep('Focal', N))

mod <- multipleGroup(dat, 1, group = group,
   invariance = c(colnames(dat)[1:5], 'free_means', 'free_var'))
coef(mod, simplify=TRUE)

empirical_ES(mod)
empirical_ES(mod, DIF=FALSE)
empirical_ES(mod, DIF=FALSE, focal_items = 10:15)

empirical_ES(mod, plot=TRUE)
empirical_ES(mod, plot=TRUE, DIF=FALSE)

###---------------------------------------------
# DIF
set.seed(12345)
a1 <- a2 <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d1 <- d2 <- matrix(rnorm(15,0,.7),ncol=1)
a2[10:15,] <- a2[10:15,] + rnorm(6, 0, .3)
d2[10:15,] <- d2[10:15,] + rnorm(6, 0, .3)
itemtype <- rep('dich', nrow(a1))
N <- 1000
dataset1 <- simdata(a1, d1, N, itemtype)
dataset2 <- simdata(a2, d2, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('Ref', N), rep('Focal', N))

mod <- multipleGroup(dat, 1, group = group,
   invariance = c(colnames(dat)[1:5], 'free_means', 'free_var'))
coef(mod, simplify=TRUE)

empirical_ES(mod)
empirical_ES(mod, DIF = FALSE)
empirical_ES(mod, plot=TRUE)
empirical_ES(mod, plot=TRUE, DIF=FALSE)

Run the code above in your browser using DataLab