[Updated: Mon, Sep 09, 2024 - 16:17:16 ]
For a more detailed introduction to the Continuous Response Model (CRM), you can visit this webpage. The webpage includes a thorough explanation of the model, theoretical background, and step-by-step instructions for fitting the model using Stan.
This tutorial will focus on demonstrating how to use the
EstCRM
package for parameter estimation.
The EstCRM
package provides functions to estimate
parameters for the Samejima’s Continuous Response Model (CRM) via
marginal maximum likelihood estimation (MMLE) using the EM algorithm.
The package allows users to estimate item and person parameters,
evaluate item fit, draw 3D item response curves, and simulate data.
Before starting, make sure the EstCRM
package is
installed and loaded in your R environment.
EstCRMitem()
functionLet’s start by estimating item parameters using the dataset EPIA, which contains five items scored on a continuous scale. The data is part of the package. This dataset came from a published study and was kindly provided by Dr. Ferrando. A group of 1,033 undergraduate students were asked to check on a 112 mm line segment with two end points (almost never, almost always) using their own judgement for the five items taken from the Spanish version of the EPI-A impulsivity subscale. The direct item score was the distance in mm of the check mark from the left end point (Ferrando, 2002).
Item 1 Item 2 Item 3 Item 4 Item 5
1 96 36 80 78 79
2 42 2 1 1 1
3 64 23 36 13 38
4 100 51 106 57 100
5 10 5 65 4 5
6 59 24 94 98 8
# Estimate the item parameters using the EM algorithm
item_params <- EstCRMitem(data = EPIA, # name of the data object
max.item = c(112, 112, 112, 112, 112), # maximum possible scores for each item
min.item = c(0, 0, 0, 0, 0), # minimum possible scores for each item
max.EMCycle = 500, # maximum number of EM Cycles used in the iteration
converge = 0.01) # a criteria value to stop the iterations
a b alpha
Item 1 0.3936515 -0.6227676 0.5909740
Item 2 0.5488338 1.2989984 0.7308399
Item 3 0.3237673 0.2345860 0.6453405
Item 4 0.6716827 0.3938068 0.9431497
Item 5 0.6257708 0.3434715 0.9207525
EstCRMperson
functionAfter estimating item parameters, we can estimate person ability
parameters (theta) using the EstCRMperson
function. The
person parameters can be computed once the item parameters are
available.
person_params <- EstCRMperson(data = EPIA,
ipar = item_params$param,
min.item = c(0, 0, 0, 0, 0),
max.item = c(112, 112, 112, 112, 112))
head(person_params$thetas)
ID Theta Est. SE
[1,] 1 0.9312717 0.844024
[2,] 2 -3.3614597 0.844024
[3,] 3 -0.6677924 0.844024
[4,] 4 1.3604088 0.844024
[5,] 5 -2.2138824 0.844024
[6,] 6 0.1266354 0.844024
fitCRM
functionWe can compute standardized item fit residual statistics using the
fitCRM
function. This helps evaluate how well the model
fits the data.
fit_results <- fitCRM(data = EPIA,
ipar = item_params$param,
est.thetas = person_params,
max.item = c(112, 112, 112, 112, 112),
group = 10)
fit_results$fit.stat
Interval Item 1 Item 2 Item 3 Item 4 Item 5
1 [-4.0181,-1.1942) -1.45143844 -3.01690372 -0.40029903 -4.2565439 -3.0294800
2 [-1.1942,-0.6966) -1.54678085 -3.85137876 -1.58804063 -3.3288077 -1.1705703
3 [-0.6966,-0.4089) -1.69734103 -1.55421943 -0.25656567 -1.9057811 -1.8149335
4 [-0.4089,-0.1684) 0.01903143 -0.38121111 -0.43256256 -2.1753252 -1.6593802
5 [-0.1684, 0.0069) -1.37108233 0.16710882 -0.58557165 -1.1529211 -0.3688963
6 [ 0.0069, 0.2119) 1.14313230 -1.06618349 -0.02597409 1.4699836 -1.6993331
7 [ 0.2119, 0.4129) 0.16552552 0.05034679 0.83018669 1.0502129 0.2855006
8 [ 0.4129, 0.6869) 1.30145827 0.13672627 1.27529422 0.7535152 1.5924874
9 [ 0.6869, 1.1658) 1.73386923 1.16269310 1.20611990 2.9094727 1.8243255
10 [ 1.1658, 4.2982] 1.62353722 1.18093996 1.78517290 2.4141479 4.5241244