Title: | A Penalty Approach to Differential Item Functioning in Rasch Models |
---|---|
Description: | Performs DIFlasso as proposed by Tutz and Schauberger (2015) <doi:10.1007/s11336-013-9377-6>, a method to detect DIF (Differential Item Functioning) in Rasch Models. It can handle settings with many variables and also metric variables. |
Authors: | Gunther Schauberger |
Maintainer: | Gunther Schauberger <[email protected]> |
License: | GPL-2 |
Version: | 1.0-4 |
Built: | 2024-11-03 06:27:39 UTC |
Source: | CRAN |
A package to perform DIFlasso, a method to detect DIF (Differential Item Functioning) in Rasch Models. It can handle settings with many covariates and also metric covariates. The method is described is Tutz and Schauberger (2015). Also a refit function is provided.
The main function is DIFlasso
. The method assumes the DIFmodel from Tutz and Schauberger (2015) where a Group Lasso penalty is used for DIF detection.
Computation is based on the function grplasso
. refitDIFlasso
provides a refit function for DIFlasso
. Additionally, plot and print functions are provided.
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
DIFlasso
, refitDIFlasso
, grplasso
A function to perform DIFlasso, a method to detect DIF (Differential Item Functioning) in Rasch Models. It can handle settings with many covariates and also metric covariates. The method is described in Tutz and Schauberger (2015).
DIFlasso(Y, X, l.lambda = 20, grouped = TRUE, trace = FALSE, df.type = c("YuanLin", "L2norm"))
DIFlasso(Y, X, l.lambda = 20, grouped = TRUE, trace = FALSE, df.type = c("YuanLin", "L2norm"))
Y |
Data frame (one row per person, one column per item) containing response. May only contain 0 or 1. |
X |
Data frame (one row per person, one column per covariate) containing covariates. Has to be standardized. |
l.lambda |
Length of the grid of tuning parameters for DIFlasso. Default is 20 different tuning parameters. |
grouped |
Should all parameters corresponding to one item be grouped? If |
trace |
Should the trace of the |
df.type |
Specifies the type of degrees of freedom. Default is to the definition of degrees of freedom by Yuan and Lin (2006).
If |
The method assumes the DIFmodel from Tutz and Schauberger (2015) where a Group Lasso penalty is used for DIF detection. Computation is based on the function grplasso
.
theta |
Estimated person abilities; one row per person, one column per tuning parameter |
beta |
Estimated item difficulties; one row per item, one column per tuning parameter |
gamma |
Estimated item-specific parameters; one row per item and covariate, one column per tuning parameter (first line: first item, first covariate; second line: first item, second covariate and so on) |
P |
Number of (valid) persons; removed persons are found in removed.persons |
I |
Number of items |
m |
Number of covariates |
logLik |
Log-likelihood |
BIC |
BIC |
AIC |
AIC |
df |
Degrees of freedom |
refit.matrix |
Design matrix for function |
lambda |
Sequence of tuning parameters used by |
ref.item |
Reference item |
dif.mat |
Estimates of the item-specific parameter estimates (at BIC-optimal lambda) |
dif.items |
Which items have been detected to be DIF items (at BIC-optimal lambda)? |
names.y |
Names of the items |
names.x |
Names of the covariates |
removed.persons |
Which persons have been removed because they either solved no item or all items? |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
Yuan, Ming and Lin, Yi (2006): Model selection and estimation in regression with grouped variables,
Journal of the Royal Statistical Society B, 68(1), 49 - 67
refitDIFlasso
, plot.DIFlasso
, print.DIFlasso
, grplasso
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Plots the estimates of the item-specific parameters of a DIFlasso object.
## S3 method for class 'DIFlasso' plot(x, decreasing = TRUE, ...)
## S3 method for class 'DIFlasso' plot(x, decreasing = TRUE, ...)
x |
DIFlasso object, created by |
decreasing |
Should the covariates be arranged by decreasing euclidian norm of their parameter estimates. |
... |
Further arguments to be passed to the |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Plots the estimates of the item-specific parameters of a DIFlasso.refit object.
## S3 method for class 'DIFlasso.refit' plot(x, decreasing = TRUE, ...)
## S3 method for class 'DIFlasso.refit' plot(x, decreasing = TRUE, ...)
x |
DIFlasso.refit object, created by |
decreasing |
Should the covariates be arranged by decreasing euclidian norm of their parameter estimates. |
... |
Further arguments to be passed to the |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
refitDIFlasso
, print.DIFlasso.refit
, DIFlasso
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Prints the most important output of a DIFlasso object.
## S3 method for class 'DIFlasso' print(x, ...)
## S3 method for class 'DIFlasso' print(x, ...)
x |
DIFlasso object, created by |
... |
Further arguments to be passed to the |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Prints the most important output of a DIFlasso.refit object.
## S3 method for class 'DIFlasso.refit' print(x, ...)
## S3 method for class 'DIFlasso.refit' print(x, ...)
x |
DIFlasso.refit object, created by |
... |
Further arguments to be passed to the |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
refitDIFlasso
, plot.DIFlasso.refit
, DIFlasso
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Performs the refit of a DIFlasso object. Only the items diagosed as DIF items will be used to perform a new fit of the final model.
refitDIFlasso(dif.obj)
refitDIFlasso(dif.obj)
dif.obj |
DIFlasso object, created by |
theta |
Estimated person abilities after refit |
beta |
Estimated item difficulties after refit |
gamma |
Estimated item-specific parameters after refit; one row per covariate, one column per item |
P |
Number of persons |
I |
Number of items |
m |
Number of covariates |
ref.item |
Reference item |
dif.items |
Which items have been detected to be DIF items? |
names.y |
Names of the items |
names.x |
Names of the covariates |
Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
print.DIFlasso.refit
, plot.DIFlasso.refit
, DIFlasso
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
Simulated data set with 100 persons, 10 items and 3 (standardized) covariates. Items 1, 2 and 3 are DIF items.
data(simul.data)
data(simul.data)
Item1
Item 1, DIF item
Item2
Item 2, DIF item
Item3
Item 3, DIF item
Item4
Item 4, non-DIF item
Item5
Item 5, non-DIF item
Item6
Item 6, non-DIF item
Item7
Item 7, non-DIF item
Item8
Item 8, non-DIF item
Item9
Item 9, non-DIF item
Item10
Item 10, non-DIF item
CovBin1
Binary covariate (standardized)
CovBin2
Binary covariate (standardized)
CovMet
Metric covariate (standardized)
Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)
## Not run: data(simul.data) Y <- simul.data[,1:10] X <- simul.data[,11:13] m1 <- DIFlasso(Y = Y, X = X, trace = TRUE) print(m1) plot(m1) m2 <- refitDIFlasso(m1) print(m2) plot(m2) ## End(Not run)