Learn R Programming

conquestr (version 0.9.96)

pX: pX

Description

returns response probabilities for given response _x_ to an item.

Usage

pX(x, probs)

Value

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

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.

Examples

Run this code
myTheta<- 0
myDelta<- 1.5
x<- 2
k <- 3
itemParamX<- seq(0, k-1, 1)
itemParamD<- rep(myDelta, k)
itemParamT<- c(0, -0.5, 0.5)
itemParam<- cbind(itemParamX, itemParamD, itemParamT)
colnames(itemParam)<- c("x", "d", "t")
myProbs<- simplef(myTheta, itemParam)
myProb<- pX(0, myProbs)

Run the code above in your browser using DataLab