# Hcurve: Construct grid of 101 values of the fitting function In TestGardener: Optimal Analysis of Test and Rating Scale Data

 Hcurve R Documentation

## Construct grid of 101 values of the fitting function

### Description

A fast grid of values of the fitting function or one of its first two derivatives is constructed for use in function `thetasearch`.

### Usage

```  Hcurve(WfdList, U, nderiv=0)
```

### Arguments

 `WfdList` A list vector containing specifications of surprisal curves for each item. `U` A N by n matrix containing indices of chosen items for each test taker. `nderiv` Integer 0, 1 or 2 to indicate which level of derivative to use.

### Value

A vector of length 101 containing grid values of a derivative of the fitting function

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

`thetasearch`

### Examples

```#  Compute a grid of values of the objective function for locating each
#  examinee or respondent for the 24-item short form of the SweSAT quantitative
# test on the percentile score index continuum [0,100].
WfdList <- Quantshort_parList\$WfdList
theta   <- Quantshort_parList\$theta
U       <- Quantshort_dataList\$U
n       <- ncol(U)
#  Fitting function for the first examinee
j <- 1
Umat    <- matrix(U[j,],1,n)
Hcurve1   <- Hcurve(WfdList, Umat, 0)
#  First derivative of the fitting function for the first examinee
DHcurve1  <- Hcurve(WfdList, Umat, 1)
#  Second derivative of the fitting function for the first examinee
D2Hcurve1 <- Hcurve(WfdList, Umat, 2)
par(mfrow=c(3,1))
indfine <- seq(0,100,len=101)
plot(indfine, Hcurve1,   type="l", xlab="", ylab="Fitting curve",
main="Examinee 1")
plot(indfine, DHcurve1,  type="l", xlab="", ylab="First derivative")
points(theta[1], 0, pch="o")
abline(0,0,lty=2)
plot(indfine, D2Hcurve1, type="l", xlab="Score index", ylab="Second derivative")
abline(0,0,lty=2)
points(theta[1], 0, pch="o")
par(oldpar)
```

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