ERRORsubscript out of bounds and NAS introduced by coercion error in mirt package

40 views
Skip to first unread message

Reyhaneh

unread,
Mar 6, 2017, 11:58:59 AM3/6/17
to mirt-package
 Hi,

I face a problem using confirmatory mirt.
and the files attached to the question is my output
 what is wrong with my model

thanks
Rey
photo_2017-03-06_20-11-49.jpg

Phil Chalmers

unread,
Mar 8, 2017, 8:39:59 AM3/8/17
to Reyhaneh, mirt-package
It looks like your cmodel object needs some hard returns. Instead of 

cmodel <- 'F1 = 1, 2, 3 F2 = 4, 5-7'

use 

cmodel <- 'F1 = 1, 2, 3 
                  F2 = 4, 5-7'



Phil

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reyhaneh

unread,
Mar 12, 2017, 12:01:06 AM3/12/17
to mirt-package, rey.re...@gmail.com
Hi,
I change the model as you said but now I have a problem in number of iteration
EM cycles terminated after 500 iterations.
does it mean something special?

I change the method from and NCYCLES and it does help but is it right we change the options for our purpose?

> cmod <- mirt(geo87, cmodel,method = 'MHRM')
Stage 3 = 71, LL = -43829.1, AR(1.40) = [0.26], gam = 0.0073, Max-Change = 0.0007
Calculating log-likelihood...
Call: mirt(data = geo87, model = cmodel, method = "MHRM") Full-information item factor analysis with 3 factor(s). Converged within 0.001 tolerance after 71 MHRM iterations. mirt version: 1.22 M-step optimizer: BFGS Log-likelihood = -26592.6, SE = 0.053 Estimated parameters: 32 AIC = 53249.21; AICc = 53249.63 BIC = 53457.76; SABIC = 53356.07


On Wednesday, 8 March 2017 17:09:59 UTC+3:30, Phil Chalmers wrote:
It looks like your cmodel object needs some hard returns. Instead of 

cmodel <- 'F1 = 1, 2, 3 F2 = 4, 5-7'

use 

cmodel <- 'F1 = 1, 2, 3 
                  F2 = 4, 5-7'



Phil

On Mon, Mar 6, 2017 at 11:58 AM, Reyhaneh <rey.re...@gmail.com> wrote:
 Hi,

I face a problem using confirmatory mirt.
and the files attached to the question is my output
 what is wrong with my model

thanks
Rey

--
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.

Phil Chalmers

unread,
Mar 12, 2017, 9:44:15 AM3/12/17
to Reyhaneh, mirt-package
On Sun, Mar 12, 2017 at 12:01 AM, Reyhaneh <rey.re...@gmail.com> wrote:
Hi,

I change the model as you said but now I have a problem in number of iteration
EM cycles terminated after 500 iterations.
does it mean something special?

Generally yes, it means that the model does not have a very sharply defined likelihood location. Could be due to a weak identification (too few indicator variables), smaller samples sizes, or even too few quadrature in the EM algorithm.
 


I change the method from and NCYCLES and it does help but is it right we change the options for our purpose?

> cmod <- mirt(geo87, cmodel,method = 'MHRM')
Stage 3 = 71, LL = -43829.1, AR(1.40) = [0.26], gam = 0.0073, Max-Change = 0.0007
Calculating log-likelihood...
Call: mirt(data = geo87, model = cmodel, method = "MHRM") Full-information item factor analysis with 3 factor(s). Converged within 0.001 tolerance after 71 MHRM iterations. mirt version: 1.22 M-step optimizer: BFGS Log-likelihood = -26592.6, SE = 0.053 Estimated parameters: 32 AIC = 53249.21; AICc = 53249.63 BIC = 53457.76; SABIC = 53356.07


Sure this seems fine, and it looks like you get better behaviour given how many latent traits you're estimating (the EM starts to break down around 3, so this isn't too surprising). Cheers. 


On Wednesday, 8 March 2017 17:09:59 UTC+3:30, Phil Chalmers wrote:
It looks like your cmodel object needs some hard returns. Instead of 

cmodel <- 'F1 = 1, 2, 3 F2 = 4, 5-7'

use 

cmodel <- 'F1 = 1, 2, 3 
                  F2 = 4, 5-7'



Phil

On Mon, Mar 6, 2017 at 11:58 AM, Reyhaneh <rey.re...@gmail.com> wrote:
 Hi,

I face a problem using confirmatory mirt.
and the files attached to the question is my output
 what is wrong with my model

thanks
Rey

--
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.

--
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+unsubscribe@googlegroups.com.

Reyhaneh

unread,
Mar 17, 2017, 3:07:07 AM3/17/17
to mirt-package, rey.re...@gmail.com
my current question maybe a little bit irrelevant to the question i make at first
after fitting so many models like exploratory and confirmatory,and compare them.
I find out that i have so week factor loading and unsatisfying fit indicators

I come back to my data and see that the test I choose is time based one and the test lets of my analysis are at the END of the test
and when I see the real data before changing them to binary ones for using models, I examine the last question of the test let and I found out 75% of the test takers did not even answer it and let it white in their answer sheet
...

so what happen to my model fitting and all these story are they related issues ?
and what is the solution?
Reply all
Reply to author
Forward
0 new messages