Dear Phil,
I run the codes below to simulate data under the nominal response model:
n_persons <- 3000
n_items <- 10
n_categories <- 4
a <- matrix(runif(n_items * (n_categories - 1), 0.5, 2), nrow = n_items)
b <- matrix(rnorm(n_items * (n_categories - 1), mean = 0, sd = 3), nrow = n_items)
ak <- matrix(seq(-1, 1, length.out = n_categories-1), nrow = n_items, ncol = n_categories-1, byrow = TRUE)
ThetaNormal <- matrix(rnorm(3000))
sim_data <- simdata(a, b, N = n_persons, itemtype = "nominal", nominal=ak, Theta = ThetaNormal)
But the code resulted in the errır below:
The input Theta matrix does not have the correct dimensions
then, I arrange the a - parameter code as below by specifying the number of coulmns as one:
a <- matrix(runif(n_items * (n_categories - 1), 0.5, 2), nrow = n_items, ncol = 1)
then a-parameters were generated as only one column although the nominal model requires parameters for each category. I am not sure whether it is correct or not.
How can I deal with this problem?
-- Dr. Serpil ÇELİKTEN DEMİREL
Dicle Üniversitesi
Eğitimde Ölçme ve Değerlendirme Anabilim Dalı