"M2 cannot be calulated since df is too low"

327 views
Skip to first unread message

I. L. H.

unread,
May 15, 2017, 9:48:18 PM5/15/17
to mirt-package


Hello everybody

I was trying to use M2 function to get fit statistics from a bifactor model  with a general factor and two specific factors   :

s<- '
G = 1-8'
model12<-mirt.model(s)

model<-c(2,1,2,2,1,1,2,1)
mod_bif<-bfactor(datosbif1,model,model12)

but I got this error " "M2 cannot be calulated since df is too low"

I also saw an old post in this group  where fit statistics are derived from chi2 but I don't know if those statistics would be comparable to the ones that M2 gave me for another model ( not a bifactor one). I am actually trying to compare those models ( a bifactor and a model where factors are only correlated) so getting fit statistics from M2 would be a priority for me, I would like to know if you see something I can change in the model so I could use the M2 function.

Thank you so much.

PD. I am working with a large N =1241

The scale has 8 polytomous items, 4 in  each factor

Phil Chalmers

unread,
May 18, 2017, 8:43:29 PM5/18/17
to I. L. H., mirt-package
On Mon, May 15, 2017 at 9:48 PM, I. L. H. <laure...@gmail.com> wrote:


Hello everybody

I was trying to use M2 function to get fit statistics from a bifactor model  with a general factor and two specific factors   :

s<- '
G = 1-8'
model12<-mirt.model(s)

model<-c(2,1,2,2,1,1,2,1)
mod_bif<-bfactor(datosbif1,model,model12)

but I got this error " "M2 cannot be calulated since df is too low"

I also saw an old post in this group  where fit statistics are derived from chi2 but I don't know if those statistics would be comparable to the ones that M2 gave me for another model ( not a bifactor one). I am actually trying to compare those models ( a bifactor and a model where factors are only correlated) so getting fit statistics from M2 would be a priority for me, I would like to know if you see something I can change in the model so I could use the M2 function.

The M2() function is currently computing what is known as the M2* statistic for polytomous response data. One downside of this is the number of moments is somewhat limited relative to the number of intercept parameters fitted (this is a function of the covariance matrix, not the sample size). I have plans to extend this function to allow for more intensive polytomous models with more intercepts, but currently haven't had time to add it. So for now, you may be out of luck, and will have to find other ways to compare the models (e.g., likelihood ratio tests, goodness-of-fit tests, etc). HTH.

Phil
 

Thank you so much.

PD. I am working with a large N =1241

The scale has 8 polytomous items, 4 in  each factor

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

I. L. H.

unread,
May 28, 2017, 8:12:46 PM5/28/17
to mirt-package
Hello again!

Thank you so much for getting back to me,  I've been trying to understand the log likelihood and  information-based fit indices (AIC, BIC) that MIRT provides, I also know that the package does have an "anova" function in case you want to perform a likelihood ratio test. Looks like I will be able to compare the fit of the models I am exploring by using this information, I just need to know  whether my models are nested or not, I would really appreciate it if  you could take a look at them  and help me decide  if  a likelihood ratio test would be the most suitable option  or If I need the information fit indices in case the models are not nested. Thank you again for  all your help.

The scale I am working with has 8 polytomous items and two factors, since I want to assess the scale's structure these are the models I am trying to compare:

1. A model with two correlated factors

s<- '
FA= 2 , 5, 6 , 8
FB= 1, 3,4, 7
COV= FA*FB'

model_1<-mirt.model(s)

modelo_cov<-mirt(datosbif_1,model_1)



2. A model with two uncorrelated factors

s<- '
FA= 2, 5, 6, 8
FB= 1, 3, 4, 7 '


model_1<-mirt.model(s)

modelo_nocov<-mirt(datosbif_1,model_1)

3. A bifactor model with a General Factor and two specific factors

Phil Chalmers

unread,
May 29, 2017, 7:09:02 PM5/29/17
to I. L. H., mirt-package
On Sun, May 28, 2017 at 8:12 PM, I. L. H. <laure...@gmail.com> wrote:
Hello again!

Thank you so much for getting back to me,  I've been trying to understand the log likelihood and  information-based fit indices (AIC, BIC) that MIRT provides, I also know that the package does have an "anova" function in case you want to perform a likelihood ratio test. Looks like I will be able to compare the fit of the models I am exploring by using this information, I just need to know  whether my models are nested or not, I would really appreciate it if  you could take a look at them  and help me decide  if  a likelihood ratio test would be the most suitable option  or If I need the information fit indices in case the models are not nested. Thank you again for  all your help.

You can use both, information indices are always a good strategy, even when models are nested. 
 

The scale I am working with has 8 polytomous items and two factors, since I want to assess the scale's structure these are the models I am trying to compare:

1. A model with two correlated factors

s<- '
FA= 2 , 5, 6 , 8
FB= 1, 3,4, 7
COV= FA*FB'

model_1<-mirt.model(s)

modelo_cov<-mirt(datosbif_1,model_1)



2. A model with two uncorrelated factors

s<- '
FA= 2, 5, 6, 8
FB= 1, 3, 4, 7 '


model_1<-mirt.model(s)

modelo_nocov<-mirt(datosbif_1,model_1)

3. A bifactor model with a General Factor and two specific factors

s<- '
G = 1-8'

model12<-mirt.model(s)

model<-c(2,1,2,2,1,1,2,1)

mod_bif<-bfactor(datosbif1,model,model12

1) and 2) are nested. 3) is not. 

yingyi....@gmail.com

unread,
May 10, 2018, 4:36:58 PM5/10/18
to mirt-package
Hi Phil, 

I am having the same trouble now, and I have obs=600+, 7 items ranged from score 1-6. I was trying to get M2, however with error: Error: M2 cannot be calulated since df is too low.
By any chance, I wonder if now the new version of mirt solves this problem? Or is there an alternative option to get a model fit indices from mirt package?

Thanks in advance!

Yingyi
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.

Phil Chalmers

unread,
May 10, 2018, 9:38:07 PM5/10/18
to yingyi....@gmail.com, mirt-package
Unfortunately no I have not added a solution to this low degrees of freedom limitation. It's on the long TODO list, but to me it's not high priority (especially given the complexity of the solution). 

Phil

Reply all
Reply to author
Forward
0 new messages