Description Usage Arguments Details Value Author(s) References See Also Examples

Performs DIF detection procedure based on Non-Linear Regression model (generalized logistic regression) and either likelihood-ratio or F test of submodel.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
difNLR(Data, group, focal.name, model, constraints, type = "both",
match = "zscore", anchor = NULL, purify = FALSE, nrIter = 10, test = "LR",
alpha = 0.05, p.adjust.method = "none", start)
## S3 method for class 'difNLR'
print(x, ...)
## S3 method for class 'difNLR'
plot(x, plot.type = "cc", item = "all",
col = c("dodgerblue2", "goldenrod2"), shape = 21, size = 0.8,
linetype = c(2, 1), title, ...)
## S3 method for class 'difNLR'
fitted(object, item = "all", ...)
## S3 method for class 'difNLR'
predict(object, item = "all", score, group, ...)
## S3 method for class 'difNLR'
coef(object, ...)
## S3 method for class 'difNLR'
logLik(object, ...)
## S3 method for class 'difNLR'
AIC(object, ...)
## S3 method for class 'difNLR'
BIC(object, ...)
``` |

`Data` |
numeric: either the scored data matrix only, or the scored data
matrix plus the vector of group. See |

`group` |
numeric or character: either the binary vector of group membership or
the column indicator (in |

`focal.name` |
numeric or character: indicates the level of |

`model` |
character: generalized logistic regression model to be fitted. See |

`constraints` |
character: which parameters should be the same for both groups. See |

`type` |
character: type of DIF to be tested. Possible values are |

`match` |
specifies matching criterion. Can be either |

`anchor` |
Either |

`purify` |
logical: should the item purification be applied? (default is |

`nrIter` |
numeric: the maximal number of iterations in the item purification (default is 10). |

`test` |
character: test to be performed for DIF detection (either |

`alpha` |
numeric: significance level (default is 0.05). |

`p.adjust.method` |
character: method for multiple comparison correction. See |

`start` |
numeric: matrix with n rows (where n is the number of items) and 8 columns
containing initial item parameters estimates. See |

`x` |
an object of 'difNLR' class |

`...` |
other generic parameters for |

`plot.type` |
character: type of plot to be plotted (either |

`item` |
either character ( |

`col` |
character: single value, or vector of two values representing colors for plot. |

`shape` |
integer: shape parameter for plot. |

`size` |
numeric: single number, or vector of two numbers representing line width in plot. |

`linetype` |
numeric: single number, or vector of two numbers representing line type in plot for reference and focal group. |

`title` |
string: title of plot. |

`object` |
an object of 'difNLR' class |

`score` |
numeric: standardized total score of subject. |

DIF detection procedure based on Non-Linear Regression is the extension of Logistic Regression procedure (Swaminathan and Rogers, 1990).

The `Data`

is a matrix whose rows represents scored examinee answers ("1" correct,
"0" incorrect) and columns correspond to the items. In addition, `Data`

can hold
the vector of group membership. If so, `group`

is a column indicator of `Data`

.
Otherwise, `group`

must be either a vector of the same length as `nrow(Data)`

.

The unconstrained form of 4PL generalized logistic regression model for probability of correct answer (i.e., y = 1) is P(y = 1) = (c + cDif*g) + (d + dDif*g - c - cDif*g)/(1 + exp(-(a + aDif*g)*(x - b - bDif*g))), where x is standardized total score (also called Z-score) and g is group membership. Parameters a, b, c and d are discrimination, difficulty, guessing and inattention. Parameters aDif, bDif, cDif and dDif then represetn differences between two groups in discrimination, difficulty, guessing and inattention.

This 4PL model can be further constrained by `model`

and `constraints`

arguments.
The arguments `model`

and `constraints`

can be also combined.

The `model`

argument offers several predefined models. The options are as follows:
`Rasch`

for 1PL model with discrimination parameter fixed on value 1 for both groups,
`1PL`

for 1PL model with discrimination parameter fixed for both groups,
`2PL`

for logistic regression model,
`3PLcg`

for 3PL model with fixed guessing for both groups,
`3PLdg`

for 3PL model with fixed inattention for both groups,
`3PLc`

(alternatively also `3PL`

) for 3PL regression model with guessing parameter,
`3PLd`

for 3PL model with inattention parameter,
`4PLcgdg`

for 4PL model with fixed guessing and inattention parameter for both groups,
`4PLcgd`

(alternatively also `4PLd`

) for 4PL model with fixed guessing for both groups,
`4PLcdg`

(alternatively also `4PLc`

) for 4PL model with fixed inattention for both groups,
or `4PL`

for 4PL model.

The `model`

can be specified in more detail with `constraints`

argument which specifies what
arguments should be fixed for both groups. For example, choice `"ad"`

means that discrimination (a) and
inattention (d) are fixed for both groups and other parameters (b and c) are not.

The `type`

corresponds to type of DIF to be tested. Possible values are
`"both"`

to detect any DIF caused by difference in difficulty or discrimination (i.e., uniform and/or non-uniform),
`"udif"`

to detect only uniform DIF (i.e., difference in difficulty b),
`"nudif"`

to detect only non-uniform DIF (i.e., difference in discrimination a), or
`"all"`

to detect DIF caused by difference caused by any parameter that can differed between groups. The `type`

of DIF can be also specified in more detail by using combination of parameters a, b, c and d. For example, with an option
`"c"`

for 4PL model only the difference in parameter c is tested.

Argument `match`

represents the matching criterion. It can be either the standardized test score (default, `"zscore"`

),
total test score (`"score"`

), or any other continuous or discrete variable of the same length as number of observations
in `Data`

. Matching criterion is used in `NLR()`

function as a covariate in non-linear regression model.

A set of anchor items (DIF free) can be specified through the `anchor`

argument. It need to be a vector of either
item names (as specified in column names of `Data`

) or item identifiers (integers specifying the column number).
In case anchor items are provided, only these items are used to compute matching criterion `match`

. If the `match`

argument is not either `"zscore"`

or `"score"`

, `anchor`

argument is ignored. When anchor items are
provided, purification is not applied.

The `p.adjust.method`

is a character for `p.adjust()`

function from the `stats`

package. Possible values are `"holm"`

, `"hochberg"`

, `"hommel"`

,
`"bonferroni"`

, `"BH"`

, `"BY"`

, `"fdr"`

, `"none"`

.

The `start`

is a matrix with a number of rows equal to number of items and with 8 columns.
First 4 columns represent parameters (a, b, c, d) of generalized logistic regression model
for reference group. Last 4 columns represent differences of parameters (aDif, bDif, cDif, dDif)
of generalized logistic regression model between reference and focal group. If not specified, starting
values are calculated with `startNLR()`

function.

The output of the difNLR is displayed by the `print.difNLR()`

function.

Two types of plots are available. The first one is obtained by setting `plot.type = "cc"`

(default). The characteristic curve for item specified in `item`

option is plotted. For default
option `"all"`

of item, characteristic curves of all converged items are plotted. The drawn
curves represent best model.
The second plot is obtained by setting `plot.type = "stat"`

. The test statistics
(either LR-test, or F-test, depends on argument `test`

) are displayed on the Y axis,
for each coverged item. The detection threshold is displayed by a horizontal line and items
detected as DIF are printed with the red color. Only parameters `size`

and `title`

are used.

Fitted values are extracted by the `fitted.difNLR()`

function for item(s) specified in
`item`

argument.

Predicted values are produced by the `predict.difNLR()`

function for item(s) specified in
`item`

argument. `score`

represents standardized total score of new subject and
`group`

argument represents group membership of new subject.

Missing values are allowed but discarded for item estimation. They must be coded as
`NA`

for both, `data`

and `group`

parameters.

In case that model considers difference in guessing or inattention parameter, the different parameterization is used and parameters with standard errors are recalculated by delta method. However, covariance matrices stick with alternative parameterization.

A list of class 'difNLR' with the following arguments:

`Sval`

the values of likelihood ratio test statistics.

`nlrPAR`

the estimates of final model.

`nlrSE`

the standard errors of estimates of final model.

`parM0`

the estimates of null model.

`seM0`

the standard errors of estimates of null model.

`covM0`

the covariance matrices of estimates of null model.

`parM1`

the estimates of alternative model.

`seM1`

the standard errors of estimates of alternative model.

`covM1`

the covariance matrices of estimates of alternative model.

`alpha`

numeric: significance level.

`DIFitems`

either the column indicators of the items which were detected as DIF, or

`"No DIF item detected"`

.`match`

matching criterion.

`model`

fitted model.

`type`

character: type of DIF that was tested. If parameters were specified, the value is

`"other"`

.`types`

character: the parameters (specified by user,

`type`

has value`"other"`

) which were tested for difference.`p.adjust.method`

character: method for multiple comparison correction which was applied.

`pval`

the p-values by likelihood ratio test.

`adj.pval`

the adjusted p-values by likelihood ratio test using

`p.adjust.method`

.`df`

the degress of freedom of likelihood ratio test.

`test`

used test.

`purification`

`purify`

value.`nrPur`

number of iterations in item purification process. Returned only if

`purify`

is`TRUE`

.`difPur`

a binary matrix with one row per iteration of item purification and one column per item. "1" in i-th row and j-th column means that j-th item was identified as DIF in i-1-th iteration. Returned only if

`purify`

is`TRUE`

.`conv.puri`

logical indicating whether item purification process converged before the maximal number

`nrIter`

of iterations. Returned only if`purify`

is`TRUE`

.`group`

the vector of group membership.

`Data`

the data matrix.

`conv.fail`

numeric: number of convergence issues.

`conv.fail.which`

the indicators of the items which did not converge.

`llM0`

log-likelihood of null model.

`llM1`

log-likelihood of alternative model.

`AICM0`

AIC of null model.

`AICM1`

AIC of alternative model.

`BICM0`

BIC of null model.

`BICM1`

BIC of alternative model.

Adela Drabinova

Institute of Computer Science, The Czech Academy of Sciences

Faculty of Mathematics and Physics, Charles University

[email protected]

Patricia Martinkova

Institute of Computer Science, The Czech Academy of Sciences

[email protected]

Karel Zvara

Faculty of Mathematics and Physics, Charles University

Drabinova, A. & Martinkova P. (2017). Detection of Differential Item Functioning with NonLinear Regression: Non-IRT Approach Accounting for Guessing. Journal of Educational Measurement. Accepted.

Drabinova, A. & Martinkova P. (2016). Detection of Differenctial Item Functioning Based on Non-Linear Regression, Technical Report, V-1229, http://hdl.handle.net/11104/0259498.

Swaminathan, H. & Rogers, H. J. (1990). Detecting Differential Item Functioning Using Logistic Regression Procedures. Journal of Educational Measurement, 27, 361-370.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ```
## Not run:
# loading data based on GMAT
data(GMAT)
Data <- GMAT[, 1:20]
group <- GMAT[, "group"]
# Testing both DIF effects using likelihood-ratio test and
# 3PL model with fixed guessing for groups
(x <- difNLR(Data, group, focal.name = 1, model = "3PLcg"))
# Testing both DIF effects using F test and
# 3PL model with fixed guessing for groups
difNLR(Data, group, focal.name = 1, model = "3PLcg", test = "F")
# Testing both DIF effects using LR test,
# 3PL model with fixed guessing for groups
# and Benjamini-Hochberg correction
difNLR(Data, group, focal.name = 1, model = "3PLcg", p.adjust.method = "BH")
# Testing both DIF effects using LR test,
# 3PL model with fixed guessing for groups
# and item purification
difNLR(Data, group, focal.name = 1, model = "3PLcg", purify = T)
# Testing both DIF effects using 3PL model with fixed guessing for groups
# and total score as matching criterion
difNLR(Data, group, focal.name = 1, model = "3PLcg", match = "score")
# Testing uniform DIF effects using 4PL model with the same
# guessing and inattention
difNLR(Data, group, focal.name = 1, model = "4PLcgdg", type = "udif")
# Testing non-uniform DIF effects using 2PL model
difNLR(Data, group, focal.name = 1, model = "2PL", type = "nudif")
# Testing difference in parameter b using 4PL model with fixed
# a and c parameters
difNLR(Data, group, focal.name = 1, model = "4PL", constraints = "ac", type = "b")
# Graphical devices
plot(x)
plot(x, item = x$DIFitems)
plot(x, plot.type = "stat")
# Fitted values
fitted(x)
fitted(x, item = 1)
# Predicted values
predict(x)
predict(x, item = 1)
# Predicted values for new subjects
predict(x, item = 1, score = 0, group = 1)
predict(x, item = 1, score = 0, group = 0)
# AIC, BIC, logLik
AIC(x)
BIC(x)
logLik(x)
## End(Not run)
``` |

difNLR documentation built on Aug. 29, 2017, 5:03 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.