invar_test: Test of invariance of item parameters between two groups.

View source: R/invar_test.R

invar_testR Documentation

Test of invariance of item parameters between two groups.

Description

Computes gradient (GR), likelihood ratio (LR), Rao score (RS) and Wald (W) test statistics for hypothesis of equality of item parameters between two groups of persons against a two-sided alternative that at least one item parameter differs between the two groups.

Usage

invar_test(X, splitcr = "median", model = "RM")

Arguments

X

Data matrix.

splitcr

Split criterion which is either "mean", "median" or a numeric vector x.

"mean"

Corresponds to division of the sample according to the mean of the person score.

"median"

Corresponds to division of the sample according to the median of the person score.

x

Has length equal to number of persons and contains zeros and ones. It indicates group membership for every person.

model

RM, PCM, RSM

Details

Note that items are excluded for the computation of GR, LR, and W due to inappropriate response patterns within subgroups and for computation of RS due to inappropriate response patterns in the total data. If the model is identified from the total data but not from one or both subgroups only RS will be computed. If the model is not identified from the total data, no test statistic is computable.

Value

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.

deleted_items

A list with numeric vectors of item numbers that were excluded before computing corresponding test statistics.

call

The matched call.

References

Draxler, C. (2010). Sample Size Determination for Rasch Model Tests. Psychometrika, 75(4), 708–724.

Draxler, C., & Alexandrowicz, R. W. (2015). Sample Size Determination Within the Scope of Conditional Maximum Likelihood Estimation with Special Focus on Testing the Rasch Model. Psychometrika, 80(4), 897–919.

Draxler, C., Kurz, A., & Lemonte, A. J. (2020). The Gradient Test and its Finite Sample Size Properties in a Conditional Maximum Likelihood and Psychometric Modeling Context. Communications in Statistics-Simulation and Computation, 1-19.

Glas, C. A. W., & Verhelst, N. D. (1995a). Testing the Rasch Model. In G. H. Fischer & I. W. Molenaar (Eds.), Rasch Models: Foundations, Recent Developments, and Applications (pp. 69–95). New York: Springer.

Glas, C. A. W., & Verhelst, N. D. (1995b). Tests of Fit for Polytomous Rasch Models. In G. H. Fischer & I. W. Molenaar (Eds.), Rasch Models: Foundations, Recent Developments, and Applications (pp. 325-352). New York: Springer.

See Also

change_test, and LLTM_test.

Examples

## Not run: 
##### Rasch Model #####
y <- eRm::sim.rasch(persons = rnorm(400), c(0,-3,-2,-1,0,1,2,3))
x <- c(rep(1,200),rep(0,200))

res <- invar_test(y, splitcr = x, model = "RM")

res$test # test statistics
res$df # degrees of freedoms
res$pvalue # p-values
res$deleted_items # excluded items

$test
  GR    LR    RS     W
14.492 14.083 13.678 12.972

$df
GR LR RS  W
7  7  7  7

$pvalue
  GR    LR    RS     W
"0.043" "0.050" "0.057" "0.073"

$deleted_items
 $deleted_items$GR
 [1] "none"

 $deleted_items$LR
 [1] "none"

 $deleted_items$RS
 [1] "none"

 $deleted_items$W
 [1] "none"


$call
invar_test(X = y, splitcr = x, model = "RM")


## End(Not run)

tcl documentation built on Sept. 17, 2024, 1:08 a.m.