gen.rec.raw()
. Those probabilities are grouped according to the cut scores and used to estimate the indices.Lee.poly.D(cutscore, Pij, quadrature)
Lee.poly.P(cutscore, Pij, theta)
irf
(See example for irf
). Should not include 0 or the max total score, as the end points are added theta
and each column represents a response category from 0, 1, ..., M. At a minimum, M=1, in whichPij
.Pij
.class.Lee
. Requires the user build the Pij
array.#Same example as \code{class.Lee()},
#build \code{Pij} the same as in the example for \code{gen.rec.raw()}.
params <- matrix(c(1,1,1,1,-2,1,0,1,0,0,0,0),4,3)
theta <- rnorm(100)
Pij.flat <- irf(params, theta)$f
Pij.array <- array(NA, dim = c(length(theta), 2, nrow(params)))
Pij.array[,1,] <- 1 - Pij.flat #P(X_j = 0 | theta_i)
Pij.array[,2,] <- Pij.flat #P(X_j = 1 | theta_i)
Lee.poly.P(2, Pij.array, theta)$Marginal
#in the dichotomous case, identical to \code{Lee.P()}
Lee.P(2, params, theta)$Marginal
#For Rudner and polytomous tests, compute the theta estimate and se and use those as input
theta.est <- theta
#just for example
theta.se <- SEM(params, theta.est)
#also for example, SEM() assumes 3PL model,
#but if you use mirt or similar package,
#the theta estimates and their se will be available
Rud.P(.5, theta.est, theta.se)$Marginal
Run the code above in your browser using DataLab