fitP2G_ls {lazy.irt}R Documentation

Conversion of Graded Response Items to Generalized Partial Credit Items

Description

Conversion of Graded Response Items to Generalized Partial Credit Items

Usage

fitP2G_ls(
  paramG,
  theta = NULL,
  init = 1,
  paramP = NULL,
  method = 0,
  wtype = 1,
  wmean = 0,
  wsd = 1,
  DinP = 1,
  npoints = 21,
  thmin = -3,
  thmax = 3,
  printGN = 0,
  maxiter = 500,
  eps = 1e-06,
  epsg = 1e-06,
  epsx = 1e-09,
  print = 1,
  plot = 0
)

Arguments

paramG

Item Parameter Data Frame with item types:
"Bn","B3","Bn3","G","Gn"

theta

Vector of theta points

init

= 1 to use fitP2G, else use equally spaced b-parameters

paramP

initial parameter data frame. This has priority over init.

method

= 0 to use icrf to calculate rmse (default)
= 1 to use item info to calculate rmse,
= 2 to use item category info* to calculate rmse

wtype

= 0 not to use dnorm(theta) as the weight

wmean

The mean of normal distribution to be used as the weight

wsd

The sd of normal distribution to be used as the weight

DinP

= 1 to include D=1.7 in logistic function

npoints

# of discrete points for theta

thmin

Minimum value of discrete theta value

thmax

Maximum value of discrete theta value

printGN

print level for lazy.mat::GN function

maxiter

Maximum # of GN iterations

eps

Convergence criterion for the relative improvement of rmse

epsg

Convergence crit for the maximum absolute value of the gradient

epsx

Convergence crit for the maximum absolute change of the parameter value

print

>= 1 to print result

plot

>= 1 to plot result

Details

This function finds the set of GPCM item paramters which best fit the given icrfs or item info functions of the items in the input parameter data frame.

If method = 0, this function minimizes
sum( w*( vec(icrf(theta)) - vec(icrf_GPCM(theta|PARAM)) )^2 )
with respect to the GPCM item parameters, PARAM,
where icrf(theta) is the icrf of the input items,
icrf_GPCM(theta|PARAM) is the icrf of the fitted GPCM items,
and w is the weight vector ( N(wmean,wsd^2) or 1 ).

If method = 1, this function minimizes
sum( w*( info_i(theta) - info_i_GPCM(theta|PARAM) )^2 )
with respect to the GPCM item parameters, PARAM,
where info_i(theta) is the item information function of input items and
info_i_GPCM(theta|PARAM) is the item information function of the fitted GPCM items.

If method = 2, this function minimizes
sum( w*( vec(info_ic(theta)) - vec(info_ic_GPCM(theta|PARAM)) )^2 )
with respect to the GPCM item parameters, PARAM,
where info_ic(theta) is the item category information function of input items and
info_ic_GPCM(theta|PARAM) is the item category information function of the fitted GPCM items.


When three parameter binary items are included, 2PLM will be fitted.
Weighted Gauss-Newton method (lazy.mat::GN) is used for the minimization with the numerical Jacobian matrix calculated by lazy.mat::JacobianMat.

Value

A list of:
paramNew: Fitted GPCM item parameter data frame
2PLM or 2PNM items remain unchaged.
paramG: Input GRM item parameter data frame
grad: Gradient matrix
wtype, wmean, wsd, method, init
rmse_p: rmse in terms of icrf (method=0)
rmse_ii: rmse in terms of item information (method=1)
rmse_iic: rmse in terms of item category information* (method=2)
icrfNew, icifNew, iifNew
icrfOld, icifOld, iifOld

Examples

paramP1 <- fitP2G_ls( paramS2, plot=1, print=1 )$paramNew
paramG1 <- fitGn2P_ls( paramP1, plot=1, print=1 )

# convert 3PLM and GPCM items
param <- paramA1[c(2,5,8),]
theta <- seq(-4,4,length=51)

# maxiter below is too small!!
res0 <- fitP2G_ls( param, theta, maxiter=20, plot=1, wtype=1, method=0 )
res1 <- fitP2G_ls( param, theta, maxiter=20, plot=1, wtype=1, method=1 )
res2 <- fitP2G_ls( param, theta, maxiter=3, plot=1, wtype=1, method=2 )

Print(res0$rmse_p, res0$rmse_iic, res0$rmse_ii)
Print(res1$rmse_p, res1$rmse_iic, res1$rmse_ii)
Print(res2$rmse_p, res2$rmse_iic, res2$rmse_ii)



[Package lazy.irt version 0.1.6 ]