est_rank {lazy.irt}R Documentation

Estimation of the Latent Rank of LRT Model

Description

Estimation of the Latent Rank of LRT Model

Usage

est_rank(
  Uc = NULL,
  U = NULL,
  V = NULL,
  alpha = rep(1, ncol(V)),
  vmin = 1e-04,
  vmax = 1 - vmin,
  rho = NULL,
  print = 0,
  plot = 0,
  title = NULL
)

Arguments

Uc

Item Response Data in compressed format

U

Item Response Data

V

LRT Item Parameter Matrix: nitem x nclass

alpha

= vector of Dirichle parameters of length nclass
or a number A to set alpha=rep(A,nclass)
or a negative number -A to set alpha=A*normal pdf

vmin

minimum value of V

vmax

maximum value of V

rho

initial value of probability vector of each latent class.

print

= 1 to print the result

plot

= 1 to plot the estimated theta distributions

title

Title strings

Details

Note that uLRT returns the V as the nclass x nitem data frame, whereas in this function V is defined as nitem x nclass. (sorry!)

The core part of uLRT, namely, the E-step, is used in this function.

The rank of a person i is defined as the location of the highest posterior probability of H[i,].

Value

A list of:
rank The estimated rank: nrow(Uc) x 1
H The posterior probability matrix: nrow(Uc) x nclass
rho The prior probability of the class:
alpha The prior of rho:
nclass The number of classes
method EAP

Examples

#### In the following examples, maxiter is set to 20 which is
#### not large enough to obtain convergence.
####
#
#
#
set.seed(1701)

param=paramB1[c(1:3,7:9,13:15),]
thmin=-2; thmax=2; npoint=5
N=1000

# discrete theta
# theta0=seq(thmin,thmax,length=npoint)
theta0=c(-2, -1, 0, 2, 3)
theta=unlist(lapply( theta0, rep, round(N/npoint) ))
res2 <- gendataIRT( 1, paramB1, theta=theta, compress=1 )
Uc=as.data.frame(res2$U)
ncat=res2$ncat
type=res2$type

nclass=5
res1 <- uLRT( Uc, nclass=nclass, estrho=1, monotone=1, alpha=20
, maxiter=20, plot=1, print=1 )
V1=res1$V[,seq(2,2*res1$nitems,2)]
res <- est_rank( Uc=Uc, V=t(V1), print=1, alpha=-4, plot=1, title="Test" )


[Package lazy.irt version 0.1.6 ]