Good afternoon everyone!
I am currently experimenting with differential item functioning! The personality trait questionnaire I use is polytomous (likert scale 1-5). I have found the below example, but in my case, it didn't let me proceed the independent, not-constrained model without constraining at least some variables as anchor variables.
Also in other examples I noticed this. I was wondering why in the below example was no need for any anchor items. Has this to do with the simulation of the data?
Many thanks advance for your ideas!
Greta
############
#polytomous item example
set.seed(12345)
a <- matrix(abs(rnorm(15,1,.3)), ncol=1)
d <- matrix(rnorm(15,0,.7),ncol=1)
d <- cbind(d, d-1, d-2)
itemtype <- rep('graded', nrow(a))
N <- 1000
dataset1 <- simdata(a, d, N, itemtype)
dataset2 <- simdata(a, d, N, itemtype, mu = .1, sigma = matrix(1.5))
dat <- rbind(dataset1, dataset2)
group <- c(rep('D1', N), rep('D2', N))
model <- 'F1 = 1-15'
mod_configural <- multipleGroup(dat, model, group = group)
plot(mod_configural