Package 'DIFlasso'

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

Help Index


DIFlasso

Description

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.

Details

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.

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

DIFlasso, refitDIFlasso, grplasso


A Penalty Approach to Differential Item Functioning in Rasch Models

Description

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).

Usage

DIFlasso(Y, X, l.lambda = 20, grouped = TRUE, trace = FALSE, 
         df.type = c("YuanLin", "L2norm"))

Arguments

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 grouped = FALSE, ordinary Lasso instead of GroupLasso is performed.

trace

Should the trace of the grplasso function be printed?

df.type

Specifies the type of degrees of freedom. Default is to the definition of degrees of freedom by Yuan and Lin (2006). If df.type = "L2norm", for every group (or parameter if grouped = FALSE), the ratio between the L2-norm of the penalized parameters and the parameters from the lowest tuning parameter is taken as degrees of freedom.

Details

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.

Value

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 refitDIFlasso

lambda

Sequence of tuning parameters used by grplasso

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?

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

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

See Also

refitDIFlasso, plot.DIFlasso, print.DIFlasso, grplasso

Examples

## 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)

Plot Function for DIFlasso

Description

Plots the estimates of the item-specific parameters of a DIFlasso object.

Usage

## S3 method for class 'DIFlasso'
plot(x, decreasing = TRUE, ...)

Arguments

x

DIFlasso object, created by DIFlasso

decreasing

Should the covariates be arranged by decreasing euclidian norm of their parameter estimates.

...

Further arguments to be passed to the plot function.

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

DIFlasso, print.DIFlasso

Examples

## 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)

Plot Function for refitDIFlasso

Description

Plots the estimates of the item-specific parameters of a DIFlasso.refit object.

Usage

## S3 method for class 'DIFlasso.refit'
plot(x, decreasing = TRUE, ...)

Arguments

x

DIFlasso.refit object, created by refitDIFlasso

decreasing

Should the covariates be arranged by decreasing euclidian norm of their parameter estimates.

...

Further arguments to be passed to the plot function.

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

refitDIFlasso, print.DIFlasso.refit, DIFlasso

Examples

## 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)

Print Function for DIFlasso

Description

Prints the most important output of a DIFlasso object.

Usage

## S3 method for class 'DIFlasso'
print(x, ...)

Arguments

x

DIFlasso object, created by DIFlasso

...

Further arguments to be passed to the print function.

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

DIFlasso, plot.DIFlasso

Examples

## 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)

Print Function for refitDIFlasso

Description

Prints the most important output of a DIFlasso.refit object.

Usage

## S3 method for class 'DIFlasso.refit'
print(x, ...)

Arguments

x

DIFlasso.refit object, created by refitDIFlasso

...

Further arguments to be passed to the print function.

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

refitDIFlasso, plot.DIFlasso.refit, DIFlasso

Examples

## 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)

Refit Function for DIFlasso

Description

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.

Usage

refitDIFlasso(dif.obj)

Arguments

dif.obj

DIFlasso object, created by DIFlasso

Value

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

Author(s)

Gunther Schauberger
gunther.schauberger@tum
https://www.sg.tum.de/epidemiologie/team/schauberger/

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

See Also

print.DIFlasso.refit, plot.DIFlasso.refit, DIFlasso

Examples

## 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

Description

Simulated data set with 100 persons, 10 items and 3 (standardized) covariates. Items 1, 2 and 3 are DIF items.

Usage

data(simul.data)

Format

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)

References

Tutz, Gerhard and Schauberger, Gunther (2015): A Penalty Approach to Differential Item Functioning in Rasch Models, Psychometrika, 80(1), 21 - 43

Examples

## 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)