Learn R Programming

difNLR (version 1.3.0)

startNLR: Calculates starting values for Non-Linear Regression DIF models.

Description

Calculates starting values for difNLR function based on linear approximation.

Usage

startNLR(Data, group, model, match = "zscore", parameterization = "alternative",
simplify = F)

Arguments

Data

numeric: a matrix or data.frame of binary data.

group

numeric: binary vector of group membership. "0" for reference group, "1" for focal group.

model

character: generalized logistic regression model to be fitted. See Details.

match

vector of matching criterion. Its length need to be the same as number of observations in Data.

parameterization

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

simplify

logical: whether initial values should be simplified into the table. This is only applicable when parameterization is the same for all items.

Value

A list containing elements representing items. Each element is a named numeric vector of length 8 with initial values for difNLR model.

Details

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.

References

Drabinova, A. & Martinkova P. (2017). Detection of Differential Item Functioning with NonLinear Regression: Non-IRT Approach Accounting for Guessing. Journal of Educational Measurement, 54(4), 498-517, https://doi.org/10.1111/jedm.12158.

See Also

difNLR

Examples

Run this code
# NOT RUN {
# loading data based on GMAT
data(GMAT)

Data  <- GMAT[, 1:20]
group <- GMAT[, "group"]

# starting values for 3PL model
startNLR(Data, group, model = "3PL")

# starting values for 3PL model
# simplified into single table
startNLR(Data, group, model = "3PL", simplify = T)

# starting values for 3PL model
# with score as matching criterion
startNLR(Data, group, model = "3PL", match = "score")

# starting values for model specified for each item
startNLR(Data, group,
         model = c(rep("1PL", 5), rep("2PL", 5),
                   rep("3PL", 5), rep("4PL", 5)))

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab