formulaNLR {difNLR}R Documentation

Formula for non-linear regression DIF model.

Description

Function returns the formula of the non-linear regression DIF model based on model specification and DIF type to be tested.

Usage

formulaNLR(model, constraints = NULL, type = "all", parameterization = "classic", outcome)

Arguments

model

character: generalized logistic regression model for which starting values should be estimated. See Details.

constraints

character: which parameters should be the same for both groups. Possible values are any combinations of parameters "a", "b", "c", and "d". Default value is NULL. See Details.

type

character: type of DIF to be tested. Possible values are "all" for detecting difference in any parameter (default), "udif" for uniform DIF only (i.e., difference in difficulty parameter "b"), "nudif" for non-uniform DIF only (i.e., difference in discrimination parameter "a"), "both" for uniform and non-uniform DIF (i.e., difference in parameters "a" and "b"), or combination of parameters "a", "b", "c", and "d". Can be specified as a single value (for all items) or as an item-specific vector.

parameterization

character: parameterization of regression coefficients. Possible options are "classic" (IRT parameterization), "alternative" (default) and "logistic" (logistic regression). See Details.

outcome

character: name of outcome to be printed in formula. If not specified "y" is used.

Details

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 by default standardized total score (also called Z-score) and g is a group membership. Parameters a, b, c, and d are discrimination, difficulty, guessing, and inattention. Terms aDif, bDif, cDif, and dDif then represent differences between two groups (reference and focal) in relevant parameters.

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.

Three possible parameterization can be specified in "parameterization" argument: "classic" returns IRT parameters of reference group and differences in these parameters between reference and focal group. "alternative" returns IRT parameters of reference group, the differences in parameters "a" and "b" between two groups and parameters "c" and "d" for focal group. "logistic" returns parameters in logistic regression parameterization and it is available only for 2PL model.

Value

A list of two models. Both includes formula, parameters to be estimated and their lower and upper constraints.

Author(s)

Adela Hladka (nee Drabinova)
Institute of Computer Science of the Czech Academy of Sciences
Faculty of Mathematics and Physics, Charles University
hladka@cs.cas.cz

Patricia Martinkova
Institute of Computer Science of the Czech Academy of Sciences
martinkova@cs.cas.cz

See Also

difNLR

Examples

# 3PL model with the same guessing for both groups
# to test both types of DIF
formulaNLR(model = "3PLcg", type = "both")

# 4PL model with the same guessing and inattention
# to test uniform DIF
formulaNLR(model = "4PLcgdg", type = "udif")

# 2PL model to test non-uniform DIF
formulaNLR(model = "2PL", type = "nudif")

# 4PL model to test all possible DIF
# with alternative parameterization
formulaNLR(model = "4PL", type = "all", parameterization = "alternative")

# 4PL model with fixed a and c parameter
# to test difference in b with alternative parameterization
formulaNLR(model = "4PL", constraints = "ac", type = "b", parameterization = "alternative")

# 2PL model with logistic parameterization
formulaNLR(model = "2PL", parameterization = "logistic")

[Package difNLR version 1.4.2-1 Index]