Dear Phil,
Thank you very much for the package and your support. My question is: as the factor scores are weighted by the probability of latent class membership, does mirt provide factor scores for each individual only for the class with the highest estimated class‐membership probability (under Class_1 label)?
I used a piece of the script from the example:
library(mirt)
set.seed(12345)
nitems <- 20
a1 <- matrix(.75, ncol=1, nrow=nitems)
a2 <- matrix(1.25, ncol=1, nrow=nitems)
d1 <- matrix(rnorm(nitems,0,1),ncol=1)
d2 <- matrix(rnorm(nitems,0,1),ncol=1)
itemtype <- rep('2PL', nrow(a1))
N1 <- 500
N2 <- N1*2 # second class twice as large
dataset1 <- simdata(a1, d1, N1, itemtype)
dataset2 <- simdata(a2, d2, N2, itemtype)
dat <- rbind(dataset1, dataset2)
# group <- c(rep('D1', N1), rep('D2', N2))
# Mixture Rasch model (Rost, 1990)
models <- 'F1 = 1-20
CONSTRAIN = (1-20, a1)'
mod_mix <- multipleGroup(dat, models, dentype = 'mixture-2', GenRandomPars = TRUE)
head(fscores(mod_mix)) # theta estimates
Class_1
[1,] -0.3609178
[2,] -1.6950807
[3,] -0.8217168
[4,] 0.8090483
[5,] 0.7936363
[6,] 0.2286020
Thank you in advance for your clarification.
Best regards,
Irina