View source: R/generateHelpers.R
pX | R Documentation |
returns response probabilities for given response x to an item.
pX(x, probs)
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. |
a 1 x 1 matrix giving the response probability of x.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.