Learn R Programming

difNLR (version 1.3.7)

logLik.difORD: Loglikelihood and information criteria for an object of "difORD" class.

Description

S3 methods for extracting loglikelihood, Akaike's information criterion (AIC) and Schwarz's Bayesian criterion (BIC) for an object of "difORD" class.

Usage

# S3 method for difORD
logLik(object, item = "all", ...)

# S3 method for difORD AIC(object, item = "all", ...)

# S3 method for difORD BIC(object, item = "all", ...)

Arguments

object

an object of "difORD" class.

item

numeric or character: either character "all" to apply for all converged items (default), or a vector of item names (column names of Data), or item identifiers (integers specifying the column number).

...

other generic parameters for S3 methods.

See Also

difORD for DIF detection among ordinal data. logLik for generic function extracting loglikelihood. AIC for generic function calculating AIC and BIC.

Examples

Run this code
# NOT RUN {
# Loading data
data(dataMedicalgraded, package = "ShinyItemAnalysis")
Data <- dataMedicalgraded[, 1:5]
group <- dataMedicalgraded[, 101]

# Testing both DIF effects with adjacent category logit model
(x <- difORD(Data, group, focal.name = 1, model = "adjacent"))

# AIC, BIC, log-likelihood
AIC(x)
BIC(x)
logLik(x)

# AIC, BIC, log-likelihood for the first item
AIC(x, item = 1)
BIC(x, item = 1)
logLik(x, item = 1)
# }

Run the code above in your browser using DataLab