IMT: Runs information matrix test for an information matrix test...

Description Usage Arguments Value Examples

View source: R/IMT.R

Description

Runs information matrix test for an information matrix test GPCM model.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

IMTest documentation built on May 1, 2019, 9:06 p.m.