7.13 Practice Session: Calculating Absolute Fit Measures

We can use modelfit function in the package to calculate \(M_2\), \(RMSEA_2\), and \(SRMSR\) statistic:

Code
library(GDINA)

modelfit(fit1)
## Test-level Model Fit Evaluation
## 
## Relative fit statistics: 
##  -2 log likelihood =  15050  ( number of parameters =  37 )
##  AIC  =  15124  BIC =  15299 
##  CAIC =  15336  SABIC =  15181 
## 
## Absolute fit statistics: 
##  M2 =  153  df =  83  p =  0 
##  RMSEA2 =  0.032  with  90 % CI: [ 0.024 , 0.04 ]
##  SRMSR =  0.047
Code
modelfit(fit2)
## Test-level Model Fit Evaluation
## 
## Relative fit statistics: 
##  -2 log likelihood =  14863  ( number of parameters =  67 )
##  AIC  =  14997  BIC =  15314 
##  CAIC =  15381  SABIC =  15101 
## 
## Absolute fit statistics: 
##  M2 =  61  df =  53  p =  0.21 
##  RMSEA2 =  0.013  with  90 % CI: [ 0 , 0.027 ]
##  SRMSR =  0.027
Code
modelfit(fit3)
## Test-level Model Fit Evaluation
## 
## Relative fit statistics: 
##  -2 log likelihood =  14887  ( number of parameters =  50 )
##  AIC  =  14987  BIC =  15224 
##  CAIC =  15274  SABIC =  15065 
## 
## Absolute fit statistics: 
##  M2 =  70  df =  70  p =  0.49 
##  RMSEA2 =  0  with  90 % CI: [ 0 , 0.02 ]
##  SRMSR =  0.028