ordinal_reg {lazy.irtx} | R Documentation |
This program regresses R on x where R is the length(x) x ncat matrix.
ordinal_reg(R, x, type = "P", param = NULL, maxiter = 100, eps = 1e-08, epsd = 1e-05, smallP = 0, DinP = 1, minp1 = 0.01, maxabsparam = 20, print = 1)
R |
A matrix consisting of frequency of criterion variable:
lenght(x) x ncat |
x |
A vector or matrix of unidimensional regressor variable |
type |
Item type "B", "B3", "G", "P", "PN", "N" |
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 |
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])
A list of:
param Parameter data frame
llh Maximized log likelihood
P Probability at x
x input
g gradient
R input
maxag Maximum of absolute gradient values
# 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=ordinal_reg( testdata, theta, type="B3", param=NULL, print=1 ) # 2PLM res=ordinal_reg( testdata, theta, type="B", param=NULL, print=1 ) res=ordinal_reg( testdata, theta, type="P", param=NULL, print=1 ) # 2PLM with nonzero c parameter initp=paramS1[2,]; initp$type="B" res=ordinal_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 ) # graded response model res=ordinal_reg( testdata, theta, type="G", param=NULL, print=1 ) # partial credit model res=ordinal_reg( testdata, theta, type="P", param=NULL, print=1 ) res=ordinal_reg( testdata, theta, type="PN", param=NULL, print=1 )