thetasearch: Ensure that estimated score index is global

View source: R/thetasearch.R

thetasearchR Documentation

Ensure that estimated score index is global

Description

Multiple minima are found quite often in the data fitting function that is minimized using function thetafun, and in roughly 10 percent of the estimates there is a minimum that it lower than that detected. The function searches a mesh of 101 points for minima, computes the fitting function at the minima, and assigns the location of the global minimum as the replacement theta if the location differs by more than 0.5 from the value identified by thetafun. The function values and their first two derivatives are also replaced.

Usage

  thetasearch(WfdList, U, theta, Hval, DHval, D2Hval, thetaind=1:N)

Arguments

WfdList

A list vector containing specifications of surprisal curves for each item.

U

An N by n matrix containing indices of chosen items for each test taker.

theta

A vector containing all the score index values.

Hval

A vector containing the N function values.

DHval

A vector containing the N first derivative values.

D2Hval

A vector containing the N second derivative values.

thetaind

A vector containing indices of values to be processed.

Value

A named list object containing objects produced from analyzing the simulations, one set for each simulation:

theta:

A vector containing all the score index values including those that are altered.

Hval:

A vector containing the N function values included those that are altered.

DHval:

A vector containing the N first derivative values included those that are altered.

D2Hval:

A vector containing the N second derivative values included those that are altered.

changeindex:

Indices of the theta values that are altered

Author(s)

Juan Li and James Ramsay

References

Ramsay, J. O., Li J. and Wiberg, M. (2020) Full information optimal scoring. Journal of Educational and Behavioral Statistics, 45, 297-315.

Ramsay, J. O., Li J. and Wiberg, M. (2020) Better rating scale scores with information-based psychometrics. Psych, 2, 347-360.

http://testgardener.azurewebsites.net

See Also

thetafun

Examples

#  Search for values of theta that are not at the global minimum of the
#  fitting function and replace them as well as their function and
#  derivative values associated with the fine grid value nearest the 
#  the global minimum.
WfdList <- Quantshort_parList$WfdList
theta   <- Quantshort_parList$theta
Hval    <- Quantshort_parList$Hval
DHval   <- Quantshort_parList$DHval
D2Hval  <- Quantshort_parList$D2Hval
U       <- Quantshort_dataList$U
Result  <- thetasearch(WfdList, U, theta, Hval, DHval, D2Hval, thetaind=1:1000)
changeindex <- Result$changeindex
print(paste("Number changed =",length(changeindex)))
change  <- theta[changeindex] - Result$theta[changeindex]
oldpar <- par(no.readonly=TRUE)
hist(change,101)
par(oldpar)

TestGardener documentation built on Jan. 16, 2023, 1:06 a.m.