thetasearch | R Documentation |

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.

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

`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. |

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

Juan Li and James Ramsay

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

`thetafun`

# 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)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.