Learn R Programming

GDINA (version 1.4.2)

dif: Differential item functioning for cognitive diagnosis models

Description

This function is used to detect differential item functioning based on the models estimated in the GDINA function using the Wald test (Hou, de la Torre, & Nandakumar, 2014)

Usage

dif(dat, Q, group, method = "wald", p.adjust.methods = "bonferroni",
  LR.type = "free.all", difitem = "all", parm = "delta", digits = 4,
  SE.type = 2, ...)

# S3 method for dif summary(object, ...)

Arguments

dat
A required \(N \times J\) matrix or data.frame consisting of the responses of \(N\) individuals to \(J\) items. Missing values need to be coded as NA.
Q
A required \(J \times K\) item or category and attribute association matrix, wher \(J\) represents the number of items or nonzero categories and \(K\) represents the number of attributes. For binary attributes, entry 1 indicates that the attribute is measured by the item, and 0 otherwise. For polytomous attributes, non-zero elements indicate the level of attributes that are needed for an individual to answer the item correctly (see Chen, & de la Torre, 2013). Note that for polytomous items, the sequential G-DINA model is used and either restricted or unrestricted category-level Q-matrix is needed. In the category-level Q-matrix, the first column gives the item number, which must be numeric and match the number of column in the data. The second column indicates the category number. See Examples.
group
a scalar indicating which column in dat is group indicator or a numerical vector indicating the group each individual belongs to. If it is a vector, its length must be equal to the number of individuals. Only at most two groups can be handled currently.
method
DIF detection method; It can be "wald" for Hou, de la Torre, and Nandakumar's (2014) Wald test method, and "LR" for likelihood ratio test.
p.adjust.methods
adjusted p-values for multiple hypothesis tests. This is conducted using p.adjust function in stats, and therefore all adjustment methods supported by p.adjust can be used, including "holm", "hochberg", "hommel", "bonferroni", "BH" and "BY". See p.adjust for more details. "bonferroni" is the default.
LR.type
Type of likelihood ratio test for DIF detection. It can be 'free.all' or 'free.one'.
difitem
Items for the DIF detection. By default, all items will be examined.
parm
The type of parameters associated with the Wald test for the DIF detection. It can be either "itemprob" or "delta" for item probabilities and delta parameters, respectively.
digits
How many decimal places in each number? The default is 4.
SE.type
Type of standard error estimation methods for the Wald test.
...
Other arguments passed to GDINA function for model calibration
object
estimated GDINA object for various S3 methods

Value

A data frame giving the Wald statistics and associated p-values.

Methods (by generic)

  • summary: print summary information

References

Hou, L., de la Torre, J., & Nandakumar, R. (2014). Differential item functioning assessment in cognitive diagnostic modeling: Application of the Wald test to investigate DIF in the DINA model. Journal of Educational Measurement, 51, 98-125.

See Also

GDINA

Examples

Run this code
## Not run: ------------------------------------
# set.seed(123456)
# N <- 1000
# Q <- sim10GDINA$simQ
# gs <- matrix(c(0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2,
#                        0.1,0.2),ncol = 2, byrow = TRUE)
# # By default, individuals are simulated from uniform distribution
# # and deltas are simulated randomly
# sim1 <- simGDINA(N,Q,gs.parm = gs,model="DINA")
# sim2 <- simGDINA(N,Q,gs.parm = gs,model=c(rep("DINA",9),"DINO"))
# dat <- rbind(extract(sim1,"dat"),extract(sim2,"dat"))
# gr <- c(rep("male",N),rep("female",N))
# dif.out <- dif(dat,Q,group=gr)
# plotIRF(dif.out,4)
# dif.out2 <- dif(dat,Q,group=gr,method="LR")
## ---------------------------------------------

Run the code above in your browser using DataLab