Reanalyze some data from:

Init

library(pacman)
p_load(kirkegaard, haven, osfr, rms)

Data

Download

#download data files
osf_download(osf_retrieve_file("https://osf.io/utvsb/"), path = "data/data.sav", overwrite = T)

Read

#read data
army = haven::read_sav("data/data.sav")

Recode

#items end with a digit
items = army[str_detect(names(army), "\\d$")]
names(items)
##   [1] "Maze1"        "Maze2"        "Maze3"        "Maze4"       
##   [5] "Maze5"        "Cube1"        "Cube2"        "Cube3"       
##   [9] "Cube4"        "Cube5"        "Cube6"        "Cube7"       
##  [13] "Cube8"        "Cube9"        "Cube10"       "Cube11"      
##  [17] "Cube12"       "Cube13"       "Cube14"       "Cube15"      
##  [21] "Cube16"       "XO1"          "XO2"          "XO3"         
##  [25] "XO4"          "XO5"          "XO6"          "XO7"         
##  [29] "XO8"          "XO9"          "XO10"         "XO11"        
##  [33] "XO12"         "DigitSymbol1" "DigitSymbol2" "DigitSymbol3"
##  [37] "DigitSymbol4" "DigitSymbol5" "DigitSymbol6" "NumbCheck1"  
##  [41] "NumbCheck2"   "NumbCheck3"   "NumbCheck4"   "NumbCheck5"  
##  [45] "NumbCheck6"   "NumbCheck7"   "NumbCheck8"   "NumbCheck9"  
##  [49] "NumbCheck10"  "NumbCheck11"  "NumbCheck12"  "NumbCheck13" 
##  [53] "NumbCheck14"  "NumbCheck15"  "NumbCheck16"  "NumbCheck17" 
##  [57] "NumbCheck18"  "NumbCheck19"  "NumbCheck20"  "NumbCheck21" 
##  [61] "NumbCheck22"  "NumbCheck23"  "NumbCheck24"  "NumbCheck25" 
##  [65] "NumbCheck26"  "NumbCheck27"  "NumbCheck28"  "NumbCheck29" 
##  [69] "NumbCheck30"  "NumbCheck31"  "NumbCheck32"  "NumbCheck33" 
##  [73] "NumbCheck34"  "NumbCheck35"  "NumbCheck36"  "NumbCheck37" 
##  [77] "NumbCheck38"  "NumbCheck39"  "NumbCheck40"  "NumbCheck41" 
##  [81] "NumbCheck42"  "NumbCheck43"  "NumbCheck44"  "NumbCheck45" 
##  [85] "NumbCheck46"  "NumbCheck47"  "NumbCheck48"  "NumbCheck49" 
##  [89] "NumbCheck50"  "Picture1"     "Picture2"     "Picture3"    
##  [93] "Picture4"     "Picture5"     "Picture6"     "Picture7"    
##  [97] "Picture8"     "Picture9"     "Picture10"    "Picture11"   
## [101] "Picture12"    "Picture13"    "Picture14"    "Picture15"   
## [105] "Picture16"    "Picture17"    "Picture18"    "Picture19"   
## [109] "Picture20"    "Geometric1"   "Geometric2"   "Geometric3"  
## [113] "Geometric4"   "Geometric5"   "Geometric6"   "Geometric7"  
## [117] "Geometric8"   "Geometric9"   "Geometric10"
#recode to 1/0 format
items_10 = map_df(items, ~as.numeric(. == 1))

#how much missing?
miss_amount(items_10)
## cases with missing data  vars with missing data cells with missing data 
##              0.96000000              0.48000000              0.05862345

IRT

#subset without digitsymbol -- not binary-ish
items_10_noDS = items_10 %>% select(-starts_with("Digit"))
names(items_10_noDS)
##   [1] "Maze1"       "Maze2"       "Maze3"       "Maze4"       "Maze5"      
##   [6] "Cube1"       "Cube2"       "Cube3"       "Cube4"       "Cube5"      
##  [11] "Cube6"       "Cube7"       "Cube8"       "Cube9"       "Cube10"     
##  [16] "Cube11"      "Cube12"      "Cube13"      "Cube14"      "Cube15"     
##  [21] "Cube16"      "XO1"         "XO2"         "XO3"         "XO4"        
##  [26] "XO5"         "XO6"         "XO7"         "XO8"         "XO9"        
##  [31] "XO10"        "XO11"        "XO12"        "NumbCheck1"  "NumbCheck2" 
##  [36] "NumbCheck3"  "NumbCheck4"  "NumbCheck5"  "NumbCheck6"  "NumbCheck7" 
##  [41] "NumbCheck8"  "NumbCheck9"  "NumbCheck10" "NumbCheck11" "NumbCheck12"
##  [46] "NumbCheck13" "NumbCheck14" "NumbCheck15" "NumbCheck16" "NumbCheck17"
##  [51] "NumbCheck18" "NumbCheck19" "NumbCheck20" "NumbCheck21" "NumbCheck22"
##  [56] "NumbCheck23" "NumbCheck24" "NumbCheck25" "NumbCheck26" "NumbCheck27"
##  [61] "NumbCheck28" "NumbCheck29" "NumbCheck30" "NumbCheck31" "NumbCheck32"
##  [66] "NumbCheck33" "NumbCheck34" "NumbCheck35" "NumbCheck36" "NumbCheck37"
##  [71] "NumbCheck38" "NumbCheck39" "NumbCheck40" "NumbCheck41" "NumbCheck42"
##  [76] "NumbCheck43" "NumbCheck44" "NumbCheck45" "NumbCheck46" "NumbCheck47"
##  [81] "NumbCheck48" "NumbCheck49" "NumbCheck50" "Picture1"    "Picture2"   
##  [86] "Picture3"    "Picture4"    "Picture5"    "Picture6"    "Picture7"   
##  [91] "Picture8"    "Picture9"    "Picture10"   "Picture11"   "Picture12"  
##  [96] "Picture13"   "Picture14"   "Picture15"   "Picture16"   "Picture17"  
## [101] "Picture18"   "Picture19"   "Picture20"   "Geometric1"  "Geometric2" 
## [106] "Geometric3"  "Geometric4"  "Geometric5"  "Geometric6"  "Geometric7" 
## [111] "Geometric8"  "Geometric9"  "Geometric10"
#fit IRT 2PN
irt_fit = irt.fa(items_10_noDS)
## Warning in tetrachoric(x, correct = correct): Item = Maze1 had no variance
## and was deleted
## Warning in tetrachoric(x, correct = correct): Item = Cube1 had no variance
## and was deleted
## Warning in tetrachoric(x, correct = correct): Item = Cube2 had no variance
## and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck2 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck5 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck7 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck8 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck9 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck12 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck14 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck15 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck19 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck21 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck22 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck23 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck27 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck28 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck30 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck31 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck32 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck35 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck36 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck38 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck39 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck40 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck42 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck46 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck47 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = NumbCheck50 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = Picture1 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = Picture2 had no
## variance and was deleted
## Warning in tetrachoric(x, correct = correct): Item = Picture14 had no
## variance and was deleted
## Warning in cor.smooth(mat): Matrix was not positive definite, smoothing was
## done
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs
## = np.obs, : The estimated weights for the factor scores are probably
## incorrect. Try a different factor extraction method.

irt_fit$fa
## Factor Analysis using method =  minres
## Call: fa(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, 
##     fm = fm)
## Standardized loadings (pattern matrix) based upon correlation matrix
##               MR1      h2   u2 com
## Maze2        0.46 0.21490 0.79   1
## Maze3        0.35 0.12529 0.87   1
## Maze4        0.24 0.05710 0.94   1
## Maze5        0.24 0.05732 0.94   1
## Cube3        0.77 0.59480 0.41   1
## Cube4        0.73 0.53654 0.46   1
## Cube5        0.52 0.27194 0.73   1
## Cube6        0.32 0.10340 0.90   1
## Cube7        0.25 0.06068 0.94   1
## Cube8        0.39 0.14938 0.85   1
## Cube9        0.28 0.07967 0.92   1
## Cube10       0.22 0.04746 0.95   1
## Cube11       0.26 0.06839 0.93   1
## Cube12       0.11 0.01143 0.99   1
## Cube13       0.26 0.06622 0.93   1
## Cube14       0.36 0.13063 0.87   1
## Cube15       0.15 0.02318 0.98   1
## Cube16       0.11 0.01240 0.99   1
## XO1          0.85 0.72389 0.28   1
## XO2          0.32 0.10272 0.90   1
## XO3          0.93 0.87063 0.13   1
## XO4          0.31 0.09652 0.90   1
## XO5          0.32 0.10255 0.90   1
## XO6          0.73 0.53827 0.46   1
## XO7          0.91 0.82671 0.17   1
## XO8          0.91 0.82671 0.17   1
## XO9          0.33 0.10982 0.89   1
## XO10         0.62 0.38487 0.62   1
## XO11         0.36 0.12659 0.87   1
## XO12         0.29 0.08565 0.91   1
## NumbCheck1   0.84 0.70478 0.30   1
## NumbCheck3   0.54 0.29445 0.71   1
## NumbCheck4   0.65 0.42559 0.57   1
## NumbCheck6   0.55 0.30624 0.69   1
## NumbCheck10  0.55 0.30169 0.70   1
## NumbCheck11  0.80 0.63980 0.36   1
## NumbCheck13  0.38 0.14471 0.86   1
## NumbCheck16  0.57 0.32524 0.67   1
## NumbCheck17  0.49 0.23633 0.76   1
## NumbCheck18  0.89 0.79081 0.21   1
## NumbCheck20  0.61 0.36815 0.63   1
## NumbCheck24  0.51 0.26317 0.74   1
## NumbCheck25  0.51 0.25589 0.74   1
## NumbCheck26  0.44 0.19406 0.81   1
## NumbCheck29  0.37 0.13449 0.87   1
## NumbCheck33  0.38 0.14114 0.86   1
## NumbCheck34  0.38 0.14648 0.85   1
## NumbCheck37  0.21 0.04407 0.96   1
## NumbCheck41  0.18 0.03188 0.97   1
## NumbCheck43  0.19 0.03703 0.96   1
## NumbCheck44  0.16 0.02655 0.97   1
## NumbCheck45  0.14 0.02069 0.98   1
## NumbCheck48  0.02 0.00045 1.00   1
## NumbCheck49 -0.01 0.00011 1.00   1
## Picture3     0.83 0.68159 0.32   1
## Picture4     0.28 0.07601 0.92   1
## Picture5     0.13 0.01776 0.98   1
## Picture6     0.82 0.68060 0.32   1
## Picture7     0.44 0.19135 0.81   1
## Picture8    -0.05 0.00239 1.00   1
## Picture9     0.46 0.21526 0.78   1
## Picture10   -0.22 0.04840 0.95   1
## Picture11    0.21 0.04346 0.96   1
## Picture12    0.59 0.34560 0.65   1
## Picture13    0.12 0.01421 0.99   1
## Picture15    0.27 0.07464 0.93   1
## Picture16    0.76 0.57864 0.42   1
## Picture17    0.79 0.62274 0.38   1
## Picture18    0.18 0.03326 0.97   1
## Picture19    0.38 0.14367 0.86   1
## Picture20    0.24 0.05913 0.94   1
## Geometric1   0.75 0.56568 0.43   1
## Geometric2   0.55 0.30458 0.70   1
## Geometric3   0.48 0.23001 0.77   1
## Geometric4   0.33 0.10605 0.89   1
## Geometric5   0.63 0.39741 0.60   1
## Geometric6   0.09 0.00774 0.99   1
## Geometric7   0.36 0.12657 0.87   1
## Geometric8   0.37 0.13431 0.87   1
## Geometric9   0.38 0.14813 0.85   1
## Geometric10  0.26 0.06706 0.93   1
## 
##                  MR1
## SS loadings    19.16
## Proportion Var  0.24
## 
## Mean item complexity =  1
## Test of the hypothesis that 1 factor is sufficient.
## 
## The degrees of freedom for the null model are  3240  and the objective function was  726.64 with Chi Square of  131642.5
## The degrees of freedom for the model are 3159  and the objective function was  702.16 
## 
## The root mean square of the residuals (RMSR) is  0.14 
## The df corrected root mean square of the residuals is  0.14 
## 
## The harmonic number of observations is  210 with the empirical chi square  26654.69  with prob <  0 
## The total number of observations was  210  with Likelihood Chi Square =  126739.9  with prob <  0 
## 
## Tucker Lewis Index of factoring reliability =  0.009
## RMSEA index =  0.466  and the 90 % confidence intervals are  0.431 NA
## BIC =  109848.4
## Fit based upon off diagonal values = 0.74
#remove bad items -- negative loadings or no variance
items_10_noDS_ok = items_10_noDS[(irt_fit$fa$loadings > 0) %>% as.data.frame() %>% subset(MR1) %>% rownames()]
names(items_10_noDS_ok)
##  [1] "Maze2"       "Maze3"       "Maze4"       "Maze5"       "Cube3"      
##  [6] "Cube4"       "Cube5"       "Cube6"       "Cube7"       "Cube8"      
## [11] "Cube9"       "Cube10"      "Cube11"      "Cube12"      "Cube13"     
## [16] "Cube14"      "Cube15"      "Cube16"      "XO1"         "XO2"        
## [21] "XO3"         "XO4"         "XO5"         "XO6"         "XO7"        
## [26] "XO8"         "XO9"         "XO10"        "XO11"        "XO12"       
## [31] "NumbCheck1"  "NumbCheck3"  "NumbCheck4"  "NumbCheck6"  "NumbCheck10"
## [36] "NumbCheck11" "NumbCheck13" "NumbCheck16" "NumbCheck17" "NumbCheck18"
## [41] "NumbCheck20" "NumbCheck24" "NumbCheck25" "NumbCheck26" "NumbCheck29"
## [46] "NumbCheck33" "NumbCheck34" "NumbCheck37" "NumbCheck41" "NumbCheck43"
## [51] "NumbCheck44" "NumbCheck45" "NumbCheck48" "Picture3"    "Picture4"   
## [56] "Picture5"    "Picture6"    "Picture7"    "Picture9"    "Picture11"  
## [61] "Picture12"   "Picture13"   "Picture15"   "Picture16"   "Picture17"  
## [66] "Picture18"   "Picture19"   "Picture20"   "Geometric1"  "Geometric2" 
## [71] "Geometric3"  "Geometric4"  "Geometric5"  "Geometric6"  "Geometric7" 
## [76] "Geometric8"  "Geometric9"  "Geometric10"
#refit
irt_fit = irt.fa(items_10_noDS_ok)
## Warning in cor.smooth(mat): Matrix was not positive definite, smoothing was
## done
## Warning in fa.stats(r = r, f = f, phi = phi, n.obs = n.obs, np.obs
## = np.obs, : The estimated weights for the factor scores are probably
## incorrect. Try a different factor extraction method.

irt_fit$fa
## Factor Analysis using method =  minres
## Call: fa(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, 
##     fm = fm)
## Standardized loadings (pattern matrix) based upon correlation matrix
##              MR1      h2   u2 com
## Maze2       0.47 0.21632 0.78   1
## Maze3       0.35 0.12397 0.88   1
## Maze4       0.24 0.05732 0.94   1
## Maze5       0.24 0.05782 0.94   1
## Cube3       0.77 0.59587 0.40   1
## Cube4       0.73 0.53567 0.46   1
## Cube5       0.52 0.27324 0.73   1
## Cube6       0.32 0.10418 0.90   1
## Cube7       0.25 0.06160 0.94   1
## Cube8       0.39 0.14974 0.85   1
## Cube9       0.28 0.08022 0.92   1
## Cube10      0.22 0.04938 0.95   1
## Cube11      0.27 0.07191 0.93   1
## Cube12      0.11 0.01167 0.99   1
## Cube13      0.26 0.06621 0.93   1
## Cube14      0.37 0.13459 0.87   1
## Cube15      0.16 0.02489 0.98   1
## Cube16      0.11 0.01303 0.99   1
## XO1         0.85 0.72736 0.27   1
## XO2         0.32 0.10273 0.90   1
## XO3         0.93 0.87295 0.13   1
## XO4         0.31 0.09708 0.90   1
## XO5         0.32 0.10285 0.90   1
## XO6         0.73 0.53864 0.46   1
## XO7         0.91 0.82604 0.17   1
## XO8         0.91 0.82604 0.17   1
## XO9         0.33 0.10971 0.89   1
## XO10        0.62 0.38808 0.61   1
## XO11        0.37 0.13395 0.87   1
## XO12        0.30 0.08738 0.91   1
## NumbCheck1  0.84 0.71009 0.29   1
## NumbCheck3  0.54 0.29279 0.71   1
## NumbCheck4  0.66 0.42934 0.57   1
## NumbCheck6  0.55 0.30790 0.69   1
## NumbCheck10 0.55 0.30727 0.69   1
## NumbCheck11 0.80 0.63937 0.36   1
## NumbCheck13 0.38 0.14465 0.86   1
## NumbCheck16 0.57 0.32746 0.67   1
## NumbCheck17 0.49 0.24045 0.76   1
## NumbCheck18 0.89 0.79629 0.20   1
## NumbCheck20 0.61 0.37206 0.63   1
## NumbCheck24 0.52 0.26602 0.73   1
## NumbCheck25 0.51 0.26298 0.74   1
## NumbCheck26 0.45 0.20051 0.80   1
## NumbCheck29 0.37 0.13905 0.86   1
## NumbCheck33 0.38 0.14271 0.86   1
## NumbCheck34 0.38 0.14771 0.85   1
## NumbCheck37 0.21 0.04459 0.96   1
## NumbCheck41 0.18 0.03318 0.97   1
## NumbCheck43 0.20 0.03841 0.96   1
## NumbCheck44 0.17 0.02731 0.97   1
## NumbCheck45 0.14 0.02099 0.98   1
## NumbCheck48 0.02 0.00048 1.00   1
## Picture3    0.83 0.68408 0.32   1
## Picture4    0.28 0.07605 0.92   1
## Picture5    0.13 0.01725 0.98   1
## Picture6    0.83 0.68277 0.32   1
## Picture7    0.44 0.19339 0.81   1
## Picture9    0.46 0.21372 0.79   1
## Picture11   0.21 0.04346 0.96   1
## Picture12   0.59 0.34585 0.65   1
## Picture13   0.12 0.01527 0.98   1
## Picture15   0.27 0.07381 0.93   1
## Picture16   0.76 0.57527 0.42   1
## Picture17   0.79 0.62822 0.37   1
## Picture18   0.18 0.03326 0.97   1
## Picture19   0.38 0.14599 0.85   1
## Picture20   0.25 0.06078 0.94   1
## Geometric1  0.75 0.56240 0.44   1
## Geometric2  0.55 0.30645 0.69   1
## Geometric3  0.48 0.22915 0.77   1
## Geometric4  0.33 0.10869 0.89   1
## Geometric5  0.63 0.39460 0.61   1
## Geometric6  0.10 0.00903 0.99   1
## Geometric7  0.36 0.12990 0.87   1
## Geometric8  0.38 0.14262 0.86   1
## Geometric9  0.39 0.14939 0.85   1
## Geometric10 0.26 0.06884 0.93   1
## 
##                  MR1
## SS loadings    19.22
## Proportion Var  0.25
## 
## Mean item complexity =  1
## Test of the hypothesis that 1 factor is sufficient.
## 
## The degrees of freedom for the null model are  3003  and the objective function was  716.28 with Chi Square of  130482.7
## The degrees of freedom for the model are 2925  and the objective function was  691.67 
## 
## The root mean square of the residuals (RMSR) is  0.14 
## The df corrected root mean square of the residuals is  0.14 
## 
## The harmonic number of observations is  210 with the empirical chi square  24318.55  with prob <  0 
## The total number of observations was  210  with Likelihood Chi Square =  125538.1  with prob <  0 
## 
## Tucker Lewis Index of factoring reliability =  0.009
## RMSEA index =  0.481  and the 90 % confidence intervals are  0.446 NA
## BIC =  109897.9
## Fit based upon off diagonal values = 0.76
#score
irt_fit_score = scoreIrt(irt_fit, items_10_noDS_ok)
army$g_irt = irt_fit_score$theta1 %>% standardize()

#plot
army$g_irt %>% GG_denhist()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#recode far outliers
army$g_irt[army$g_irt < -3] = NA

Regular FA

#extract (sub)test scores
tests = army %>% select(contains("total_score"), -Beta_total_score)
names(tests)
## [1] "Maze_total_score"        "Cube_total_score"       
## [3] "XO_total_score"          "DigitSymbol_total_score"
## [5] "NumbCheck_total_score"   "Picture_total_score"    
## [7] "Geometric_total_score"
#impute missing
tests_imp = miss_impute(tests)

#fit
fa_fit = fa(tests_imp)
fa_fit
## Factor Analysis using method =  minres
## Call: fa(r = tests_imp)
## Standardized loadings (pattern matrix) based upon correlation matrix
##                          MR1   h2   u2 com
## Maze_total_score        0.40 0.16 0.84   1
## Cube_total_score        0.60 0.36 0.64   1
## XO_total_score          0.34 0.11 0.89   1
## DigitSymbol_total_score 0.43 0.19 0.81   1
## NumbCheck_total_score   0.56 0.31 0.69   1
## Picture_total_score     0.41 0.16 0.84   1
## Geometric_total_score   0.55 0.30 0.70   1
## 
##                 MR1
## SS loadings    1.60
## Proportion Var 0.23
## 
## Mean item complexity =  1
## Test of the hypothesis that 1 factor is sufficient.
## 
## The degrees of freedom for the null model are  21  and the objective function was  0.78 with Chi Square of  160.5
## The degrees of freedom for the model are 14  and the objective function was  0.08 
## 
## The root mean square of the residuals (RMSR) is  0.05 
## The df corrected root mean square of the residuals is  0.06 
## 
## The harmonic number of observations is  209 with the empirical chi square  19.45  with prob <  0.15 
## The total number of observations was  210  with Likelihood Chi Square =  16.06  with prob <  0.31 
## 
## Tucker Lewis Index of factoring reliability =  0.978
## RMSEA index =  0.028  and the 90 % confidence intervals are  0 0.074
## BIC =  -58.8
## Fit based upon off diagonal values = 0.96
## Measures of factor score adequacy             
##                                                    MR1
## Correlation of (regression) scores with factors   0.83
## Multiple R square of scores with factors          0.69
## Minimum correlation of possible factor scores     0.38
army$g_fa = fa_fit$scores[, 1] %>% standardize()

Regressions

Which is better, IRT or FA scores? Note that IRT scores do not include some of the items: Digit Symbol or the problematic ones.

#scatter of scores
GG_scatter(army, "g_irt", "g_fa")

#correlations
wtd.cors(army[c("g_irt", "g_fa", "Beta_total_score", "ACT_Comp", "College_GPA")])
##                      g_irt      g_fa Beta_total_score   ACT_Comp
## g_irt            1.0000000 0.6083543        0.6132354 0.24285061
## g_fa             0.6083543 1.0000000        0.9649016 0.38802341
## Beta_total_score 0.6132354 0.9649016        1.0000000 0.36558426
## ACT_Comp         0.2428506 0.3880234        0.3655843 1.00000000
## College_GPA      0.1148794 0.1104303        0.1239335 0.08832275
##                  College_GPA
## g_irt             0.11487945
## g_fa              0.11043025
## Beta_total_score  0.12393350
## ACT_Comp          0.08832275
## College_GPA       1.00000000
#groups
ols(g_fa ~ Male + White + Hispanic + Black + Asian, data = army)
## Frequencies of Missing Values Due to Each Variable
##     g_fa     Male    White Hispanic    Black    Asian 
##        1        4        3        2        2        2 
## 
## Linear Regression Model
##  
##  ols(formula = g_fa ~ Male + White + Hispanic + Black + Asian, 
##      data = army)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     203    LR chi2     23.24    R2       0.108    
##  sigma0.9396    d.f.            5    R2 adj   0.086    
##  d.f.    197    Pr(> chi2) 0.0003    g        0.263    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -2.72600 -0.54600  0.09526  0.64434  2.15791 
##  
##  
##            Coef    S.E.   t     Pr(>|t|)
##  Intercept -0.7818 0.2730 -2.86 0.0046  
##  Male       0.1202 0.1339  0.90 0.3702  
##  White      0.8407 0.2625  3.20 0.0016  
##  Hispanic  -0.1720 0.1982 -0.87 0.3865  
##  Black     -0.6733 0.4265 -1.58 0.1160  
##  Asian      0.3886 0.3908  0.99 0.3213  
## 

Seems that the ordinary factor analysis ones are better here, perhaps due to item coding issues. Group differences seem normal and we can see some correlations to criterion variables as expected – small due to range restriction perhaps / low effort.