fitG2P_ls {lazy.irt} | R Documentation |
Conversion of Partial Credit Items to Logistic Graded Response Items
fitG2P_ls(paramP, theta = NULL, init = 1, method = 0, wtype = 1, wmean = 0, wsd = 1, DinP = 1, npoints = 21, thmin = -3, thmax = 3, maxiter = 500, eps = 1e-06, print = 1, plot = 0)
paramP |
Item Parameter Data Frame for 2PLM or GPCM Items |
theta |
Vector of theta points |
init |
= 1 to use fitP2G, else use equally spaced b-parameters |
method |
= 0 to use icrf to calculate rmse (default) |
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 thata value |
thmax |
Maximum value of discrete thata value |
maxiter |
Maximum # of GN iterations |
eps |
Convergence criterion for the relative improvement of rmse |
print |
>= 1 to print result |
plot |
>= 1 to plot result |
This function finds the set of GRM item paramters
which best fit the given icrfs or item info functions of the items
in the imput parameter data frame.
If method = 0, this function minimizes
sum( w*( vec(icrf_P(theta)) - vec(icrf_GRM(theta)) )^2 )
with respect to the GRM item parameters,
where icrf_P(theta)
is the icrf of input GPCM items,
icrf_GRM(theta)
is the icrf of fitted GRM items,
and w
is the weight vector ( N(wmean,wsd^2) or 1 ).
If method = 1, this function minimizes
sum( w*( vec(info_i(theta)) - vec(info_i_GRM(theta)) )^2 )
with respect to the GRM item parameters,
where info_i(theta)
is the item infomation function
of input GPCM items and
info_i_GRM(theta)
is the item infomation function of
fitted GRM items.
If method = 2, this function minimizes
sum( w*( vec(info_ic(theta)) - vec(info_ic_GRM(theta)) )^2 )
with respect to the GRM item parameters,
where info_ic(theta)
is the item category infomation function
of input GPCM items and
info_ic_GRM(theta)
is the item category infomation function* of
fitted GRM items.
When 3PLM items are included, 2PLM will be fitted.
Weighted Gauss-Newton method is used for the minimization.
A list of:
paramP: Input GPCM item parameter data frame (subset, type="P")
paramG: GRM Item Parameter Data Frame (type="G")
grad: Gradient matrix
wtype, wmean, wsd, method, init
rmse_p: rmse in terms of icrf (method=0)
rmse_ii: rmse in terms of item infomation (method=1)
rmse_iic: rmse in terms of item category infomation* (method=2)
icrfP, infoP, iteminfoP
icrfG, infoG, iteminfoG
paramP1 <- fitP2G_ls( paramS2, plot=1, print=1 )$paramP paramG1 <- fitG2P_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 <- fitG2P_ls( param, theta, maxiter=20, plot=1, wtype=1, method=0 ) res1 <- fitG2P_ls( param, theta, maxiter=20, plot=1, wtype=1, method=1 ) Print(res0$rmse_p, res0$rmse_iic, res0$rmse_ii) Print(res1$rmse_p, res1$rmse_iic, res1$rmse_ii)