Title: | Parameter Estimation of Item Response Theory with Estimation of Latent Distribution |
---|---|
Description: | Item response theory (IRT) parameter estimation using marginal maximum likelihood and expectation-maximization algorithm (Bock & Aitkin, 1981 <doi:10.1007/BF02293801>). Within parameter estimation algorithm, several methods for latent distribution estimation are available. Reflecting some features of the true latent distribution, these latent distribution estimation methods can possibly enhance the estimation accuracy and free the normality assumption on the latent distribution. |
Authors: | Seewoo Li [aut, cre, cph] |
Maintainer: | Seewoo Li <[email protected]> |
License: | GPL (>= 3) |
Version: | 2.1.0 |
Built: | 2025-02-22 22:50:38 UTC |
Source: | https://github.com/seewooli/irtest |
Ability parameter estimation when item responses and item parameters are given. This function can be useful in ability parameter estimation is adaptive testing.
adaptive_test( response, item, model = "dich", ability_method = "EAP", quad = NULL, prior = NULL )
adaptive_test( response, item, model = "dich", ability_method = "EAP", quad = NULL, prior = NULL )
response |
A matrix of item responses. For mixed-format test, a list of item responses where dichotomous item responses are the first element and polytomous item responses are the second element. |
item |
A matrix of item parameters. For mixed-format test, a list of item parameters where dichotomous item parameters are the first element and polytomous item parameters are the second element. |
model |
|
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
quad |
A vector of quadrature points for |
prior |
A vector of the prior distribution for |
theta |
The estimated ability parameter values. If |
theta_se |
The standard errors of ability parameter estimates.
It returns standard deviations of posteriors for |
Seewoo Li [email protected]
# dichotomous response <- c(1,1,0) item <- matrix( c( 1, -0.5, 0, 1.5, -1, 0, 1.2, 0, 0.2 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model = "dich", ability_method = "WLE") # polytomous response <- c(1,2,0) item <- matrix( c( 1, -0.5, 0.5, 1.5, -1, 0, 1.2, 0, 0.4 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model="GPCM", ability_method = "WLE") # mixed-format test response <- list(c(0,0,0),c(2,2,1)) item <- list( matrix( c( 1, -0.5, 0, 1.5, -1, 0, 1.2, 0, 0 ), nrow = 3, byrow = TRUE ), matrix( c( 1, -0.5, 0.5, 1.5, -1, 0, 1.2, 0, 0.4 ), nrow = 3, byrow = TRUE ) ) adaptive_test(response, item, model = "GPCM", ability_method = "WLE") # continuous response response <- c(0.88, 0.68, 0.21) item <- matrix( c( 1, -0.5, 10, 1.5, -1, 8, 1.2, 0, 11 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model = "cont", ability_method = "WLE")
# dichotomous response <- c(1,1,0) item <- matrix( c( 1, -0.5, 0, 1.5, -1, 0, 1.2, 0, 0.2 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model = "dich", ability_method = "WLE") # polytomous response <- c(1,2,0) item <- matrix( c( 1, -0.5, 0.5, 1.5, -1, 0, 1.2, 0, 0.4 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model="GPCM", ability_method = "WLE") # mixed-format test response <- list(c(0,0,0),c(2,2,1)) item <- list( matrix( c( 1, -0.5, 0, 1.5, -1, 0, 1.2, 0, 0 ), nrow = 3, byrow = TRUE ), matrix( c( 1, -0.5, 0.5, 1.5, -1, 0, 1.2, 0, 0.4 ), nrow = 3, byrow = TRUE ) ) adaptive_test(response, item, model = "GPCM", ability_method = "WLE") # continuous response response <- c(0.88, 0.68, 0.21) item <- matrix( c( 1, -0.5, 10, 1.5, -1, 8, 1.2, 0, 11 ), nrow = 3, byrow = TRUE ) adaptive_test(response, item, model = "cont", ability_method = "WLE")
Model comparison
## S3 method for class 'IRTest' anova(...)
## S3 method for class 'IRTest' anova(...)
... |
Objects of |
Model-fit indices and results of likelihood ratio test (LRT).
Seewoo Li [email protected]
Selecting the best model
best_model(..., criterion = "HQ")
best_model(..., criterion = "HQ")
... |
Candidate models |
criterion |
The criterion to be used. The default is |
The best model and model-fit indices.
Seewoo Li [email protected]
In a polytomous item, one or more score categories may not have the highest probability among the categories in an acceptable range.
In this case, the category may possibly be regarded as redundant in a psychometric point of view and can be collapsed into another score category.
This function returns a recommendation for a recategorization scheme based on item parameters.
cat_clps(item.matrix, range = c(-4, 4), increment = 0.005)
cat_clps(item.matrix, range = c(-4, 4), increment = 0.005)
item.matrix |
A matrix of item parameters. |
range |
A range of |
increment |
A width of the grid scheme. The default is |
A list of recommended recategorization for each item.
Seewoo Li [email protected]
Standard errors of model coefficients calculated by using Fisher information functions.
coef_se(object, complete = TRUE)
coef_se(object, complete = TRUE)
object |
An object for which the extraction of standard errors is meaningful. |
complete |
A logical value indicating if the full standard-error vector should be returned. |
Standard errors extracted from the model (object
).
A generic function which extracts model coefficients from objects returned by modeling functions.
## S3 method for class 'IRTest' coef(object, complete = TRUE, ...)
## S3 method for class 'IRTest' coef(object, complete = TRUE, ...)
object |
An object for which the extraction of model coefficients is meaningful. |
complete |
A logical value indicating if the full coefficient vector should be returned. |
... |
Other arguments. |
Coefficients extracted from the model (object
).
This function generates an artificial item response dataset allowing various options.
DataGeneration( seed = 1, N = 2000, nitem_D = 0, nitem_P = 0, nitem_C = 0, model_D = "2PL", model_P = "GPCM", latent_dist = "Normal", item_D = NULL, item_P = NULL, item_C = NULL, theta = NULL, prob = 0.5, d = 1.7, sd_ratio = 1, m = 0, s = 1, a_l = 0.8, a_u = 2.5, b_m = NULL, b_sd = NULL, c_l = 0, c_u = 0.2, categ = 5, possible_ans = c(0.1, 0.3, 0.5, 0.7, 0.9) )
DataGeneration( seed = 1, N = 2000, nitem_D = 0, nitem_P = 0, nitem_C = 0, model_D = "2PL", model_P = "GPCM", latent_dist = "Normal", item_D = NULL, item_P = NULL, item_C = NULL, theta = NULL, prob = 0.5, d = 1.7, sd_ratio = 1, m = 0, s = 1, a_l = 0.8, a_u = 2.5, b_m = NULL, b_sd = NULL, c_l = 0, c_u = 0.2, categ = 5, possible_ans = c(0.1, 0.3, 0.5, 0.7, 0.9) )
seed |
A numeric value that is used for random sampling. Seed number can guarantee a replicability of the result. |
N |
A numeric value of the number of examinees. |
nitem_D |
A numeric value of the number of dichotomous items. |
nitem_P |
A numeric value of the number of polytomous items. |
nitem_C |
A numeric value of the number of continuous response items. |
model_D |
A vector or a character string that represents the probability model for the dichotomous items. |
model_P |
A character string that represents the probability model for the polytomous items. |
latent_dist |
A character string that determines the type of latent distribution.
Currently available options are |
item_D |
An item parameter matrix for using fixed parameter values. The number of columns should be 3: |
item_P |
An item parameter matrix for using fixed parameter values. The number of columns should be 7: |
item_C |
An item parameter matrix for using fixed parameter values. The number of columns should be 3: |
theta |
An ability parameter vector for using fixed parameter values. Default is |
prob |
A numeric value for using |
d |
A numeric value for using |
sd_ratio |
A numeric value for using |
m |
A numeric value of the overall mean of the latent distribution. The default is 0. |
s |
A numeric value of the overall standard deviation of the latent distribution. The default is 1. |
a_l |
A numeric value. The lower bound of item discrimination parameters (a). |
a_u |
A numeric value. The upper bound of item discrimination parameters (a). |
b_m |
A numeric value. The mean of item difficulty parameters (b).
If unspecified, |
b_sd |
A numeric value. The standard deviation of item difficulty parameters (b).
If unspecified, |
c_l |
A numeric value. The lower bound of item guessing parameters (c). |
c_u |
A numeric value. The lower bound of item guessing parameters (c). |
categ |
A scalar or a numeric vector of length |
possible_ans |
Possible options for continuous items (e.g., 0.1, 0.3, 0.5, 0.7, 0.9) |
This function returns a list
of several objects:
theta |
A vector of ability parameters ( |
item_D |
A matrix of dichotomous item parameters. |
initialitem_D |
A matrix that contains initial item parameter values for dichotomous items. |
data_D |
A matrix of dichotomous item responses where rows indicate examinees and columns indicate items. |
item_P |
A matrix of polytomous item parameters. |
initialitem_P |
A matrix that contains initial item parameter values for polytomous items. |
data_P |
A matrix of polytomous item responses where rows indicate examinees and columns indicate items. |
item_D |
A matrix of continuous response item parameters. |
initialitem_D |
A matrix that contains initial item parameter values for continuous response items. |
data_D |
A matrix of continuous response item responses where rows indicate examinees and columns indicate items. |
Seewoo Li [email protected]
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
# Dichotomous item responses Alldata <- DataGeneration(N = 500, nitem_D = 10) # Polytomous item responses Alldata <- DataGeneration(N = 1000, nitem_P = 10) # Mixed-format items Alldata <- DataGeneration(N = 1000, nitem_D = 20, nitem_P = 10) # Continuous items AllData <- DataGeneration(N = 1000, nitem_C = 10) # Dataset from non-normal latent density using two-component Gaussian mixture distribution Alldata <- DataGeneration(N=1000, nitem_P = 10, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)
# Dichotomous item responses Alldata <- DataGeneration(N = 500, nitem_D = 10) # Polytomous item responses Alldata <- DataGeneration(N = 1000, nitem_P = 10) # Mixed-format items Alldata <- DataGeneration(N = 1000, nitem_D = 20, nitem_P = 10) # Continuous items AllData <- DataGeneration(N = 1000, nitem_C = 10) # Dataset from non-normal latent density using two-component Gaussian mixture distribution Alldata <- DataGeneration(N=1000, nitem_P = 10, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)
Probability density for the re-parameterized two-component normal mixture distribution.
dist2(x, prob = 0.5, d = 0, sd_ratio = 1, overallmean = 0, overallsd = 1)
dist2(x, prob = 0.5, d = 0, sd_ratio = 1, overallmean = 0, overallsd = 1)
x |
A numeric vector. The location to evaluate the density function. |
prob |
A numeric value of |
d |
A numeric value of |
sd_ratio |
A numeric value of |
overallmean |
A numeric value of |
overallsd |
A numeric value of |
1) Overall mean ()
2) Overall standard deviation ()
The evaluated probability density value(s).
Seewoo Li [email protected]
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
# Evaluated density dnst <- dist2(seq(-6,6,.1), prob = 0.3, d = 1, sd_ratio=0.5) # Plot of the density plot(seq(-6,6,.1), dnst)
# Evaluated density dnst <- dist2(seq(-6,6,.1), prob = 0.3, d = 1, sd_ratio=0.5) # Plot of the density plot(seq(-6,6,.1), dnst)
Factor scores of examinees.
factor_score(x, ability_method = "EAP", quad = NULL, prior = NULL)
factor_score(x, ability_method = "EAP", quad = NULL, prior = NULL)
x |
A model fit object from either |
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
quad |
A vector of quadrature points for |
prior |
A vector of the prior distribution for |
theta |
The estimated ability parameter values. If |
theta_se |
The standard errors of ability parameter estimates.
It returns standard deviations of posteriors for |
Seewoo Li [email protected]
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Item fit statistics factor_score(M1, ability_method = "MLE")
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Item fit statistics factor_score(M1, ability_method = "MLE")
Item information function
inform_f_item(x, test, item = 1, type = "d")
inform_f_item(x, test, item = 1, type = "d")
x |
A vector of |
test |
An object returned from an estimation function. |
item |
A natural number indicating the |
type |
A character value for a mixed format test which determines the item type:
|
A vector of the evaluated item information values.
Seewoo Li [email protected]
Test information function
inform_f_test(x, test)
inform_f_test(x, test)
x |
A vector of |
test |
An object returned from an estimation function. |
A vector of test information values of the same length as x
.
Seewoo Li [email protected]
This function estimates IRT item and ability parameters when all items are scored continuously. Based on Bock & Aitkin's (1981) marginal maximum likelihood and EM algorithm (EM-MML), this function provides several latent distribution estimation algorithms which could free the normality assumption on the latent variable. If the normality assumption is violated, application of these latent distribution estimation methods could reflect non-normal characteristics of the unknown true latent distribution, thereby providing more accurate parameter estimates (Li, 2021; Woods & Lin, 2009; Woods & Thissen, 2006).
IRTest_Cont( data, model = 2, range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
IRTest_Cont( data, model = 2, range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
data |
A matrix or data frame of item responses where responses are coded as 0 or 1. Rows and columns indicate examinees and items, respectively. |
model |
A scalar or vector that represents types of item characteristic functions:
|
range |
Range of the latent variable to be considered in the quadrature scheme.
The default is from |
q |
A numeric value that represents the number of quadrature points. The default value is 121. |
initialitem |
A matrix of initial item parameter values for starting the estimation algorithm. The default value is |
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
latent_dist |
A character string that determines latent distribution estimation method.
Insert |
max_iter |
A numeric value that determines the maximum number of iterations in the EM-MML. The default value is 200. |
threshold |
A numeric value that determines the threshold of EM-MML convergence. A maximum item parameter change is monitored and compared with the threshold. The default value is 0.0001. |
bandwidth |
A character value that can be used if |
h |
A natural number less than or equal to 10 if |
, where
where .
1) Empirical histogram method
where ,
is the location of the
th quadrature point, and
is a value of probability mass function evaluated at
.
Empirical histogram method thus has
parameters.
2) Two-component Gaussian mixture distribution
where is the value of a Gaussian component with mean
and standard deviation
evaluated at
.
3) Davidian curve method
where corresponds to the argument
h
and determines the degree of the polynomial.
4) Kernel density estimation method
where is the number of examinees,
is
th examinee's ability parameter,
is the bandwidth which corresponds to the argument
bandwidth
, and is a kernel function.
The Gaussian kernel is used in this function.
5) Log-linear smoothing method
where is the hyper parameter which determines the smoothness of the density, and
can take total
finite values (
).
This function returns a list
of several objects:
par_est |
The item parameter estimates. |
se |
The asymptotic standard errors for item parameter estimates. |
fk |
The estimated frequencies of examinees at quadrature points. |
iter |
The number of EM-MML iterations elapsed for the convergence. |
quad |
The location of quadrature points. |
diff |
The final value of the monitored maximum item parameter change. |
Ak |
The estimated discrete latent distribution. It is discrete (i.e., probability mass function) by the quadrature scheme. |
Pk |
The posterior probabilities of examinees at quadrature points. |
theta |
The estimated ability parameter values. If |
theta_se |
Standard error of ability estimates. The asymptotic standard errors for |
logL |
The deviance (i.e., -2logL). |
density_par |
The estimated density parameters. |
Options |
A replication of input arguments and other information. |
Seewoo Li [email protected]
Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46(4), 443-459.
Casabianca, J. M., & Lewis, C. (2015). IRT item parameter recovery with marginal maximum likelihood estimation using loglinear smoothing models. Journal of Educational and Behavioral Statistics, 40(6), 547-578.
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
Li, S. (2022). The effect of estimating latent distribution using kernel density estimation method on the accuracy and efficiency of parameter estimation of item response models [Master's thesis, Yonsei University, Seoul]. Yonsei University Library.
Mislevy, R. J. (1984). Estimating latent distributions. Psychometrika, 49(3), 359-381.
Mislevy, R. J., & Bock, R. D. (1985). Implementation of the EM algorithm in the estimation of item parameters: The BILOG computer program. In D. J. Weiss (Ed.). Proceedings of the 1982 item response theory and computerized adaptive testing conference (pp. 189-202). University of Minnesota, Department of Psychology, Computerized Adaptive Testing Conference.
Woods, C. M., & Lin, N. (2009). Item response theory with estimation of the latent density using Davidian curves. Applied Psychological Measurement, 33(2), 102-117.
Woods, C. M., & Thissen, D. (2006). Item response theory with estimation of the latent population distribution using spline-based densities. Psychometrika, 71(2), 281-301.
# Generating a continuous item response data data <- DataGeneration(N = 1000, nitem_C = 10)$data_C # Analysis M1 <- IRTest_Cont(data, max_iter = 3) # increase `max_iter` in real analyses.
# Generating a continuous item response data data <- DataGeneration(N = 1000, nitem_C = 10)$data_C # Analysis M1 <- IRTest_Cont(data, max_iter = 3) # increase `max_iter` in real analyses.
This function estimates IRT item and ability parameters when all items are scored dichotomously. Based on Bock & Aitkin's (1981) marginal maximum likelihood and EM algorithm (EM-MML), this function provides several latent distribution estimation algorithms which could free the normality assumption on the latent variable. If the normality assumption is violated, application of these latent distribution estimation methods could reflect non-normal characteristics of the unknown true latent distribution, and, thus, could provide more accurate parameter estimates (Li, 2021; Woods & Lin, 2009; Woods & Thissen, 2006).
IRTest_Dich( data, model = "2PL", range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
IRTest_Dich( data, model = "2PL", range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
data |
A matrix or data frame of item responses where responses are coded as 0 or 1. Rows and columns indicate examinees and items, respectively. |
model |
A scalar or vector that represents types of item characteristic functions.
Insert |
range |
Range of the latent variable to be considered in the quadrature scheme.
The default is from |
q |
A numeric value that represents the number of quadrature points. The default value is 121. |
initialitem |
A matrix of initial item parameter values for starting the estimation algorithm. The default value is |
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
latent_dist |
A character string that determines latent distribution estimation method.
Insert |
max_iter |
A numeric value that determines the maximum number of iterations in the EM-MML. The default value is 200. |
threshold |
A numeric value that determines the threshold of EM-MML convergence. A maximum item parameter change is monitored and compared with the threshold. The default value is 0.0001. |
bandwidth |
A character value that can be used if |
h |
A natural number less than or equal to 10 if |
)
1) One-parameter logistic (1PL) model
2) Two-parameter logistic (2PL) model
3) Three-parameter logistic (3PL) model
1) Empirical histogram method
where ,
is the location of the
th quadrature point, and
is a value of probability mass function evaluated at
.
Empirical histogram method thus has
parameters.
2) Two-component Gaussian mixture distribution
where is the value of a Gaussian component with mean
and standard deviation
evaluated at
.
3) Davidian curve method
where corresponds to the argument
h
and determines the degree of the polynomial.
4) Kernel density estimation method
where is the number of examinees,
is
th examinee's ability parameter,
is the bandwidth which corresponds to the argument
bandwidth
, and is a kernel function.
The Gaussian kernel is used in this function.
5) Log-linear smoothing method
where is the hyper parameter which determines the smoothness of the density, and
can take total
finite values (
).
This function returns a list
of several objects:
par_est |
The item parameter estimates. |
se |
The asymptotic standard errors for item parameter estimates. |
fk |
The estimated frequencies of examinees at quadrature points. |
iter |
The number of EM-MML iterations elapsed for the convergence. |
quad |
The location of quadrature points. |
diff |
The final value of the monitored maximum item parameter change. |
Ak |
The estimated discrete latent distribution. It is discrete (i.e., probability mass function) by the quadrature scheme. |
Pk |
The posterior probabilities of examinees at quadrature points. |
theta |
The estimated ability parameter values. If |
theta_se |
Standard error of ability estimates. The asymptotic standard errors for |
logL |
The deviance (i.e., -2logL). |
density_par |
The estimated density parameters. |
Options |
A replication of input arguments and other information. |
Seewoo Li [email protected]
Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46(4), 443-459.
Casabianca, J. M., & Lewis, C. (2015). IRT item parameter recovery with marginal maximum likelihood estimation using loglinear smoothing models. Journal of Educational and Behavioral Statistics, 40(6), 547-578.
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
Li, S. (2022). The effect of estimating latent distribution using kernel density estimation method on the accuracy and efficiency of parameter estimation of item response models [Master's thesis, Yonsei University, Seoul]. Yonsei University Library.
Mislevy, R. J. (1984). Estimating latent distributions. Psychometrika, 49(3), 359-381.
Mislevy, R. J., & Bock, R. D. (1985). Implementation of the EM algorithm in the estimation of item parameters: The BILOG computer program. In D. J. Weiss (Ed.). Proceedings of the 1982 item response theory and computerized adaptive testing conference (pp. 189-202). University of Minnesota, Department of Psychology, Computerized Adaptive Testing Conference.
Woods, C. M., & Lin, N. (2009). Item response theory with estimation of the latent density using Davidian curves. Applied Psychological Measurement, 33(2), 102-117.
Woods, C. M., & Thissen, D. (2006). Item response theory with estimation of the latent population distribution using spline-based densities. Psychometrika, 71(2), 281-301.
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data)
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data)
This function estimates IRT item and ability parameters when a test consists of mixed-format items (i.e., a combination of dichotomous and polytomous items). In educational context, the combination of these two item formats takes an advantage; Dichotomous item format expedites scoring and is conducive to cover broad domain, while Polytomous item format (e.g., free response item) encourages students to exert complex cognitive skills (Lee et al., 2020). Based on Bock & Aitkin's (1981) marginal maximum likelihood and EM algorithm (EM-MML), this function incorporates several latent distribution estimation algorithms which could free the normality assumption on the latent variable. If the normality assumption is violated, application of these latent distribution estimation methods could reflect some features of the unknown true latent distribution, and, thus, could provide more accurate parameter estimates (Li, 2021; Woods & Lin, 2009; Woods & Thissen, 2006).
IRTest_Mix( data_D, data_P, model_D = "2PL", model_P = "GPCM", range = c(-6, 6), q = 121, initialitem_D = NULL, initialitem_P = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
IRTest_Mix( data_D, data_P, model_D = "2PL", model_P = "GPCM", range = c(-6, 6), q = 121, initialitem_D = NULL, initialitem_P = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
data_D |
A matrix or data frame of item responses where responses are coded as 0 or 1. Rows and columns indicate examinees and items, respectively. |
data_P |
A matrix or data frame of item responses coded as |
model_D |
A scalar or vector that represents types of item characteristic functions.
Insert |
model_P |
A character value for an IRT model to be applied.
Currently, |
range |
Range of the latent variable to be considered in the quadrature scheme.
The default is from |
q |
A numeric value that represents the number of quadrature points. The default value is 121. |
initialitem_D |
A matrix of initial item parameter values for starting the estimation algorithm. The default value is |
initialitem_P |
A matrix of initial item parameter values for starting the estimation algorithm. The default value is |
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
latent_dist |
A character string that determines latent distribution estimation method.
Insert |
max_iter |
A numeric value that determines the maximum number of iterations in the EM-MML. The default value is 200. |
threshold |
A numeric value that determines the threshold of EM-MML convergence. A maximum item parameter change is monitored and compared with the threshold. The default value is 0.0001. |
bandwidth |
A character value that can be used if |
h |
A natural number less than or equal to 10 if |
)
1) One-parameter logistic (1PL) model
2) Two-parameter logistic (2PL) model
3) Three-parameter logistic (3PL) model
(i.e.,
)
1) Partial credit model (PCM)
2) Generalized partial credit model (GPCM)
3) Graded response model (GRM)
1) Empirical histogram method
where ,
is the location of the
th quadrature point, and
is a value of probability mass function evaluated at
.
Empirical histogram method thus has
parameters.
2) Two-component Gaussian mixture distribution
where is the value of a Gaussian component with mean
and standard deviation
evaluated at
.
3) Davidian curve method
where corresponds to the argument
h
and determines the degree of the polynomial.
4) Kernel density estimation method
where is the number of examinees,
is
th examinee's ability parameter,
is the bandwidth which corresponds to the argument
bw
, and is a kernel function.
The Gaussian kernel is used in this function.
5) Log-linear smoothing method
where is the hyper parameter which determines the smoothness of the density, and
can take total
finite values (
).
This function returns a list
of several objects:
par_est |
The list of item parameter estimates. The first and second objects are the matrices of dichotomous and polytomous item parameter estimates, respectively |
se |
The list of standard errors of the item parameter estimates. The first and second objects are the matrices of standard errors of dichotomous and polytomous item parameter estimates, respectively |
fk |
The estimated frequencies of examinees at quadrature points. |
iter |
The number of EM-MML iterations elapsed for the convergence. |
quad |
The location of quadrature points. |
diff |
The final value of the monitored maximum item parameter change. |
Ak |
The estimated discrete latent distribution. It is discrete (i.e., probability mass function) by the quadrature scheme. |
Pk |
The posterior probabilities of examinees at quadrature points. |
theta |
The estimated ability parameter values. If |
theta_se |
Standard error of ability estimates. The asymptotic standard errors for |
logL |
The deviance (i.e., -2logL). |
density_par |
The estimated density parameters. |
Options |
A replication of input arguments and other information. |
Seewoo Li [email protected]
Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46(4), 443-459.
Casabianca, J. M., & Lewis, C. (2015). IRT item parameter recovery with marginal maximum likelihood estimation using loglinear smoothing models. Journal of Educational and Behavioral Statistics, 40(6), 547-578.
Lee, W. C., Kim, S. Y., Choi, J., & Kang, Y. (2020). IRT Approaches to Modeling Scores on Mixed-Format Tests. Journal of Educational Measurement, 57(2), 230-254.
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
Li, S. (2022). The effect of estimating latent distribution using kernel density estimation method on the accuracy and efficiency of parameter estimation of item response models [Master's thesis, Yonsei University, Seoul]. Yonsei University Library.
Mislevy, R. J. (1984). Estimating latent distributions. Psychometrika, 49(3), 359-381.
Mislevy, R. J., & Bock, R. D. (1985). Implementation of the EM algorithm in the estimation of item parameters: The BILOG computer program. In D. J. Weiss (Ed.). Proceedings of the 1982 item response theory and computerized adaptive testing conference (pp. 189-202). University of Minnesota, Department of Psychology, Computerized Adaptive Testing Conference.
Woods, C. M., & Lin, N. (2009). Item response theory with estimation of the latent density using Davidian curves. Applied Psychological Measurement, 33(2), 102-117.
Woods, C. M., & Thissen, D. (2006). Item response theory with estimation of the latent population distribution using spline-based densities. Psychometrika, 71(2), 281-301.
# A preparation of mixed-format item response data Alldata <- DataGeneration(N=1000, nitem_D = 5, nitem_P = 3) DataD <- Alldata$data_D # item response data for the dichotomous items DataP <- Alldata$data_P # item response data for the polytomous items # Analysis M1 <- IRTest_Mix(DataD, DataP)
# A preparation of mixed-format item response data Alldata <- DataGeneration(N=1000, nitem_D = 5, nitem_P = 3) DataD <- Alldata$data_D # item response data for the dichotomous items DataP <- Alldata$data_P # item response data for the polytomous items # Analysis M1 <- IRTest_Mix(DataD, DataP)
This function estimates IRT item and ability parameters when all items are scored polytomously. Based on Bock & Aitkin's (1981) marginal maximum likelihood and EM algorithm (EM-MML), this function provides several latent distribution estimation algorithms which could free the normality assumption on the latent variable. If the normality assumption is violated, application of these latent distribution estimation methods could reflect non-normal characteristics of the unknown true latent distribution, and, thus, could provide more accurate parameter estimates (Li, 2021; Woods & Lin, 2009; Woods & Thissen, 2006).
IRTest_Poly( data, model = "GPCM", range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
IRTest_Poly( data, model = "GPCM", range = c(-6, 6), q = 121, initialitem = NULL, ability_method = "EAP", latent_dist = "Normal", max_iter = 200, threshold = 1e-04, bandwidth = "SJ-ste", h = NULL )
data |
A matrix or data frame of item responses coded as |
model |
A character value for an IRT model to be applied.
Currently, |
range |
Range of the latent variable to be considered in the quadrature scheme.
The default is from |
q |
A numeric value that represents the number of quadrature points. The default value is 121. |
initialitem |
A matrix of initial item parameter values for starting the estimation algorithm. The default value is |
ability_method |
The ability parameter estimation method.
The available options are Expected a posteriori ( |
latent_dist |
A character string that determines latent distribution estimation method.
Insert |
max_iter |
A numeric value that determines the maximum number of iterations in the EM-MML. The default value is 200. |
threshold |
A numeric value that determines the threshold of EM-MML convergence. A maximum item parameter change is monitored and compared with the threshold. The default value is 0.0001. |
bandwidth |
A character value that can be used if |
h |
A natural number less than or equal to 10 if |
(i.e.,
)
1) Partial credit model (PCM)
2) Generalized partial credit model (GPCM)
3) Graded response model (GRM)
1) Empirical histogram method
where ,
is the location of the
th quadrature point, and
is a value of probability mass function evaluated at
.
Empirical histogram method thus has
parameters.
2) Two-component Gaussian mixture distribution
where is the value of a Gaussian component with mean
and standard deviation
evaluated at
.
3) Davidian curve method
where corresponds to the argument
h
and determines the degree of the polynomial.
4) Kernel density estimation method
where is the number of examinees,
is
th examinee's ability parameter,
is the bandwidth which corresponds to the argument
bw
, and is a kernel function.
The Gaussian kernel is used in this function.
5) Log-linear smoothing method
where is the hyper parameter which determines the smoothness of the density, and
can take total
finite values (
).
This function returns a list
of several objects:
par_est |
The item parameter estimates. |
se |
The asymptotic standard errors for item parameter estimates. |
fk |
The estimated frequencies of examinees at quadrature points. |
iter |
The number of EM-MML iterations elapsed for the convergence. |
quad |
The location of quadrature points. |
diff |
The final value of the monitored maximum item parameter change. |
Ak |
The estimated discrete latent distribution. It is discrete (i.e., probability mass function) by the quadrature scheme. |
Pk |
The posterior probabilities of examinees at quadrature points. |
theta |
The estimated ability parameter values. If |
theta_se |
Standard error of ability estimates. The asymptotic standard errors for |
logL |
The deviance (i.e., -2logL). |
density_par |
The estimated density parameters. |
Options |
A replication of input arguments and other information. |
Seewoo Li [email protected]
Bock, R. D., & Aitkin, M. (1981). Marginal maximum likelihood estimation of item parameters: Application of an EM algorithm. Psychometrika, 46(4), 443-459.
Casabianca, J. M., & Lewis, C. (2015). IRT item parameter recovery with marginal maximum likelihood estimation using loglinear smoothing models. Journal of Educational and Behavioral Statistics, 40(6), 547-578.
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
Li, S. (2022). The effect of estimating latent distribution using kernel density estimation method on the accuracy and efficiency of parameter estimation of item response models [Master's thesis, Yonsei University, Seoul]. Yonsei University Library.
Mislevy, R. J. (1984). Estimating latent distributions. Psychometrika, 49(3), 359-381.
Mislevy, R. J., & Bock, R. D. (1985). Implementation of the EM algorithm in the estimation of item parameters: The BILOG computer program. In D. J. Weiss (Ed.). Proceedings of the 1982 item response theory and computerized adaptive testing conference (pp. 189-202). University of Minnesota, Department of Psychology, Computerized Adaptive Testing Conference.
Woods, C. M., & Lin, N. (2009). Item response theory with estimation of the latent density using Davidian curves. Applied Psychological Measurement, 33(2), 102-117.
Woods, C. M., & Thissen, D. (2006). Item response theory with estimation of the latent population distribution using spline-based densities. Psychometrika, 71(2), 281-301.
# Preparation of dichotomous item response data data <- DataGeneration(N=1000, nitem_P = 8)$data_P # Analysis M1 <- IRTest_Poly(data)
# Preparation of dichotomous item response data data <- DataGeneration(N=1000, nitem_P = 8)$data_P # Analysis M1 <- IRTest_Poly(data)
This function analyzes and reports item-fit test results.
item_fit(x, bins = 10, bin.center = "mean")
item_fit(x, bins = 10, bin.center = "mean")
x |
A model fit object from either |
bins |
The number of bins to be used for calculating the statistics.
Following Yen's |
bin.center |
A method for calculating the center of each bin.
Following Yen's |
Bock's (1960) or Yen's
(1981) is currently available.
This function returns a matrix
of item-fit test results.
Seewoo Li [email protected]
Bock, R.D. (1960), Methods and applications of optimal scaling. Chapel Hill, NC: L.L. Thurstone Psychometric Laboratory.
Yen, W. M. (1981). Using simulation results to choose a latent trait model. Applied Psychological Measurement, 5(2), 245–262.
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Item fit statistics item_fit(M1)
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Item fit statistics item_fit(M1)
Density function of the estimated latent distribution with mean and standard deviation equal to 0 and 1, respectively.
latent_distribution(x, model.fit)
latent_distribution(x, model.fit)
x |
A numeric vector. Value(s) on the |
model.fit |
An object returned from an estimation function. |
The evaluated values of the PDF, a length of which equals to that of x
.
# Data generation and model fitting data <- DataGeneration(N=1000, nitem_D = 15, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)$data_D M1 <- IRTest_Dich(data = data, latent_dist = "KDE") # Plotting the latent distribution ggplot2::ggplot()+ ggplot2::stat_function(fun=latent_distribution, args=list(M1))+ ggplot2::lims(x=c(-6,6), y=c(0,0.5))
# Data generation and model fitting data <- DataGeneration(N=1000, nitem_D = 15, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)$data_D M1 <- IRTest_Dich(data = data, latent_dist = "KDE") # Plotting the latent distribution ggplot2::ggplot()+ ggplot2::stat_function(fun=latent_distribution, args=list(M1))+ ggplot2::lims(x=c(-6,6), y=c(0,0.5))
Extract Log-Likelihood
## S3 method for class 'IRTest' logLik(object, ...)
## S3 method for class 'IRTest' logLik(object, ...)
object |
A |
... |
Other arguments. |
Extracted log-likelihood.
Recovering original parameters of two-component Gaussian mixture distribution from re-parameterized values
original_par_2GM( prob = 0.5, d = 0, sd_ratio = 1, overallmean = 0, overallsd = 1 )
original_par_2GM( prob = 0.5, d = 0, sd_ratio = 1, overallmean = 0, overallsd = 1 )
prob |
The |
d |
The |
sd_ratio |
A numeric value of |
overallmean |
A numeric value of |
overallsd |
A numeric value of |
, where is a Gaussian component.
, where is overall mean and
is overall standard deviation of the distribution.
1) Mean of the first Gaussian component (m1
).
2) Mean of the second Gaussian component (m2
).
3) Standard deviation of the first Gaussian component (s1
).
4) Standard deviation of the second Gaussian component (s2
).
This function returns a vector of length 4: c(m1,m2,s1,s2)
.
m1 |
The location parameter (mean) of the first Gaussian component. |
m2 |
The location parameter (mean) of the second Gaussian component. |
s1 |
The scale parameter (standard deviation) of the first Gaussian component. |
s2 |
The scale parameter (standard deviation) of the second Gaussian component. |
Seewoo Li [email protected]
Li, S. (2021). Using a two-component normal mixture distribution as a latent distribution in estimating parameters of item response models. Journal of Educational Evaluation, 34(4), 759-789.
This function draws item response functions of an item of the fitted model.
plot_item(x, item.number = 1, type = NULL)
plot_item(x, item.number = 1, type = NULL)
x |
A model fit object from either |
item.number |
A numeric value indicating the item number. |
type |
A character string required if |
This function returns a plot of item response functions.
Seewoo Li [email protected]
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Plotting item response function plot_item(M1, item.number = 1)
# A preparation of dichotomous item response data data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Plotting item response function plot_item(M1, item.number = 1)
This function draws a plot of the estimated latent distribution (the population distribution of the latent variable).
## S3 method for class 'IRTest' plot(x, ...)
## S3 method for class 'IRTest' plot(x, ...)
x |
An object of |
... |
Other aesthetic argument(s) for drawing the plot.
Arguments are passed on to |
A plot of estimated latent distribution.
Seewoo Li [email protected]
# Data generation and model fitting data <- DataGeneration(N=1000, nitem_D = 15, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)$data_D M1 <- IRTest_Dich(data = data, latent_dist = "KDE") # Plotting the latent distribution plot(x = M1, linewidth = 1, color = 'red') + ggplot2::lims(x = c(-6, 6), y = c(0, .5))
# Data generation and model fitting data <- DataGeneration(N=1000, nitem_D = 15, latent_dist = "2NM", d = 1.664, sd_ratio = 2, prob = 0.3)$data_D M1 <- IRTest_Dich(data = data, latent_dist = "KDE") # Plotting the latent distribution plot(x = M1, linewidth = 1, color = 'red') + ggplot2::lims(x = c(-6, 6), y = c(0, .5))
This function prints the summarized information.
## S3 method for class 'IRTest' print(x, ...)
## S3 method for class 'IRTest' print(x, ...)
x |
An object of |
... |
Additional arguments (currently non-functioning). |
Printed texts on the console recommending the usage of summary
function and the direct access to the details using "$" sign.
Seewoo Li [email protected]
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "KDE") M1
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "KDE") M1
This function prints the summarized information.
## S3 method for class 'IRTest_summary' print(x, ...)
## S3 method for class 'IRTest_summary' print(x, ...)
x |
An object returned from |
... |
Additional arguments (currently non-functioning). |
Summarized texts on the console.
Seewoo Li [email protected]
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "2NM") summary(M1)
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "2NM") summary(M1)
With a recategorization scheme as an input, this function implements recategorization for the input data.
recategorize(data, new_cat)
recategorize(data, new_cat)
data |
An item response matrix. |
new_cat |
A list of a new categorization scheme. |
Recategorized data
Seewoo Li [email protected]
# Preparation of dichotomous item response data data <- DataGeneration(N=1000, nitem_P = 8)$data_P # Analysis M1 <- IRTest_Poly(data) # Recommendation of category collapsing new_cat <- cat_clps(M1$par_est) # Recategorization of data recategorize(data, new_cat)
# Preparation of dichotomous item response data data <- DataGeneration(N=1000, nitem_P = 8)$data_P # Analysis M1 <- IRTest_Poly(data) # Recommendation of category collapsing new_cat <- cat_clps(M1$par_est) # Recategorization of data recategorize(data, new_cat)
Marginal reliability coefficient of IRT
reliability(x)
reliability(x)
x |
A model fit object from either |
In accordance with the concept of reliability in classical test theory (CTT), this function calculates the IRT reliability coefficients.
The basic concept and formula of the reliability coefficient can be expressed as follows (Kim & Feldt, 2010):
An observed score of Item ,
, is decomposed as the sum of a true score
and an error
.
Then, with the assumption of
, the reliability coefficient of a test is defined as;
See May and Nicewander (1994) for the specific formula used in this function.
scaleFor the coefficient on the scale, this function calculates the parallel-forms reliability (Green et al., 1984; Kim, 2012):
This assumes that .
Although the formula is often employed in several IRT studies and applications, the underlying assumption may not be true.
Estimated marginal reliability coefficients.
Seewoo Li [email protected]
Green, B.F., Bock, R.D., Humphreys, L.G., Linn, R.L., & Reckase, M.D. (1984). Technical guidelines for assessing computerized adaptive tests. Journal of Educational Measurement, 21(4), 347–360.
Kim, S. (2012). A note on the reliability coefficients for item response model-based ability estimates. Psychometrika, 77(1), 153-162.
Kim, S., Feldt, L.S. (2010). The estimation of the IRT reliability coefficient and its lower and upper bounds, with comparisons to CTT reliability statistics. Asia Pacific Education Review, 11, 179–188.
May, K., Nicewander, A.W. (1994). Reliability and information functions for percentile ranks. Journal of Educational Measurement, 31(4), 313-325.
data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Reliability coefficients reliability(M1)
data <- DataGeneration(N=500, nitem_D = 10)$data_D # Analysis M1 <- IRTest_Dich(data) # Reliability coefficients reliability(M1)
This function summarizes the output (e.g., convergence of the estimation algorithm, number of parameters, model-fit, and estimated latent distribution).
## S3 method for class 'IRTest' summary(object, ...)
## S3 method for class 'IRTest' summary(object, ...)
object |
An object of |
... |
Other argument(s). |
Summarized information.
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "KDE") summary(M1)
data <- DataGeneration(N=1000, nitem_P = 8)$data_P M1 <- IRTest_Poly(data = data, latent_dist = "KDE") summary(M1)