Dear Phil,
1.
I run an example in mirt manual but got error:
dat <- expand.table(LSAT6)
model <- mirt.model('
Theta = 1-5
MEAN = Theta
COV = Theta*Theta')
sv <- mirt(dat, model, itemtype = 'Rasch', pars = 'values')
eqfun <- function(p, optim_args) {
sum(p[1:5])
}
solnp_args <- list(eqfun=eqfun, eqB=0)
mod <- mirt(dat, model, itemtype = 'Rasch', optimizer = 'solnp', solnp_args=solnp_args)
> Error: expecting a single value
2. And, I still cannot understand why the "p" in eqfun would automatically be equal to the item difficulty? Didn't see the relation.
3. At the same time, what if I want to add more constraints, such as the the "prod(slope)=1", could you give me an example to do this?
--
Many thanks.
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
3. At the same time, what if I want to add more constraints, such as the the "prod(slope)=1", could you give me an example to do this?```dat <- expand.table(LSAT6)model <- mirt.model('Theta = 1-5COV = Theta*Theta')sv <- mirt(dat, model, itemtype = '2PL', pars = 'values')sv[sv$est,]eqfun <- function(p, optim_args) {prod(p[seq(1,10,2)])}solnp_args <- list(eqfun=eqfun, eqB=1)mod <- mirt(dat, model, itemtype = '2PL', optimizer = 'solnp', solnp_args=solnp_args)coef(mod, simplify=TRUE)prod(coef(mod, simplify=TRUE)$items[,1])
Hi Phil,
Actually, I will compare a IRT model with its another equivalent model. For the equivalent model, the GroupPars are required to be constrained nonlinear with the slope parameters. I would like to test if they could get similar estimates numerically. For this, might I know would you plan to include GroupPars to optimization? Just a suggestion. Thank you.