testMI: Global MI test

Description Usage Arguments Value

View source: R/testMI.R

Description

Global measurement invariance (MI) tests for the common MI levels (configural, weak, strong, and strict). Can currently deal with multiple-group models (two or more groups) for metric items or dichotomous items (Rasch, 2PL, or probit model).

Usage

1
2
3
4
5
6
7
res_testMI <- testMI(items = NULL,
                     data = NULL,
                     group = NULL,
                     MIlevel = NULL,
                     stdItems = TRUE,
                     itemType = "metric",
                     dichModel = "factor")

Arguments

items

Describes the measurement model. It can either be:

  • A vector of item names, e.g. c("item1", "item2", "item3", "item4")

  • A data frame section containing the items e.g. data[1:4]

This creates a single factor model out of the item names.

data

A data frame containing all the used variables. Missing values have to be declared as NA.

group

String, indicating the grouping variable.

MIlevel

String, indicating the level of MI to be tested. Can be either configural, weak, strong, or strict.

stdItems

Should continuous items be standardized? Defaults to TRUE. Useful for making DIF sizes comparable.

itemType

Can be "dichotomous" or "metric" (default).

dichModel

String indicating which measurement model is applied in the case of dichotomous items. Values are "factor" (default) for probit link via WLSMV in lavaan. "Rasch" or "2PL" for the respective IRT models to be estimated with the EM estimator in mirt.

Value

A list containing

Usually accessed via summary() or getModel().


Dani-Schulze/measurementInvariance documentation built on Jan. 28, 2022, 1:56 a.m.