pX function

pX

pX

returns response probabilities for given response x to an item.

pX(x, probs)

Arguments

  • x: a scalar integer - a response to an item (usually in the range 0, k-1, where k is the number of response categories).
  • probs: a matrix returned from simplef.

Returns

a 1 x 1 matrix giving the response probability of x.

Examples

myTheta <- 0 myDelta <- 1.5 k <- 3 a <- 1.25 itemParamX <- seq(0, k-1, 1) itemParamD <- rep(myDelta, k) itemParamT <- c(0, -0.5, 0.5) itemParamA <- rep(a, k) itemParam <- cbind(itemParamX, itemParamD, itemParamT, itemParamA) colnames(itemParam)<- c("x", "d", "t", "a") myProbs <- simplef(myTheta, itemParam) myProb <- pX(0, myProbs)
  • Maintainer: Dan Cloney
  • License: GPL-3
  • Last published: 2025-02-19