dirf {lazy.irt} R Documentation

## Calculation of Derivative of Item Response Function

### Description

Calculation of Derivative of Item Response Function

### Usage

```dirf(
param,
theta = NULL,
weight = NULL,
zero = 1,
smallP = 1e-09,
thmin = -4,
thmax = 4,
npoints = 21,
DinP = 1,
numderiv = 0,
eps = 1e-06,
log = 0,
print = 1,
debug = 0,
plot = 0
)
```

### Arguments

 `param` Item Parameter Data Frame `theta` Discrete theta values `weight` Weight data frame `zero` = 0 to exclude the xzero-th category from output `smallP` Minimum value of probability `thmin` Minimum value of discrete thata value `thmax` Maximum value of discrete thata value `npoints` # of discrete points for theta `DinP` = 1 to include D=1.7 in logistic function `numderiv` = 1 to use numerical derivatives `eps` eps for JacobianMat `log` = 1 to calculate log derivatives `print` = 1 to print result `debug` = 1 to print intemediate result `plot` = 1 to plot result

### Value

A list of
dICRF, dIRF, dTRF, fromP, toP=toP, vecv, minscore_i, maxscore_i, minscore_t, maxscore_tt, log
where
dICRF npoints x sum(ncat)
dIRF npoints x nitems weighted by item category weight
dTRF npoints x 1 weighted by item category weight
and item weight
fromP, toP location of each item category in dICRF
vectorize category weights
minscore_i mimimum score of each item
maxscore_i maximum score of each item
minscore_t mimimum score of test
maxscore_t maximum score of test
Note that when log=1, dICRF etc are the log derivatives, namely, the derivative of log ICRF w.r.t. theta, etc.

### Examples

```dirf( paramS1, plot=1 )

# compare analytic and numeric derivative
res1=dirf( paramS1, print=0, plot=0 )\$dICRF
res2=dirf( paramS1, print=0, numderiv=1, plot=0 )\$dICRF
Print(max(abs(res1-res2)))

```

[Package lazy.irt version 0.1.3 Index]