esttheta {lazy.irtx}R Documentation

Estimation of Theta

Description

Estimation of Theta

Usage

esttheta(Uc = NULL, U = NULL, param = NULL, method = "EAP",
  theta = NULL, thd = NULL, thmin = -4, thmax = 4, npoints = 21,
  thmean = 0, thsd = 1, print = 0)

Arguments

Uc

The compressed item response data.

U

The uncompressed item response data.

param

The parameter data frame.

method

= "EAP" or "ML" (ML is not yet availble.)

theta

Discrete theta values.

thd

pdf of theta normalized to sum to unity.
When NULL, N(0,1) will be used.
When thd == 1, locally uniform prior will be used.

thmin

Minimum value of discrete thata value.

thmax

Maximum value of discrete thata value.

npoints

# of discrete points for theta.

thmean

The prior mean of normal theta distribution.

thsd

The prior standard deviation of normal theta distribution.

print

= 1 to print the result.

Details

The core part of EAP is as follows:

H=exp( logP%*%t(U)+log(thd) )
H=H%*%diag(1/colSums(H))
thetahat=t( t(theta)%*%H )

where logP is the log of irf, U is the un-compressed item response, and thd is the normalized prior theta pdf.
The second line normalizes the posterior distribution of theta given U stored in H matrix.
The third line calculates the posterior mean.

When thd is a scalar, the locally uniform theta distribution is used.

Value

A list of
thetahat Estimated theta valuesr
theta Theta values for EAP
thd Theta disrtibution for EAP
method
thmin
thmax
npoints
thmean
thsd

Examples


# compressed item response at equally spaced 101 theta points in [-3,3]
set.seed(1701)
resg <- gendataIRT( 1, paramS3, npoints=101, compress=1 )
Uc <- resg$U
theta <- resg$theta
res <- esttheta( Uc, param=paramS3, print=1 )
plot(theta,res$thetahat)

# uncompressed item response at equally spaced 101 theta points in [-3,3]
set.seed(1701)
resg <- gendataIRT( 1, paramS3, npoints=101, compress=0 )
U <- resg$U
theta <- resg$theta
res <- esttheta( U=U, param=paramS3, print=1 )
plot(theta,res$thetahat)

# 100 normally distriuted theta
set.seed(1701)
resg <- gendataIRT( 1, paramS3, npoints=100, compress=1, thdist="rnorm" )
Uc <- resg$U
theta <- resg$theta
res <- esttheta( Uc=Uc, param=paramS3, print=1 )
plot(theta,res$thetahat)


[Package lazy.irtx version 1.0.1 Index]