# NOT RUN {
# }
# NOT RUN {
set.seed(1234)
n <- 40
N <- 500
# only first 5 items as anchors
model <- 'F = 1-40
CONSTRAINB = (1-5, a1), (1-5, d)'
a <- matrix(1, n)
d <- matrix(rnorm(n), n)
group <- c(rep('Group_1', N), rep('Group_2', N))
## -------------
# groups completely equal
dat1 <- simdata(a, d, N, itemtype = 'dich')
dat2 <- simdata(a, d, N, itemtype = 'dich')
dat <- rbind(dat1, dat2)
mod <- multipleGroup(dat, model, group=group, SE=TRUE,
invariance=c('free_means', 'free_var'))
param_set <- draw_parameters(mod, 100)
head(param_set)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab