discr_test | R Documentation |

Computes gradient (GR), likelihood ratio (LR), Rao score (RS) and Wald (W) test of hypothesis of equal item discriminations against the alternative that at least one item discriminates differently (only for binary data).

```
discr_test(X)
```

`X` |
Data matrix. |

The tests are based on the following model suggested in Draxler, Kurz, Gürer, and Nolte (2024)

` \text{logit} \big( E(Y) \big ) = \tau + \alpha + \delta (r - 1), `

where `E(Y)`

ist the expected value of a binary response (of a person to an item),
`r = 1, \dots, k - 1`

is the person score, i.e., number of correct responses of that person
when responding to `k`

items, `\tau`

is the respective person parameter and `\alpha`

and
`\delta`

are two parameters referring to the respective item. The parameter `\alpha`

represents a baseline, i.e., the easiness or attractiveness of the respective item in person score
group `r = 1`

. The parameter `\delta`

denotes the constant change of the attractiveness of that
item between successive person score groups. Thus, the model assumes a linear effect of the person
score `r`

on the logit of the probability of a correct response.

The four test statistics are derived from a conditional likelihood function in which the
`\tau`

parameters are eliminated by conditioning on the observed person scores.
The hypothesis to be tested is formally given by setting all `\delta`

parameters equal to `0`

.
The alternative assumes that at least one `\delta`

parameter is not equal to `0`

.

A list of test statistics, degrees of freedom, and p-values.

`test` |
A numeric vector of gradient (GR), likelihood ratio (LR), Rao score (RS), and Wald test statistics. |

`df` |
A numeric vector of corresponding degrees of freedom. |

`pvalue` |
A vector of corresponding p-values. |

`call` |
The matched call. |

Draxler, C., Kurz. A., Gürer, C., & Nolte, J. P. (2024). An improved inferential procedure to evaluate item discriminations in a conditional maximum likelihood framework. Manuscript submitted for publication.

`invar_test`

, `change_test`

, and `LLTM_test`

.

```
## Not run:
##### Dataset PISA Mathematics data.pisaMath {sirt} #####
library(sirt)
data(data.pisaMath)
y <- data.pisaMath$data[, grep(names(data.pisaMath$data), pattern = "M" )]
res <- discr_test(X = y)
# $test
# GR LR RS W
# 72.430 73.032 76.725 73.470
#
# $df
# GR LR RS W
# 10 10 10 10
#
# $pvalue
# GR LR RS W
# "< 0.001" "< 0.001" "< 0.001" "< 0.001"
#
# $call
# discr_test(X = y)
## End(Not run)
```

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.