Title: | Information Matrix Test for Generalized Partial Credit Models |
---|---|
Description: | Implementation of the information matrix test for generalized partial credit models. |
Authors: | Daphna Harel [cre, aut] |
Maintainer: | Daphna Harel <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.0 |
Built: | 2024-12-23 06:46:47 UTC |
Source: | CRAN |
Collapses data for a given collapsing function
collapse_data(data, collapse, constraint)
collapse_data(data, collapse, constraint)
data |
A dataset with J columns and n rows. |
collapse |
A list of length J indicating the scoring function to collapse from. |
constraint |
Constraint is either "rasch" or "gpcm" depending on which parameter constraints should be run. |
A list containing the collapsed data and a indicator vector for which parameters to test with the IMT. If no collapsing has occurred, the default indicator vector tests all parameters of the last item.
data(dataset) collapse = split(rep(c(1:4), 10), rep(1:10, each = 4)) my_data = collapse_data(dataset, collapse, "rasch") # See vignette("IMT-vignette") for more examples.
data(dataset) collapse = split(rep(c(1:4), 10), rep(1:10, each = 4)) my_data = collapse_data(dataset, collapse, "rasch") # See vignette("IMT-vignette") for more examples.
Synthetic dataset of 1000 responses to 10 items, each with four categories, generated from a Partial Credit Model.
dataset
dataset
An object of class data.frame
with 1000 rows and 10 columns.
Table with GH points
gh
gh
An object of class list
of length 101.
ltm package
Runs the GPCM model for use in the Information Matrix Test.
gpcm_IMT(data, constraint = c("gpcm", "1PL", "rasch"), IRT.param = TRUE, start.val = NULL, na.action = NULL, control = list())
gpcm_IMT(data, constraint = c("gpcm", "1PL", "rasch"), IRT.param = TRUE, start.val = NULL, na.action = NULL, control = list())
data |
A dataset with J columns and n rows. |
constraint |
Constraint is either "1PL", "rasch" or "gpcm" depending on which parameter constraints should be run. |
IRT.param |
logical; if TRUE then the usual IRT parametrization is used. |
start.val |
If not Null, a list of starting values for the parameter estimates |
na.action |
the na.action to be used on the data |
control |
See gpcm function in ltm package for details. |
A GPCM object.
data(dataset) model = gpcm_IMT(dataset, constraint = "rasch") # See vignette("IMT-vignette") for more examples
data(dataset) model = gpcm_IMT(dataset, constraint = "rasch") # See vignette("IMT-vignette") for more examples
Runs information matrix test for an information matrix test GPCM model.
IMT(mod, constraint, R, ind_vec)
IMT(mod, constraint, R, ind_vec)
mod |
An IMT GPCM model. |
constraint |
Constraint is either "rasch" or "gpcm". |
R |
number of iterations for simulation of the variance-covariance matrix. |
ind_vec |
Vector of 0's and 1's for item-level parameters to be tested in the information matrix test. |
A list containing the information matrix test statistic and the associated degrees of freedom.
data(dataset) collapse = split(rep(c(1:4), 10), rep(1:10, each = 4)) my_data = collapse_data(dataset, collapse, "rasch") model = gpcm_IMT(my_data$data, constraint = "rasch") test_fit = IMT(model, "rasch", R = 5000, my_data$ind) #This line of code takes longer than 10 seconds to run pvalue = pchisq(test_fit$Tstat, test_fit$df, lower.tail = FALSE) # See vignette("IMT-vignette") for more examples
data(dataset) collapse = split(rep(c(1:4), 10), rep(1:10, each = 4)) my_data = collapse_data(dataset, collapse, "rasch") model = gpcm_IMT(my_data$data, constraint = "rasch") test_fit = IMT(model, "rasch", R = 5000, my_data$ind) #This line of code takes longer than 10 seconds to run pvalue = pchisq(test_fit$Tstat, test_fit$df, lower.tail = FALSE) # See vignette("IMT-vignette") for more examples