gordinal_reg {lazy.girt} R Documentation

## Oridinal Regression for the Generalized IRT Model

### Description

This program regresses R on x where R is the length(x) x ncat matrix.

### Usage

```gordinal_reg(R, X, type = "G", param = NULL, maxiter = 100, eps = 1e-08,
epsd = 1e-05, smallP = 0, DinP = 1, minp1 = 0.01, maxabsparam = 20,
print = 1)
```

### Arguments

 `R` A matrix consisting of frequency of criterion variable: lenght(x) x ncat R[,1] = Frequency of the zero-th category at x, R[,2] = Frequency of the first category at x, up to R[,ncat] `X` A matrix of regressor variables The first column is the univariate regressor vector. The second column is the standard deviations associated with each obs. `type` Item type "B", "B3", "G" `param` A data frame containing the initial value of parameters, or NULL `maxiter` Max # of iterations `eps` Criterion for convergence in llh `epsd` Criterion for convergence in absolute value of parameter value `smallP` Smallest value of probability `DinP` = 0 to omit 1.7 `minp1` Min value of the slope parameter for type != "N" items. `maxabsparam` Max value of parameters `print` = 0 to surpress output

### Details

Let R be n x ncat matrix, and x, n x 1.
This function maximizes the following log likelihood w.r.t. item parameters.
llh = ∑_{i=1}^{n} ∑_{j=1}^{ncat} R[i,j] * \log( P_j(X[i])

### Value

A list of:
param Parameter data frame
llh Maximized log likelihood
P Probability at x
X input
R input
maxag Maximum of absolute gradient values

### Examples

```# binary data
set.seed(1701)
theta=seq(-4,4,length.out=51)
resg=gendataIRT( 500, paramS1[1,], theta=theta, thdist="NORMAL", thd=NULL
, thmean=0, thstd=1, compress=0 )
testdata=as.matrix( resg\$U )

# 3PLM
res=gordinal_reg( testdata, theta, type="B3", param=NULL, print=1 )
# 2PLM
res=gordinal_reg( testdata, theta, type="B", param=NULL, print=1 )
res=gordinal_reg( testdata, theta, type="P", param=NULL, print=1 )
# 2PLM with nonzero c parameter
initp=paramS1[2,]; initp\$type="B"
res=gordinal_reg( testdata, theta, type="B", param=initp, print=1 )

# polytomous data
set.seed(1701)
theta=seq(-4,4,length.out=51)
resg=gendataIRT( 500, paramS1[3,], theta=theta, thdist="NORMAL", thd=NULL
, thmean=0, thstd=1, compress=0 )
testdata=as.matrix( resg\$U )