esttheta {lazy.irtx} | R Documentation |
Estimation of Theta
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)
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. |
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. |
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.
A list of
thetahat Estimated theta valuesr
theta Theta values for EAP
thd Theta disrtibution for EAP
method
thmin
thmax
npoints
thmean
thsd
# 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)