AlphaMLE {NPCD}R Documentation

Maximum likelihood estimation of attribute profile

Description

This function returns the model-based Maximum likelihood estimator(s) of the cognitive diagnostic attribute profile(s). Currently supported cognitive diagnostic models include the DINA, DINO, NIDA, GNIDA, and R-RUM models.

Usage

AlphaMLE(Y, Q, par, model = c("DINA", "DINO", "NIDA", "GNIDA", "RRUM"),
undefined.flag = NULL)

Arguments

Y

A matrix of binary responses. Rows represent persons and columns represent items. 1=correct, 0=incorrect.

Q

The Q-matrix of the test. Rows represent items and columns represent attributes. 1=attribute required by the item, 0=attribute not required by the item.

par

A list of parameters. DINA & DINO — par$slip: a vector of slipping parameters for each item; par$guess: a vector of guessing parameters for each item. NIDA — par$slip: a vector of slipping parameters for each attribute; par$guess: a vector of guessing parameters for each attribute. GNIDA — par$slip: a matrix (items by attributes) of slipping parameters; par$guess: a matrix (items by attributes) of guessing parameters. RRUM — par$pi: a vector of pi parameters for each item; par$r: a matrix (items by attributes) of r parameters.

model

Currently supports five models: "DINA", "DINO", "NIDA", "GNIDA", and "RRUM". The default is "DINA".

undefined.flag

A binary vector indicating whether the parameters of each item are undefined. 1=undefined, 0=defined. Generally, this argument is only needed in "JMLE" for the DINA and DINO models, where the data may generate undefined item parameters for some items.

Value

alpha.est

A matrix of estimated attribute profiles for all examinees. Rows represent persons and columns represent attributes. 1=examinee masters the attribute, 0=examinee does not master the attribute.

est.class

The class number (row index in pattern) for each person's attribute profile. It can also be used for locating the log-likelihood value in loglike.matrix for the estimated attribute profile for each person.

n.tie

Number of ties in the log-likelihood among the candidate attribute profiles for each person. When we encounter ties, one of the tied attribute profiles is randomly chosen.

class.tie

The class numbers (row index in pattern) of the tied patterns for each person.

pattern

All possible attribute profiles in the search space.

loglike.matrix

The matrix of the log-likelihood function values. Rows represent candidate attribute profiles in the same order with the pattern matrix; columns represent different examinees.

See Also

AlphaNP, JMLE, print.AlphaMLE, plot.AlphaMLE

Examples

# Generate item and examinee profiles

natt <- 3
nitem <- 4
nperson <- 5
Q <- rbind(c(1, 0, 0), c(0, 1, 0), c(0, 0, 1), c(1, 1, 1))
alpha <- rbind(c(0, 0, 0), c(1, 0, 0), c(0, 1, 0), c(0, 0, 1), c(1, 1, 1))

# Generate DINA model-based response data

slip <- c(0.1, 0.15, 0.2, 0.25)
guess <- c(0.1, 0.15, 0.2, 0.25)
my.par <- list(slip=slip, guess=guess)

data <- matrix(NA, nperson, nitem)
eta <- matrix(NA, nperson, nitem)

for (i in 1:nperson) {
  for (j in 1:nitem) {
  eta[i, j] <- prod(alpha[i,] ^ Q[j, ])
  P <- (1 - slip[j]) ^ eta[i, j] * guess[j] ^ (1 - eta[i, j])
  u <- runif(1)
  data[i, j] <- as.numeric(u < P)
  }
}

# Using the function to estimate examinee attribute profile

alpha.est.MLE <- AlphaMLE(data, Q, my.par, model="DINA", undefined.flag=NULL)

nperson <- 1   # Choose an examinee to investigate
print(alpha.est.MLE)   # Print the estimated examinee attribute profiles
plot(alpha.est.MLE, nperson)   # Plot the sorted log-likelihood function 
#of different attribute profiles for this examinee
ItemFit(alpha.est.MLE)

[Package NPCD version 1.0-11 Index]