Learn R Programming

difNLR (version 1.3.0)

ORD: DDF likelihood ratio statistics for ordinal data.

Description

Calculates DDF likelihood ratio statistics for ordinal data based either on adjacent logistic regression model or on cumulative logistic regression model.

Usage

ORD(Data, group, model = "adjacent", type = "both", match = "zscore",
anchor = 1:ncol(Data), p.adjust.method = "none", parametrization = "irt",
alpha = 0.05)

Arguments

Data

matrix or data.frame: the ordinarily scored data matrix.

group

numeric or character: the binary vector of group membership

model

character: logistic regression model for ordinal data (either "adjacent" (default) or "cumulative"). See Details.

type

character: type of DDF to be tested (either "both" (default), "udif", or "nudif"). See Details.

match

specifies matching criterion. Can be either "zscore" (default, standardized total score), "score" (total test score), or vector of the same length as number of observations in Data. See Details.

anchor

a vector of integers specifying which items are currently considered as anchor (DDF free) items. By default, all items are considered as anchors. Argument is ignored if match is not "zscore" or "score". See Details.

p.adjust.method

character: method for multiple comparison correction. See Details.

parametrization

character: parametrization of regression coefficients. Possible options are "irt" (default) and "classic". See Details.

alpha

numeric: significance level (default is 0.05).

Value

A list with the following arguments:

Sval

the values of likelihood ratio test statistics.

pval

the p-values by likelihood ratio test.

adj.pval

the adjusted p-values by likelihood ratio test using p.adjust.method.

df

the degress of freedom of likelihood ratio test.

par.m0

the estimates of null model.

par.m1

the estimates of alternative model.

se.m0

standard errors of parameters in null model.

se.m1

standard errors of parameters in alternative model.

ll.m0

log-likelihood of null model.

ll.m1

log-likelihood of alternative model.

AIC.m0

AIC of null model.

AIC.m1

AIC of alternative model.

BIC.m0

BIC of null model.

BIC.m1

BIC of alternative model.

Details

Calculates DDF likelihood ratio statistics for ordinal data based either on adjacent logistic regression model or on cumulative logistic regression model

The Data is a matrix or data.frame which rows represents examinee ordinarily scored answers and columns correspond to the items. The group must be a vector of the same length as nrow(Data).

The model corresponds to model to be used for DDF detection. Options are "adjacent" for adjacent logistic regression model or "cumulative" for cumulative logistic regression model.

The type corresponds to type of DDF to be tested. Possible values are "both" to detect any DDF (uniform and/or non-uniform), "udif" to detect only uniform DDF or "nudif" to detect only non-uniform DDF.

Argument match represents the matching criterion. It can be either the standardized test score (default, "zscore"), total test score ("score"), or any other continuous or discrete variable of the same length as number of observations in Data.

The p.adjust.method is a character for p.adjust function from the stats package. Possible values are "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", and "none". See also p.adjust for more information.

Argument parametrization is a character which specifies parametrization of regression parameters. Default option is "irt" which returns IRT parametrization (difficulty-discrimination). Option "classic" returns intercept-slope parametrization with effect of group membership and interaction with matching criterion.

See Also

p.adjust vglm

Examples

Run this code
# NOT RUN {
# loading data
data(dataMedicalgraded, package = "ShinyItemAnalysis")
df <- dataMedicalgraded[, c(1:5, 101)]
df <- df[complete.cases(df), ]

Data <- df[, 1:5]
group <- df[, 6]

# Testing both DDF effects
ORD(Data, group, type = "both")

# Testing uniform DDF effects
ORD(Data, group, type = "udif")

# Testing non-uniform DDF effects
ORD(Data, group, type = "nudif")

# Testing DDF using cumulative logit model
ORD(Data, group, model = "cumulative")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab