How do i get/extract absolute fit indices e.g. RMSEA?

95 views
Skip to first unread message

Fabio

unread,
Sep 5, 2017, 10:26:27 AM9/5/17
to mirt-package

Dear all,

i am new at using R and the mirt-package for IRT calculations.

Whenever i estimate models with the function "mirt" and print the estimated model with the function "print" to get information about the fit statistic, i just get the comparative fit indices AIC, AICc, BIC and SABIC.
To interpret the goodness of the model it would be very helpful to have information about absolute measures of fit e.g. RMSEA.
If i try to get RMSEA with the function "extract.mirt(model,"RMSEA")" i get "NaN".
  
What am i doing wrong? Do i miss something?


Thank you very much in advance for your help!

Fabio


Here an example of the issue:

The matrix (data.kft.matrix) consists of 456 observations and 6 manifest variables. Three latent variables are each composed of two manifest variables.
I programmed and estimated the same model with the identical data in the software Mplus and got the value 0.016 for RMSEA. 

      
mirt.kft <- mirt.model('                                                                                      
verbal = 1,2
           quantitativ = 3,4                
nonverbal = 5,6
     COV = verbal*quantitativ, verbal*nonverbal, quantitativ*nonverbal')
      
     fit.mirt.kft <- mirt(data = data.kft.matrix, mirt.kft, method = "MHRM")
     

     > print(fit.mirt.kft)
Call:
mirt(data = data.kft.matrix, model = mirt.kft, method = "MHRM")

Full-information item factor analysis with 3 factor(s).
Converged within 0.001 tolerance after 240 MHRM iterations.
mirt version: 1.24 
M-step optimizer: NR1 

Log-likelihood = -6996.368, SE = 0.023
Estimated parameters: 123 
AIC = 14238.74; AICc = 14330.62
BIC = 14745.8; SABIC = 14355.44

> extract.mirt(fit.mirt.kft, 'RMSEA')
[1] NaN 
     
 

Phil Chalmers

unread,
Sep 5, 2017, 11:36:26 AM9/5/17
to Fabio, mirt-package
RMSEA is only computed when the response data are not overly sparse. You probably want something like what the M2() function returns.

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.

Fabio

unread,
Sep 7, 2017, 7:04:02 AM9/7/17
to mirt-package
Hi Phil,

thank you for your fast reply! I am going to try the M2() function.

Fabio

Phil

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

Fabio

unread,
Sep 12, 2017, 11:26:34 AM9/12/17
to mirt-package
Dear Phil, dear all,

when i use the M2() function for my exmaple written above it appears the following error-message:

> M2(fit.mirt.kft)

Error: Fit statistics cannot be computed when there are missing data. Pass a suitable impute argument to compute statistics following multiple data imputations

It is confusing because there are no missings in my data. The function is.na(data.kft.matrix) gave logically FALSE for each element of the matrix.
I saw a post with the same problem with the M2() function but I didnt find a solution.

Do you have an idea? Thank you for your help!

Fabio

Fabio

unread,
Sep 13, 2017, 9:10:54 AM9/13/17
to mirt-package
i actually found one missing after checking the raw data. I didnt noticed that the is.na function does not display all elements - some were omitted.

Sorry for the false alarm!

Fabio

Phil Chalmers

unread,
Sep 13, 2017, 9:12:57 AM9/13/17
to Fabio, mirt-package
Using something like any(is.na(data)) will return the result you want next time to quickly check. Cheers.

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.
Reply all
Reply to author
Forward
0 new messages