Learn R Programming

cacIRT (version 1.3)

recursive.raw: Recursive computation of conditional total score

Description

Returns probabilities of each possible total score conditional on theta

Usage

recursive.raw(theta, ip, D = 1.7)
gen.rec.raw(Pij, theta)

Arguments

theta
Vector of ability estimates or points to condition on.
ip
Jx3 matrix of item parameters, columns are discrimination, difficulty, and guessing; in that order.
D
The scaling constant for the IRT parameters, defaults to 1.7, alternatively often set to 1.
Pij
An array with N rows, nk (maximum number of options) columns, and I slices giving the probabilites Prob(X_i = x_i | theta_p) Each element is the probability that person p produces that column response for the item i. For binary response the dimensions wou

Value

  • A matrix of theta points by possible score 0,1, . . . ,J.

Examples

Run this code
params <- matrix(c(1,1,1,1,-2,1,0,1,0,0,0,0),4,3)
x <- c(-1,0,1)

rec.mat <- recursive.raw(x, params)

#same results with gen.rec.raw
Pij <- array(NA,dim = c(3,2,4))

Pi1 <- irf(params, x)$f
Pij[,2,] <- Pi1
Pij[,1,] <- 1-Pi1

rec.arr <- gen.rec.raw(Pij,x)

Run the code above in your browser using DataLab