Title: | Information Matrix Test for Generalized Partial Credit Models |
Version: | 1.0.0 |
Description: | Implementation of the information matrix test for generalized partial credit models. |
Depends: | R (≥ 3.3.0), ltm |
Imports: | MASS, lme4, reshape2 |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
LazyData: | true |
RoxygenNote: | 6.0.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2017-04-07 01:37:58 UTC; daphnaharel |
Author: | Daphna Harel [cre, aut] |
Maintainer: | Daphna Harel <daphna.harel@nyu.edu> |
Repository: | CRAN |
Date/Publication: | 2017-04-07 06:19:14 UTC |
Runs information matrix test for an information matrix test GPCM model.
Description
Runs information matrix test for an information matrix test GPCM model.
Usage
IMT(mod, constraint, R, ind_vec)
Arguments
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. |
Value
A list containing the information matrix test statistic and the associated degrees of freedom.
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
Collapses data for a given collapsing function
Description
Collapses data for a given collapsing function
Usage
collapse_data(data, collapse, constraint)
Arguments
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. |
Value
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.
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.
Description
Synthetic dataset of 1000 responses to 10 items, each with four categories, generated from a Partial Credit Model.
Usage
dataset
Format
An object of class data.frame
with 1000 rows and 10 columns.
Table with GH points
Description
Table with GH points
Usage
gh
Format
An object of class list
of length 101.
Source
ltm package
Runs the GPCM model for use in the Information Matrix Test.
Description
Runs the GPCM model for use in the Information Matrix Test.
Usage
gpcm_IMT(data, constraint = c("gpcm", "1PL", "rasch"), IRT.param = TRUE,
start.val = NULL, na.action = NULL, control = list())
Arguments
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. |
Value
A GPCM object.
Examples
data(dataset)
model = gpcm_IMT(dataset, constraint = "rasch")
# See vignette("IMT-vignette") for more examples