pX: pX

View source: R/generateHelpers.R

pXR Documentation

pX

Description

returns response probabilities for given response x to an item.

Usage

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.

Value

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)

conquestr documentation built on March 31, 2023, 6:02 p.m.