Loading the Data

Directly from Excel, here is a look at the data.

AN.data <- read_excel("Civility data_2012.xlsx", sheet="Civility data_2012")
AN.data$N <- seq(1,dim(AN.data)[[1]])
summary(AN.data)
##      Gender           Age           Job_type     Direct_indirect
##  Min.   :1.000   Min.   :19.00   Min.   :0.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:29.00   1st Qu.:5.000   1st Qu.:1.000  
##  Median :2.000   Median :39.00   Median :5.000   Median :1.000  
##  Mean   :1.898   Mean   :39.91   Mean   :5.031   Mean   :1.102  
##  3rd Qu.:2.000   3rd Qu.:50.00   3rd Qu.:6.000   3rd Qu.:1.000  
##  Max.   :2.000   Max.   :67.00   Max.   :8.000   Max.   :2.000  
##  NA's   :2       NA's   :17                      NA's   :3      
##       Unit            Hrs            Ten_yr           Ten_m       
##  Min.   : 1.00   Min.   :16.00   Min.   : 0.000   Min.   : 0.000  
##  1st Qu.: 3.00   1st Qu.:36.00   1st Qu.: 2.000   1st Qu.: 0.000  
##  Median :12.00   Median :36.00   Median : 4.000   Median : 2.000  
##  Mean   :10.35   Mean   :37.82   Mean   : 6.825   Mean   : 2.954  
##  3rd Qu.:14.75   3rd Qu.:40.00   3rd Qu.: 9.000   3rd Qu.: 5.000  
##  Max.   :31.00   Max.   :90.00   Max.   :40.000   Max.   :11.000  
##  NA's   :2       NA's   :63      NA's   :28       NA's   :29      
##      VAgEx          VAg_cust          VAg_co          Vag_sup       
##  Min.   :1.000   Min.   : 0.000   Min.   : 0.000   Min.   : 0.0000  
##  1st Qu.:1.000   1st Qu.: 1.000   1st Qu.: 0.000   1st Qu.: 0.0000  
##  Median :2.000   Median : 1.000   Median : 1.000   Median : 0.0000  
##  Mean   :2.713   Mean   : 3.169   Mean   : 1.677   Mean   : 0.3174  
##  3rd Qu.:4.000   3rd Qu.: 3.000   3rd Qu.: 2.000   3rd Qu.: 0.0000  
##  Max.   :6.000   Max.   :80.000   Max.   :40.000   Max.   :15.0000  
##                  NA's   :137      NA's   :164                       
##     IntentVA        IntensVA        PerInVA         PerpowVA    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:3.632   1st Qu.:1.000  
##  Median :3.000   Median :3.000   Median :5.000   Median :2.000  
##  Mean   :3.258   Mean   :3.315   Mean   :4.226   Mean   :2.127  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:3.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.000  
##  NA's   :73      NA's   :71      NA's   :62      NA's   :48     
##     IntimEx         Inti_cus         Inti_co          Inti_sup     
##  Min.   :1.000   Min.   : 0.000   Min.   : 0.000   Min.   :0.0000  
##  1st Qu.:1.000   1st Qu.: 0.000   1st Qu.: 0.000   1st Qu.:0.0000  
##  Median :1.000   Median : 1.000   Median : 1.000   Median :0.0000  
##  Mean   :2.115   Mean   : 1.775   Mean   : 1.354   Mean   :0.1798  
##  3rd Qu.:3.000   3rd Qu.: 2.000   3rd Qu.: 1.750   3rd Qu.:0.0000  
##  Max.   :6.000   Max.   :51.000   Max.   :21.000   Max.   :6.0000  
##                  NA's   :214      NA's   :198                      
##     IntentIn        IntensIn        PerInInt        PerpoInt    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:3.000   1st Qu.:1.000  
##  Median :3.000   Median :3.000   Median :4.000   Median :2.000  
##  Mean   :3.112   Mean   :3.146   Mean   :3.792   Mean   :2.031  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:2.933  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.000  
##  NA's   :105     NA's   :104     NA's   :87      NA's   :70     
##     ExclusEx        Excl_cus         Excl_co           Excl_sup     
##  Min.   :1.000   Min.   :0.0000   Min.   :  0.000   Min.   :0.0000  
##  1st Qu.:1.000   1st Qu.:0.0000   1st Qu.:  0.000   1st Qu.:0.0000  
##  Median :1.000   Median :0.0000   Median :  1.000   Median :0.0000  
##  Mean   :1.789   Mean   :0.1236   Mean   :  3.316   Mean   :0.1236  
##  3rd Qu.:2.000   3rd Qu.:0.0000   3rd Qu.:  3.000   3rd Qu.:0.0000  
##  Max.   :6.000   Max.   :3.0000   Max.   :101.000   Max.   :6.0000  
##                  NA's   :267      NA's   :220                       
##     IntentEx        IntensEx        PerInEx         PerpoEx     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.000  
##  Median :2.890   Median :2.970   Median :3.275   Median :1.625  
##  Mean   :2.885   Mean   :2.809   Mean   :3.185   Mean   :1.841  
##  3rd Qu.:3.990   3rd Qu.:3.610   3rd Qu.:4.000   3rd Qu.:2.095  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.000  
##  NA's   :105     NA's   :105     NA's   :74      NA's   :66     
##     UnderEx         Und_cus            Und_co        Und_sup      
##  Min.   :1.000   Min.   : 0.0000   Min.   : 0.0   Min.   :0.0000  
##  1st Qu.:1.000   1st Qu.: 0.0000   1st Qu.: 0.0   1st Qu.:0.0000  
##  Median :1.000   Median : 0.0000   Median : 1.0   Median :0.0000  
##  Mean   :1.888   Mean   : 0.5372   Mean   : 1.7   Mean   :0.1208  
##  3rd Qu.:2.000   3rd Qu.: 1.0000   3rd Qu.: 2.0   3rd Qu.:0.0000  
##  Max.   :6.000   Max.   :10.0000   Max.   :25.0   Max.   :4.0000  
##                  NA's   :235       NA's   :196                    
##     IntentUn        IntensUn        PerInUnd        PerpoUnd    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.350   1st Qu.:1.000  
##  Median :3.660   Median :3.000   Median :3.850   Median :2.000  
##  Mean   :3.403   Mean   :3.217   Mean   :3.536   Mean   :2.068  
##  3rd Qu.:4.330   3rd Qu.:4.000   3rd Qu.:4.490   3rd Qu.:2.480  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.000  
##  NA's   :107     NA's   :106     NA's   :85      NA's   :70     
##      RudeEx         Rude_cus         Rude_co          Rude_sup      
##  Min.   :1.000   Min.   : 0.000   Min.   : 0.000   Min.   : 0.0000  
##  1st Qu.:2.000   1st Qu.: 1.000   1st Qu.: 1.000   1st Qu.: 0.0000  
##  Median :3.000   Median : 2.000   Median : 2.000   Median : 0.0000  
##  Mean   :3.593   Mean   : 2.112   Mean   : 2.552   Mean   : 0.3343  
##  3rd Qu.:6.000   3rd Qu.: 2.000   3rd Qu.: 3.000   3rd Qu.: 0.0000  
##  Max.   :6.000   Max.   :20.000   Max.   :51.000   Max.   :20.0000  
##                  NA's   :151      NA's   :115                       
##     IntentR         IntensR          PerInR          PerpoR     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:3.000   1st Qu.:1.000  
##  Median :3.000   Median :3.000   Median :4.000   Median :2.000  
##  Mean   :2.964   Mean   :3.007   Mean   :3.902   Mean   :2.015  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:3.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.000  
##  NA's   :43      NA's   :42      NA's   :37      NA's   :30     
##       ICEx         IC_cust            IC_co            IC_sup       
##  Min.   :1.00   Min.   :  0.000   Min.   : 0.000   Min.   :0.00000  
##  1st Qu.:1.00   1st Qu.:  0.000   1st Qu.: 0.000   1st Qu.:0.00000  
##  Median :1.00   Median :  0.000   Median : 1.000   Median :0.00000  
##  Mean   :1.57   Mean   :  2.023   Mean   : 1.475   Mean   :0.08427  
##  3rd Qu.:2.00   3rd Qu.:  1.000   3rd Qu.: 2.000   3rd Qu.:0.00000  
##  Max.   :6.00   Max.   :100.000   Max.   :25.000   Max.   :6.00000  
##                 NA's   :268       NA's   :236                       
##     IntentIC        IntensIC        PerInIC         PerpoIC    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.00  
##  Median :2.950   Median :3.000   Median :3.980   Median :1.93  
##  Mean   :2.881   Mean   :2.923   Mean   :3.462   Mean   :1.85  
##  3rd Qu.:3.650   3rd Qu.:3.915   3rd Qu.:5.000   3rd Qu.:2.13  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :5.00  
##  NA's   :111     NA's   :109     NA's   :80      NA's   :70    
##      PhAgEX         Injured         PhAg_cus         PhAg_co       
##  Min.   :1.000   Min.   :1.000   Min.   :0.0000   Min.   :0.00000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:0.0000   1st Qu.:0.00000  
##  Median :1.000   Median :1.000   Median :0.0000   Median :0.00000  
##  Mean   :1.197   Mean   :1.128   Mean   :0.6808   Mean   :0.06173  
##  3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.0000   3rd Qu.:0.00000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.0000   Max.   :3.00000  
##  NA's   :1       NA's   :200     NA's   :262      NA's   :275      
##     PhAg_sup          IntentPA        IntensPA        PerInPA     
##  Min.   :0.00000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:0.00000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:2.000  
##  Median :0.00000   Median :2.425   Median :2.500   Median :3.530  
##  Mean   :0.01685   Mean   :2.523   Mean   :2.484   Mean   :3.196  
##  3rd Qu.:0.00000   3rd Qu.:3.240   3rd Qu.:3.260   3rd Qu.:4.000  
##  Max.   :5.00000   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##                    NA's   :114     NA's   :109     NA's   :89     
##     PerpoPA           PIC1            PIC2            PIC3      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.410   Median :2.000   Median :2.000   Median :1.000  
##  Mean   :1.583   Mean   :1.603   Mean   :1.551   Mean   :1.143  
##  3rd Qu.:1.940   3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:1.000  
##  Max.   :5.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :73      NA's   :39      NA's   :42      NA's   :48     
##       PIC4            PIC5            PIC6            PIC7      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :2.000   Median :1.000  
##  Mean   :1.342   Mean   :1.395   Mean   :1.625   Mean   :1.282  
##  3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:2.000  
##  Max.   :2.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :46      NA's   :47      NA's   :36      NA's   :47     
##       PIC8            PIC9           PIC1a           PIC2a      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :1.000  
##  Mean   :1.372   Mean   :1.401   Mean   :1.111   Mean   :1.121  
##  3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:1.000   3rd Qu.:1.000  
##  Max.   :2.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :44      NA's   :42      NA's   :94      NA's   :91     
##      PIC3a           PIC4a           PIC5a           PIC6a      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :1.000  
##  Mean   :1.023   Mean   :1.103   Mean   :1.077   Mean   :1.223  
##  3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000  
##  Max.   :2.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :97      NA's   :94      NA's   :95      NA's   :83     
##      PIC7a           PIC8a           PIC9a           PIC1b      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :1.000  
##  Mean   :1.073   Mean   :1.079   Mean   :1.079   Mean   :1.284  
##  3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:2.000  
##  Max.   :2.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :97      NA's   :91      NA's   :91      NA's   :92     
##      PIC2b           PIC3b          PIC4b           PIC5b      
##  Min.   :1.000   Min.   :1.00   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.00   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.00   Median :1.000   Median :1.000  
##  Mean   :1.259   Mean   :1.07   Mean   :1.128   Mean   :1.208  
##  3rd Qu.:2.000   3rd Qu.:1.00   3rd Qu.:1.000   3rd Qu.:1.000  
##  Max.   :2.000   Max.   :2.00   Max.   :2.000   Max.   :2.000  
##  NA's   :93      NA's   :98     NA's   :99      NA's   :97     
##      PIC6b           PIC7b           PIC8b           PIC9b      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :1.000  
##  Mean   :1.362   Mean   :1.144   Mean   :1.181   Mean   :1.194  
##  3rd Qu.:2.000   3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000  
##  Max.   :2.000   Max.   :2.000   Max.   :2.000   Max.   :2.000  
##  NA's   :88      NA's   :99      NA's   :91      NA's   :93     
##       NS1             NS2             NS3             NS4       
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :1.000   Median :1.000   Median :1.000   Median :1.000  
##  Mean   :1.135   Mean   :1.072   Mean   :1.009   Mean   :1.032  
##  3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000   3rd Qu.:1.000  
##  Max.   :5.000   Max.   :4.000   Max.   :3.000   Max.   :3.000  
##  NA's   :8       NA's   :9       NA's   :11      NA's   :10     
##       NS5             ACO1           ACO2R            ACO3      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:4.000   1st Qu.:3.000   1st Qu.:4.000  
##  Median :1.000   Median :5.000   Median :5.000   Median :5.000  
##  Mean   :1.049   Mean   :4.467   Mean   :4.204   Mean   :4.475  
##  3rd Qu.:1.000   3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:5.000  
##  Max.   :4.000   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##  NA's   :10      NA's   :11      NA's   :11      NA's   :11     
##      ACO4R            CCO1            CCO2            CCO3      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:2.000  
##  Median :5.000   Median :4.000   Median :5.000   Median :2.000  
##  Mean   :4.304   Mean   :3.999   Mean   :4.133   Mean   :2.743  
##  3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:4.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##  NA's   :12      NA's   :12      NA's   :12      NA's   :12     
##       CCO4            ACP1            ACP2            ACP3      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:5.000   1st Qu.:4.000   1st Qu.:4.000  
##  Median :2.000   Median :5.000   Median :5.000   Median :5.000  
##  Mean   :2.727   Mean   :4.855   Mean   :4.742   Mean   :4.637  
##  3rd Qu.:4.000   3rd Qu.:6.000   3rd Qu.:6.000   3rd Qu.:5.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##  NA's   :12      NA's   :17      NA's   :17      NA's   :17     
##       ACP4            CCP1            CCP2            CCP3      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:5.000   1st Qu.:2.000   1st Qu.:3.000   1st Qu.:2.000  
##  Median :5.000   Median :4.000   Median :5.000   Median :3.000  
##  Mean   :4.975   Mean   :3.819   Mean   :4.218   Mean   :3.171  
##  3rd Qu.:6.000   3rd Qu.:5.000   3rd Qu.:6.000   3rd Qu.:5.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##  NA's   :17      NA's   :17      NA's   :17      NA's   :17     
##       CCP4            TI1             TI2            TI3       
##  Min.   :1.000   Min.   :1.000   Min.   :1.00   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:1.000   1st Qu.:1.00   1st Qu.:1.000  
##  Median :3.000   Median :2.000   Median :2.00   Median :2.000  
##  Mean   :3.025   Mean   :2.458   Mean   :2.48   Mean   :2.584  
##  3rd Qu.:4.670   3rd Qu.:4.000   3rd Qu.:4.00   3rd Qu.:4.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.00   Max.   :6.000  
##  NA's   :17      NA's   :15      NA's   :15     NA's   :15     
##       Dep1           Dep2           Dep3r            Dep4      
##  Min.   :1.00   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.00   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :2.00   Median :2.000   Median :1.000   Median :1.000  
##  Mean   :1.93   Mean   :1.872   Mean   :1.803   Mean   :1.729  
##  3rd Qu.:2.00   3rd Qu.:2.000   3rd Qu.:2.000   3rd Qu.:2.000  
##  Max.   :5.00   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :19     NA's   :19      NA's   :19      NA's   :19     
##       Dep5           Dep6r            Anx1            Anx2     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.00  
##  Median :1.000   Median :2.000   Median :2.000   Median :1.00  
##  Mean   :1.774   Mean   :2.021   Mean   :1.911   Mean   :1.54  
##  3rd Qu.:2.000   3rd Qu.:3.000   3rd Qu.:2.000   3rd Qu.:2.00  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.00  
##  NA's   :19      NA's   :19      NA's   :20      NA's   :20    
##      Anx3r            Anx4            Irr1            Irr2      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:2.000  
##  Median :2.000   Median :1.000   Median :2.000   Median :2.000  
##  Mean   :2.079   Mean   :1.704   Mean   :2.134   Mean   :2.423  
##  3rd Qu.:3.000   3rd Qu.:2.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :20      NA's   :20      NA's   :21      NA's   :21     
##       Irr3           SS1_CO          SS2_CO          SS3_CO     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000  
##  Median :2.000   Median :3.000   Median :4.000   Median :4.000  
##  Mean   :2.551   Mean   :3.385   Mean   :3.538   Mean   :3.598  
##  3rd Qu.:3.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :19      NA's   :18      NA's   :18      NA's   :18     
##     SS4_COr         SS1_Man         SS2_Man         SS3_Man     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000  
##  Median :4.000   Median :4.000   Median :4.000   Median :4.000  
##  Mean   :3.652   Mean   :3.601   Mean   :3.629   Mean   :3.566  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :18      NA's   :18      NA's   :18      NA's   :18     
##     SS4_Manr        SS1_Org         SS2_Org         SS3_Org     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:2.000  
##  Median :4.000   Median :4.000   Median :4.000   Median :2.000  
##  Mean   :3.817   Mean   :3.446   Mean   :3.443   Mean   :2.423  
##  3rd Qu.:5.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :18      NA's   :18      NA's   :18      NA's   :18     
##     SS4_Orgr         BO1             BO2             BO3       
##  Min.   :1.00   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.00   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :3.00   Median :3.000   Median :3.000   Median :3.000  
##  Mean   :2.64   Mean   :3.021   Mean   :3.134   Mean   :3.317  
##  3rd Qu.:3.00   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:4.000  
##  Max.   :5.00   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :18     NA's   :18      NA's   :18      NA's   :18     
##       BO4             SB1             SB2             SB3       
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:2.000  
##  Median :3.000   Median :2.000   Median :2.000   Median :2.000  
##  Mean   :2.807   Mean   :2.122   Mean   :2.183   Mean   :2.537  
##  3rd Qu.:4.000   3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :18      NA's   :20      NA's   :21      NA's   :21     
##       SB4             SB5             SB6             SB7       
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000   1st Qu.:1.000  
##  Median :2.000   Median :2.000   Median :1.000   Median :2.000  
##  Mean   :2.104   Mean   :1.743   Mean   :1.291   Mean   :1.809  
##  3rd Qu.:3.000   3rd Qu.:2.000   3rd Qu.:1.000   3rd Qu.:2.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  NA's   :21      NA's   :21      NA's   :21      NA's   :21     
##       InC1           InC2r            InC3            InC4     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00  
##  1st Qu.:3.000   1st Qu.:3.000   1st Qu.:4.000   1st Qu.:4.00  
##  Median :4.000   Median :5.000   Median :5.000   Median :5.00  
##  Mean   :4.091   Mean   :4.501   Mean   :4.917   Mean   :4.65  
##  3rd Qu.:5.000   3rd Qu.:6.000   3rd Qu.:6.000   3rd Qu.:6.00  
##  Max.   :6.000   Max.   :6.000   Max.   :6.000   Max.   :6.00  
##  NA's   :27      NA's   :27      NA's   :27      NA's   :27    
##      InC5r           InC6           InC7r            InC8      
##  Min.   :1.00   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:5.00   1st Qu.:3.000   1st Qu.:4.000   1st Qu.:3.000  
##  Median :6.00   Median :5.000   Median :6.000   Median :5.000  
##  Mean   :5.24   Mean   :4.088   Mean   :5.053   Mean   :4.133  
##  3rd Qu.:6.00   3rd Qu.:6.000   3rd Qu.:6.000   3rd Qu.:6.000  
##  Max.   :6.00   Max.   :6.000   Max.   :6.000   Max.   :6.000  
##  NA's   :27     NA's   :27      NA's   :27      NA's   :27     
##       InC9           InC10r          InC11r         InC12      
##  Min.   :1.000   Min.   :1.000   Min.   :1.00   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:4.000   1st Qu.:4.00   1st Qu.:3.000  
##  Median :4.000   Median :5.000   Median :5.00   Median :4.000  
##  Mean   :3.878   Mean   :4.758   Mean   :4.46   Mean   :3.972  
##  3rd Qu.:5.000   3rd Qu.:6.000   3rd Qu.:6.00   3rd Qu.:5.000  
##  Max.   :6.000   Max.   :6.000   Max.   :6.00   Max.   :6.000  
##  NA's   :27      NA's   :27      NA's   :27     NA's   :27     
##        N         
##  Min.   :  1.00  
##  1st Qu.: 89.75  
##  Median :178.50  
##  Mean   :178.50  
##  3rd Qu.:267.25  
##  Max.   :356.00  
## 
is.wholenumber <- function(x, tol = .Machine$double.eps^0.5)  abs(x - round(x)) < tol

Cleaning the Constructs

Civility Climate

Civ.Clime <- subset(AN.data,select=c(InC1,InC2r,InC3,InC4,InC5r,InC6,InC7r,InC8,InC9,InC10r,InC11r,InC12,N))
Civ.Clime.NA <- apply(Civ.Clime, 2, is.wholenumber)
Civ.Clime[Civ.Clime.NA==FALSE] <- NA
Civ.Clime$CC.Miss <- apply(Civ.Clime, 1, function(x) { sum(is.na(x))})

Some basic plots about the factor structure and the results of simple scaling exercises follow.

Civ.Clime.Clean <- Civ.Clime[Civ.Clime$CC.Miss<12,c(1:12)]
Civ.Clime.Clean.F <- sapply(Civ.Clime.Clean, as.factor)
scree(Civ.Clime.Clean)

I have my doubts about the application of a simple scree plot but it does provide useful validation. Another useful thing to look at before turning to the approach that was actually taken is to look at a different taken on the scree plot; item cluster analysis. The idea is to cluster items instead of clustering subjects. What items group together by response patterns.

iclust(Civ.Clime.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Civ.Clime.Clean)
## 
## Purified Alpha:
##   C9  C10 
## 0.83 0.84 
## 
## G6* reliability:
##  C9 C10 
##   1   1 
## 
## Original Beta:
##   C9  C10 
## 0.83 0.72 
## 
## Cluster size:
##  C9 C10 
##   7   5 
## 
## Item by Cluster Structure matrix:
##          O   P   C9  C10
## InC1    C9  C9 0.54 0.29
## InC2r  C10 C10 0.57 0.72
## InC3    C9  C9 0.70 0.48
## InC4    C9  C9 0.76 0.56
## InC5r  C10 C10 0.41 0.70
## InC6    C9  C9 0.49 0.24
## InC7r  C10 C10 0.51 0.81
## InC8    C9  C9 0.56 0.39
## InC9    C9  C9 0.70 0.47
## InC10r C10 C10 0.53 0.75
## InC11r C10 C10 0.29 0.58
## InC12   C9  C9 0.72 0.46
## 
## With eigenvalues of:
##  C9 C10 
## 3.0 2.7 
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##       C9  C10
## C9  0.83 0.65
## C10 0.54 0.84
## 
## Cluster fit =  0.86   Pattern fit =  0.99  RMSR =  0.05

Lastly, for some details about the items themselves I will turn to tools from the Graded Repsonse Model. The following graphic displays the distribution of each item and how it falls in the recovered latent space of a single factor model like the one that we have deployed.

library(ltm)
fit <- grm(Civ.Clime.Clean)
plot(fit, type="IIC", legend = TRUE)

Social Burden

Social.Burden <- subset(AN.data,select=c(SB1,SB2,SB3,SB4,SB5,SB6,SB7,N))
Social.Burden.NA <- apply(Social.Burden, 2, is.wholenumber)
Social.Burden[Social.Burden.NA==FALSE] <- NA
Social.Burden$SB.Miss <- apply(Social.Burden, 1, function(x) { sum(is.na(x))})
Social.Burden.Clean <- Social.Burden[Social.Burden$SB.Miss<7,c(1:7)]
scree(Social.Burden.Clean)

iclust(Social.Burden.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Social.Burden.Clean)
## 
## Purified Alpha:
## [1] 0.89
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.8
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##     [,1]
## SB1 0.70
## SB2 0.70
## SB3 0.73
## SB4 0.79
## SB5 0.83
## SB6 0.58
## SB7 0.84
## 
## With eigenvalues of:
## [1] 3.9
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.89
## 
## Cluster fit =  0.91   Pattern fit =  0.99  RMSR =  0.08
fit <- grm(Social.Burden.Clean)
plot(fit, type="IIC", legend = TRUE)

Burnout

Burnout <- subset(AN.data,select=c(BO1,BO2,BO3,BO4,N))
Burnout.NA <- apply(Burnout, 2, is.wholenumber)
Burnout[Burnout.NA==FALSE] <- NA
Burnout$BO.Miss <- apply(Burnout, 1, function(x) { sum(is.na(x))})
Burnout.Clean <- Social.Burden[Burnout$BO.Miss<4,c(1:4)]
scree(Burnout.Clean)

iclust(Burnout.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Burnout.Clean)
## 
## Purified Alpha:
## [1] 0.85
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.74
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##     [,1]
## SB1 0.62
## SB2 0.78
## SB3 0.80
## SB4 0.79
## 
## With eigenvalues of:
## [1] 2.3
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.85
## 
## Cluster fit =  0.9   Pattern fit =  1  RMSR =  0.03
fit <- grm(Burnout.Clean)
plot(fit, type="IIC", legend = TRUE)

Support: Organization

Org.Support <- subset(AN.data,select=c(SS1_Org,SS2_Org,SS3_Org,SS4_Orgr,N))
Org.Support.NA <- apply(Org.Support, 2, is.wholenumber)
Org.Support[Org.Support.NA==FALSE] <- NA
Org.Support$OS.Miss <- apply(Org.Support, 1, function(x) { sum(is.na(x))})
OrgSupp.Clean <- Org.Support[Org.Support$OS.Miss<4,c(1:4)]
scree(OrgSupp.Clean)

iclust(OrgSupp.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = OrgSupp.Clean)
## 
## Purified Alpha:
## [1] 0.87
## 
## G6* reliability:
## [1] 0.66
## 
## Original Beta:
## [1] 0.64
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##          [,1] 
## SS1_Org  -0.86
## SS2_Org  -0.89
## SS3_Org   0.52
## SS4_Orgr  0.90
## 
## With eigenvalues of:
## [1] 2.6
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.87
## 
## Cluster fit =  0.93   Pattern fit =  1  RMSR =  0.03
fit <- grm(OrgSupp.Clean)
plot(fit, type="IIC", legend = TRUE)

Support: Manager

Mgr.Support <- subset(AN.data,select=c(SS1_Man,SS2_Man,SS3_Man,SS4_Manr,N))
Mgr.Support.NA <- apply(Mgr.Support, 2, is.wholenumber)
Mgr.Support[Mgr.Support.NA==FALSE] <- NA
Mgr.Support$MS.Miss <- apply(Mgr.Support, 1, function(x) { sum(is.na(x))})
MgrSupp.Clean <- Mgr.Support[Mgr.Support$MS.Miss<4,c(1:4)]
scree(MgrSupp.Clean)

iclust(MgrSupp.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = MgrSupp.Clean)
## 
## Purified Alpha:
## [1] 0.91
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.74
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##          [,1]
## SS1_Man  0.91
## SS2_Man  0.93
## SS3_Man  0.92
## SS4_Manr 0.64
## 
## With eigenvalues of:
## [1] 3
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.91
## 
## Cluster fit =  0.96   Pattern fit =  1  RMSR =  0.02
fit <- grm(MgrSupp.Clean)
plot(fit, type="IIC", legend = TRUE)

Support: Coworker

CO.Support <- subset(AN.data,select=c(SS1_CO,SS2_CO,SS3_CO,SS4_COr,N))
CO.Support.NA <- apply(CO.Support, 2, is.wholenumber)
CO.Support[CO.Support.NA==FALSE] <- NA
CO.Support$CW.Miss <- apply(CO.Support, 1, function(x) { sum(is.na(x))})
CWSupp.Clean <- CO.Support[CO.Support$CW.Miss<4,c(1:4)]
scree(CWSupp.Clean)

iclust(CWSupp.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = CWSupp.Clean)
## 
## Purified Alpha:
## [1] 0.86
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.65
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##         [,1]
## SS1_CO  0.82
## SS2_CO  0.84
## SS3_CO  0.89
## SS4_COr 0.53
## 
## With eigenvalues of:
## [1] 2.5
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.86
## 
## Cluster fit =  0.91   Pattern fit =  1  RMSR =  0.03
fit <- grm(CWSupp.Clean)
plot(fit, type="IIC", legend = TRUE)

Irritation

Irritation <- subset(AN.data,select=c(Irr1,Irr2,Irr3,N))
Irritation.NA <- apply(Irritation, 2, is.wholenumber)
Irritation[Irritation.NA==FALSE] <- NA
Irritation$Irr.Miss <- apply(Irritation, 1, function(x) { sum(is.na(x))})
Irr.Clean <- Irritation[Irritation$Irr.Miss<3,c(1:3)]
scree(Irr.Clean)

iclust(Irr.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Irr.Clean)
## 
## Purified Alpha:
## [1] 0.91
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.86
## 
## Cluster size:
## [1] 3
## 
## Item by Cluster Structure matrix:
##      [,1]
## Irr1 0.79
## Irr2 0.90
## Irr3 0.90
## 
## With eigenvalues of:
## [1] 2.3
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.91
## 
## Cluster fit =  0.97   Pattern fit =  1  RMSR =  0.03
fit <- grm(Irr.Clean)
plot(fit, type="IIC", legend = TRUE)

Anxiety

Anxiety <- subset(AN.data,select=c(Anx1,Anx2,Anx3r,Anx4,N))
Anxiety.NA <- apply(Anxiety, 2, is.wholenumber)
Anxiety[Anxiety.NA==FALSE] <- NA
Anxiety$Anx1[Anxiety$Anx1==99] <- NA
Anxiety$Anx.Miss <- apply(Anxiety, 1, function(x) { sum(is.na(x))})
Anx.Clean <- Anxiety[Anxiety$Anx.Miss<4,c(1:4)]
scree(Anx.Clean)

iclust(Anx.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Anx.Clean)
## 
## Purified Alpha:
## [1] 0.72
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.3
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##       [,1]
## Anx1  0.80
## Anx2  0.81
## Anx3r 0.22
## Anx4  0.69
## 
## With eigenvalues of:
## [1] 1.8
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.72
## 
## Cluster fit =  0.78   Pattern fit =  1  RMSR =  0.05
fit <- grm(Anx.Clean)
plot(fit, type="IIC", legend = TRUE)

Depression

# NB: The 99 values were omitted -- replaced as missing.
Depression <- subset(AN.data,select=c(Dep1,Dep2,Dep3r,Dep4,Dep5,Dep6r,N))
Depression.NA <- apply(Depression, 2, is.wholenumber)
Depression[Depression.NA==FALSE] <- NA
Depression$Dep.Miss <- apply(Depression, 1, function(x) { sum(is.na(x))})
Dep.Clean <- Depression[Depression$Dep.Miss<6,c(1:6)]
scree(Dep.Clean)

iclust(Dep.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = Dep.Clean)
## 
## Purified Alpha:
## [1] 0.87
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.51
## 
## Cluster size:
## [1] 6
## 
## Item by Cluster Structure matrix:
##       [,1]
## Dep1  0.82
## Dep2  0.84
## Dep3r 0.56
## Dep4  0.83
## Dep5  0.84
## Dep6r 0.53
## 
## With eigenvalues of:
## [1] 3.4
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.87
## 
## Cluster fit =  0.86   Pattern fit =  0.95  RMSR =  0.16
fit <- grm(Dep.Clean)
plot(fit, type="IIC", legend = TRUE)

Turnover Intentions

Turnover.Int <- subset(AN.data,select=c(TI1,TI2,TI3,N))
Turnover.Int.NA <- apply(Turnover.Int, 2, is.wholenumber)
Turnover.Int[Turnover.Int.NA==FALSE] <- NA
Turnover.Int$TI.Miss <- apply(Turnover.Int, 1, function(x) { sum(is.na(x))})
TI.Clean <- Turnover.Int[Turnover.Int$TI.Miss<3,c(1:3)]
scree(TI.Clean)

iclust(TI.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = TI.Clean)
## 
## Purified Alpha:
## [1] 0.91
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.89
## 
## Cluster size:
## [1] 3
## 
## Item by Cluster Structure matrix:
##     [,1]
## TI1 0.83
## TI2 0.87
## TI3 0.89
## 
## With eigenvalues of:
## [1] 2.2
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.91
## 
## Cluster fit =  0.97   Pattern fit =  1  RMSR =  0.03
fit <- grm(TI.Clean)
plot(fit, type="IIC", legend = TRUE)

Affective Commitment to the Profession

Affective.Comm.Prof <- subset(AN.data,select=c(ACP1,ACP2,ACP3,ACP4,N))
Affective.Comm.Prof.NA <- apply(Affective.Comm.Prof, 2, is.wholenumber)
Affective.Comm.Prof[Affective.Comm.Prof.NA==FALSE] <- NA
Affective.Comm.Prof$ACP.Miss <- apply(Affective.Comm.Prof, 1, function(x) { sum(is.na(x))})
ACP.Clean <- Affective.Comm.Prof[Affective.Comm.Prof$ACP.Miss<4,c(1:4)]
scree(ACP.Clean)

iclust(ACP.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = ACP.Clean)
## 
## Purified Alpha:
## [1] 0.91
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.82
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##      [,1]
## ACP1 0.86
## ACP2 0.89
## ACP3 0.89
## ACP4 0.72
## 
## With eigenvalues of:
## [1] 2.9
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.91
## 
## Cluster fit =  0.96   Pattern fit =  1  RMSR =  0.03
fit <- grm(ACP.Clean)
plot(fit, type="IIC", legend = TRUE)

Continuance Commitment to the Profession

Continuance.Comm.Prof <- subset(AN.data,select=c(CCP1,CCP2,CCP3,CCP4,N))
Continuance.Comm.Prof.NA <- apply(Continuance.Comm.Prof, 2, is.wholenumber)
Continuance.Comm.Prof[Continuance.Comm.Prof.NA==FALSE] <- NA
Continuance.Comm.Prof$CCP.Miss <- apply(Continuance.Comm.Prof, 1, function(x) { sum(is.na(x))})
CCP.Clean <- Continuance.Comm.Prof[Continuance.Comm.Prof$CCP.Miss<4,c(1:4)]
scree(CCP.Clean)

iclust(CCP.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = CCP.Clean)
## 
## Purified Alpha:
## [1] 0.8
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.72
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##      [,1]
## CCP1 0.64
## CCP2 0.65
## CCP3 0.78
## CCP4 0.70
## 
## With eigenvalues of:
## [1] 1.9
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,]  0.8
## 
## Cluster fit =  0.83   Pattern fit =  0.99  RMSR =  0.07
fit <- grm(CCP.Clean)
plot(fit, type="IIC", legend = TRUE)

Affective Commitment to the Organization

Affective.Comm.Org <- subset(AN.data,select=c(ACO1,ACO2R,ACO3,ACO4R,N))
Affective.Comm.Org.NA <- apply(Affective.Comm.Org, 2, is.wholenumber)
Affective.Comm.Org[Affective.Comm.Org.NA==FALSE] <- NA
Affective.Comm.Org$ACO.Miss <- apply(Affective.Comm.Org, 1, function(x) { sum(is.na(x))})
ACO.Clean <- Affective.Comm.Org[Affective.Comm.Org$ACO.Miss<4,c(1:4)]
scree(ACO.Clean)

iclust(ACO.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = ACO.Clean)
## 
## Purified Alpha:
## [1] 0.81
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.74
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##       [,1]
## ACO1  0.75
## ACO2R 0.67
## ACO3  0.69
## ACO4R 0.71
## 
## With eigenvalues of:
## [1] 2
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.81
## 
## Cluster fit =  0.85   Pattern fit =  0.99  RMSR =  0.07
fit <- grm(ACO.Clean)
plot(fit, type="IIC", legend = TRUE)

Continuance Commitment to the Organization

# NB: There was a value 9 in the dataset that was deleted -- replaced as missing.
Continuance.Comm.Org <- subset(AN.data,select=c(CCO1,CCO2,CCO3,CCO4,N))
Continuance.Comm.Org.NA <- apply(Continuance.Comm.Org, 2, is.wholenumber)
Continuance.Comm.Org[Continuance.Comm.Org.NA==FALSE] <- NA
Continuance.Comm.Org$CCO.Miss <- apply(Continuance.Comm.Org, 1, function(x) { sum(is.na(x))})
CCO.Clean <- Continuance.Comm.Org[Continuance.Comm.Org$CCO.Miss<4,c(1:4)]
scree(CCO.Clean)

iclust(CCO.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = CCO.Clean)
## 
## Purified Alpha:
## [1] 0.68
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.55
## 
## Cluster size:
## [1] 4
## 
## Item by Cluster Structure matrix:
##      [,1]
## CCO1 0.64
## CCO2 0.53
## CCO3 0.62
## CCO4 0.49
## 
## With eigenvalues of:
## [1] 1.3
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.68
## 
## Cluster fit =  0.65   Pattern fit =  0.98  RMSR =  0.1
fit <- grm(CCO.Clean)
plot(fit, type="IIC", legend = TRUE)

Injuries

Injuries <- subset(AN.data,select=c(PIC1,PIC2,PIC3,PIC4,PIC5,PIC6,PIC7,PIC8,PIC9,N))
Injuries.NA <- apply(Injuries, 2, is.wholenumber)
Injuries[Injuries.NA==FALSE] <- NA
Injuries$PIC.Miss <- apply(Injuries, 1, function(x) { sum(is.na(x))})

Injuries: Work

InjuriesW <- subset(AN.data,select=c(PIC1a,PIC2a,PIC3a,PIC4a,PIC5a,PIC6a,PIC7a,PIC8a,PIC9a,N))
InjuriesW.NA <- apply(InjuriesW, 2, is.wholenumber)
InjuriesW[InjuriesW.NA==FALSE] <- NA
InjuriesW$PICa.Miss <- apply(InjuriesW, 1, function(x) { sum(is.na(x))})

Injuries: Month

InjuriesM <- subset(AN.data,select=c(PIC1b,PIC2b,PIC3b,PIC4b,PIC5b,PIC6b,PIC7b,PIC8b,PIC9b,N))
InjuriesM.NA <- apply(InjuriesM, 2, is.wholenumber)
InjuriesM[InjuriesM.NA==FALSE] <- NA
InjuriesM$PICb.Miss <- apply(InjuriesM, 1, function(x) { sum(is.na(x))})

Perceived Power

Perc.Power <- subset(AN.data,select=c(PerpowVA,PerpoInt,PerpoEx,PerpoUnd,PerpoR,PerpoIC,PerpoPA,N))
Perc.Power.NA <- apply(Perc.Power, 2, is.wholenumber)
Perc.Power[Perc.Power.NA==FALSE] <- NA
Perc.Power$PIC.Miss <- apply(Perc.Power, 1, function(x) { sum(is.na(x))})
PPOW.Clean <- Perc.Power[Perc.Power$PIC.Miss<7,c(1:7)]
scree(PPOW.Clean)

iclust(PPOW.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = PPOW.Clean)
## 
## Purified Alpha:
## [1] 0.88
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.63
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##          [,1]
## PerpowVA 0.66
## PerpoInt 0.78
## PerpoEx  0.76
## PerpoUnd 0.82
## PerpoR   0.78
## PerpoIC  0.73
## PerpoPA  0.49
## 
## With eigenvalues of:
## [1] 3.7
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.88
## 
## Cluster fit =  0.9   Pattern fit =  0.99  RMSR =  0.07
fit <- grm(PPOW.Clean)
plot(fit, type="IIC", legend = TRUE)

Perceived Visiblity

Perc.Visibility <- subset(AN.data,select=c(PerInVA,PerInInt,PerInEx,PerInUnd,PerInR,PerInIC,PerInPA,N))
Perc.Visibility.NA <- apply(Perc.Visibility, 2, is.wholenumber)
Perc.Visibility[Perc.Visibility.NA==FALSE] <- NA
Perc.Visibility$PVis.Miss <- apply(Perc.Visibility, 1, function(x) { sum(is.na(x))})
PVIS.Clean <- Perc.Visibility[Perc.Visibility$PVis.Miss<7,c(1:7)]
scree(PVIS.Clean)

iclust(PVIS.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = PVIS.Clean)
## 
## Purified Alpha:
## [1] 0.85
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.59
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##          [,1]
## PerInVA  0.67
## PerInInt 0.76
## PerInEx  0.64
## PerInUnd 0.75
## PerInR   0.67
## PerInIC  0.72
## PerInPA  0.44
## 
## With eigenvalues of:
## [1] 3.2
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.85
## 
## Cluster fit =  0.85   Pattern fit =  0.99  RMSR =  0.06
fit <- grm(PVIS.Clean)
plot(fit, type="IIC", legend = TRUE)

Intention

Intention <- subset(AN.data,select=c(IntentVA,IntentIn,IntentEx,IntentUn,IntentR,IntentIC,IntentPA,N))
Intention.NA <- apply(Intention, 2, is.wholenumber)
Intention[Intention.NA==FALSE] <- NA
Intention$Intn.Miss <- apply(Intention, 1, function(x) { sum(is.na(x))})
INTENT.Clean <- Intention[Intention$Intn.Miss<7,c(1:7)]
scree(INTENT.Clean)

iclust(INTENT.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = INTENT.Clean)
## 
## Purified Alpha:
## [1] 0.87
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.57
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##          [,1]
## IntentVA 0.71
## IntentIn 0.83
## IntentEx 0.68
## IntentUn 0.80
## IntentR  0.72
## IntentIC 0.75
## IntentPA 0.44
## 
## With eigenvalues of:
## [1] 3.6
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.87
## 
## Cluster fit =  0.89   Pattern fit =  0.99  RMSR =  0.06
fit <- grm(INTENT.Clean)
plot(fit, type="IIC", legend = TRUE)

Intensity

Intensity <- subset(AN.data,select=c(IntensVA,IntensIn,IntensEx,IntensUn,IntensR,IntensIC,IntensPA,N))
Intensity.NA <- apply(Intensity, 2, is.wholenumber)
Intensity[Intensity.NA==FALSE] <- NA
Intensity$Ints.Miss <- apply(Intensity, 1, function(x) { sum(is.na(x))})
INTENSE.Clean <- Intensity[Intensity$Ints.Miss<7,c(1:7)]
scree(INTENSE.Clean)

iclust(INTENSE.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = INTENSE.Clean)
## 
## Purified Alpha:
## [1] 0.88
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.54
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##          [,1]
## IntensVA 0.73
## IntensIn 0.80
## IntensEx 0.79
## IntensUn 0.77
## IntensR  0.80
## IntensIC 0.72
## IntensPA 0.42
## 
## With eigenvalues of:
## [1] 3.7
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.88
## 
## Cluster fit =  0.9   Pattern fit =  0.99  RMSR =  0.06
fit <- grm(INTENSE.Clean)
plot(fit, type="IIC", legend = TRUE)

Relationship Power

Workplace Aggression Frequency

# NB: There are no value 5 in physical aggression; I will change the lone six to a five.
Workplace.Agg.Freq <- subset(AN.data,select=c(VAgEx,IntimEx,ExclusEx,UnderEx,RudeEx,ICEx,PhAgEX,N))
Workplace.Agg.Freq.NA <- apply(Workplace.Agg.Freq, 2, is.wholenumber)
Workplace.Agg.Freq[Workplace.Agg.Freq.NA==FALSE] <- NA
Workplace.Agg.Freq$WAF.Miss <- apply(Workplace.Agg.Freq, 1, function(x) { sum(is.na(x))})
WAF.Clean <- Workplace.Agg.Freq[Workplace.Agg.Freq$WAF.Miss<7,c(1:7)]
WAF.Clean[(!is.na(WAF.Clean$PhAgEX) & WAF.Clean$PhAgEX>5)==TRUE,"PhAgEX"] <- 5
scree(WAF.Clean)

iclust(WAF.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = WAF.Clean)
## 
## Purified Alpha:
## [1] 0.77
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.39
## 
## Cluster size:
## [1] 7
## 
## Item by Cluster Structure matrix:
##          [,1]
## VAgEx    0.69
## IntimEx  0.71
## ExclusEx 0.46
## UnderEx  0.69
## RudeEx   0.63
## ICEx     0.54
## PhAgEX   0.28
## 
## With eigenvalues of:
## [1] 2.4
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.77
## 
## Cluster fit =  0.73   Pattern fit =  0.99  RMSR =  0.06
fit <- grm(WAF.Clean)
plot(fit, type="IIC", legend = TRUE)

Taking the PA parts

# NB: There are no value 5 in physical aggression; I will change the lone six to a five.
Phys.Agg <- subset(AN.data,select=c(PerpoPA,PerInPA,IntentPA,IntensPA,PhAgEX,N))
Phys.Agg.NA <- apply(Phys.Agg, 2, is.wholenumber)
Phys.Agg[Phys.Agg.NA==FALSE] <- NA
Phys.Agg$PAg.Miss <- apply(Phys.Agg, 1, function(x) { sum(is.na(x))})
PAgg.Clean <- Phys.Agg[Phys.Agg$PAg.Miss<5,c(1:5)]
PAgg.Clean[(!is.na(PAgg.Clean$PhAgEX) & PAgg.Clean$PhAgEX>5)==TRUE,"PhAgEX"] <- 5
scree(PAgg.Clean)

iclust(PAgg.Clean)

## ICLUST (Item Cluster Analysis)
## Call: iclust(r.mat = PAgg.Clean)
## 
## Purified Alpha:
## [1] 0.77
## 
## G6* reliability:
## [1] 1
## 
## Original Beta:
## [1] 0.6
## 
## Cluster size:
## [1] 5
## 
## Item by Cluster Structure matrix:
##          [,1]
## PerpoPA  0.42
## PerInPA  0.76
## IntentPA 0.77
## IntensPA 0.62
## PhAgEX   0.60
## 
## With eigenvalues of:
## [1] 2.1
## 
## Purified scale intercorrelations
##  reliabilities on diagonal
##  correlations corrected for attenuation above diagonal: 
##      [,1]
## [1,] 0.77
## 
## Cluster fit =  0.77   Pattern fit =  0.98  RMSR =  0.09
fit <- grm(PAgg.Clean)
plot(fit, type="IIC", legend = TRUE)

Cleaning Up

save.image("Ashley.Data.Cleaned.RData")