if (FALSE) {
# Numerical example assuming no deviation from linear restriction
# design matrix W defining linear restriction
W <- rbind(c(1,0), c(0,1), c(1,1), c(2,1))
# assumed eta parameters of LLTM for data generation
eta <- c(-0.5, 1)
# assumed vector of item parameters of RM
b <- colSums(eta * t(W))
y <- eRm::sim.rasch(persons = rnorm(400), items = b - b[1]) # sum0 = FALSE
res <- LLTM_test(data = y, W = W )
res$test # test statistics
res$df # degrees of freedoms
res$pvalue # p-values
}
Run the code above in your browser using DataLab