Combined R Markdown Code

Load Data

Data <- read_csv("C://Users//farai//Downloads//FaDataset.csv")
attach(Data)
names(Data)
##  [1] "Obs"                           "Form of letter of application"
##  [3] "Appearance"                    "Academic ability"             
##  [5] "Likeability"                   "Self-confidence"              
##  [7] "Lucidity"                      "Honesty"                      
##  [9] "Salesmanship"                  "Experience"                   
## [11] "Drive"                         "Ambition"                     
## [13] "Grasp"                         "Potential"                    
## [15] "Keeness to join"               "Suitability"
options(scipen = 999)

Overall Raw Score

Data$OverallRaw <- 
  Data$`Form of letter of application` +
  Data$Appearance +
  Data$`Academic ability` +
  Data$Likeability +
  Data$`Self-confidence` +
  Data$Lucidity +
  Data$Honesty +
  Data$Salesmanship +
  Data$Experience +
  Data$Drive +
  Data$Ambition +
  Data$Grasp +
  Data$Potential +
  Data$`Keeness to join` +
  Data$Suitability

Create Analysis DataFrame

DataFrame <- Data[, c(
  "Form of letter of application",
  "Appearance",
  "Academic ability",
  "Likeability",
  "Self-confidence",
  "Lucidity",
  "Honesty",
  "Salesmanship",
  "Experience",
  "Drive",
  "Ambition",
  "Grasp",
  "Potential",
  "Keeness to join",
  "Suitability"
)]

Scree Plot & Eigenvalues

scree(DataFrame, factors = TRUE, main = "Scree Plot")

ev <- eigen(cor(DataFrame))
ev$values
##  [1] 7.51379418 2.05630117 1.45581948 1.19789771 0.73915262 0.49457907
##  [7] 0.35126183 0.30990202 0.25696154 0.18491037 0.15268036 0.09756308
## [13] 0.08881880 0.06463323 0.03572455
cumsum(ev$values)/15
##  [1] 0.5009196 0.6380064 0.7350610 0.8149208 0.8641977 0.8971696 0.9205871
##  [8] 0.9412472 0.9583780 0.9707053 0.9808840 0.9873882 0.9933095 0.9976184
## [15] 1.0000000

Orthogonal Factor Analysis

ORTHOFA <- factanal(DataFrame, factors = 3, rotation="varimax", fm="pa")
print(ORTHOFA, digits=3, cutoff=.1, sort=TRUE)
## 
## Call:
## factanal(x = DataFrame, factors = 3, rotation = "varimax", fm = "pa")
## 
## Uniquenesses:
## Form of letter of application                    Appearance 
##                         0.536                         0.699 
##              Academic ability                   Likeability 
##                         0.944                         0.005 
##               Self-confidence                      Lucidity 
##                         0.117                         0.198 
##                       Honesty                  Salesmanship 
##                         0.442                         0.145 
##                    Experience                         Drive 
##                         0.356                         0.239 
##                      Ambition                         Grasp 
##                         0.155                         0.198 
##                     Potential               Keeness to join 
##                         0.178                         0.419 
##                   Suitability 
##                         0.191 
## 
## Loadings:
##                               Factor1 Factor2 Factor3
## Self-confidence                0.925           0.135 
## Lucidity                       0.833   0.120   0.307 
## Salesmanship                   0.872   0.270   0.149 
## Drive                          0.763   0.381   0.187 
## Ambition                       0.891   0.174   0.144 
## Grasp                          0.790   0.286   0.311 
## Potential                      0.720   0.358   0.420 
## Form of letter of application  0.120   0.644   0.189 
## Experience                             0.799         
## Suitability                    0.333   0.824   0.137 
## Likeability                    0.202   0.155   0.964 
## Honesty                        0.274  -0.242   0.651 
## Keeness to join                0.440   0.221   0.582 
## Appearance                     0.441   0.182   0.272 
## Academic ability                       0.224         
## 
##                Factor1 Factor2 Factor3
## SS loadings      5.464   2.428   2.286
## Proportion Var   0.364   0.162   0.152
## Cumulative Var   0.364   0.526   0.679
## 
## Test of the hypothesis that 3 factors are sufficient.
## The chi square statistic is 128.86 on 63 degrees of freedom.
## The p-value is 0.00000198

Create Ortho Factor Averages

Data$OrthoFA1 <- (
  Data$`Self-confidence` +
  Data$Lucidity +
  Data$Salesmanship +
  Data$Drive +
  Data$Ambition +
  Data$Grasp +
  Data$Potential
) / 7

Data$OrthoFA2 <- (
  Data$`Form of letter of application` +
  Data$Experience +
  Data$Suitability
) / 3

Data$OrthoFA3 <- (
  Data$Likeability +
  Data$Honesty +
  Data$`Keeness to join`
) / 3

Ortho Reliability

Ortho1_DataFrame <- Data[, c("Self-confidence","Salesmanship","Grasp","Drive","Ambition","Lucidity","Potential")]
Ortho2_DataFrame <- Data[, c("Form of letter of application","Experience","Suitability")]
Ortho3_DataFrame <- Data[, c("Likeability","Honesty","Keeness to join")]

alpha(Ortho1_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Ortho1_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean  sd median_r
##       0.96      0.96    0.97      0.78  25 0.0086  5.9 2.7     0.78
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.94  0.96  0.98
## Duhachek  0.94  0.96  0.98
## 
##  Reliability if an item is dropped:
##                 raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## Self-confidence      0.96      0.96    0.96      0.79  23   0.0096 0.0028  0.78
## Salesmanship         0.95      0.95    0.96      0.77  20   0.0107 0.0040  0.78
## Grasp                0.95      0.95    0.96      0.78  21   0.0104 0.0028  0.78
## Drive                0.96      0.96    0.97      0.79  23   0.0095 0.0033  0.78
## Ambition             0.95      0.95    0.96      0.77  21   0.0104 0.0040  0.78
## Lucidity             0.95      0.95    0.96      0.78  21   0.0102 0.0034  0.78
## Potential            0.95      0.96    0.96      0.78  22   0.0099 0.0032  0.78
## 
##  Item statistics 
##                  n raw.r std.r r.cor r.drop mean  sd
## Self-confidence 48  0.87  0.88  0.86   0.83  6.9 2.4
## Salesmanship    48  0.93  0.92  0.91   0.89  4.9 3.4
## Grasp           48  0.92  0.91  0.91   0.88  6.2 3.0
## Drive           48  0.87  0.87  0.84   0.83  5.3 2.9
## Ambition        48  0.92  0.92  0.91   0.88  6.0 2.9
## Lucidity        48  0.91  0.91  0.90   0.87  6.3 3.2
## Potential       48  0.90  0.89  0.88   0.86  5.7 3.2
alpha(Ortho2_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Ortho2_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.82      0.82    0.76      0.61 4.7 0.043  5.4 2.7     0.59
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.71  0.82  0.89
## Duhachek  0.74  0.82  0.91
## 
##  Reliability if an item is dropped:
##                               raw_alpha std.alpha G6(smc) average_r S/N
## Form of letter of application      0.82      0.82    0.69      0.69 4.5
## Experience                         0.73      0.74    0.59      0.59 2.8
## Suitability                        0.70      0.71    0.55      0.55 2.4
##                               alpha se var.r med.r
## Form of letter of application    0.052    NA  0.69
## Experience                       0.076    NA  0.59
## Suitability                      0.084    NA  0.55
## 
##  Item statistics 
##                                n raw.r std.r r.cor r.drop mean  sd
## Form of letter of application 48  0.80  0.83  0.67   0.62  6.0 2.7
## Experience                    48  0.88  0.87  0.78   0.70  4.2 3.3
## Suitability                   48  0.89  0.88  0.81   0.73  6.0 3.3
alpha(Ortho3_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Ortho3_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.82      0.81    0.77      0.59 4.4 0.046  6.6 2.3     0.65
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.70  0.82  0.89
## Duhachek  0.72  0.82  0.91
## 
##  Reliability if an item is dropped:
##                 raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Likeability          0.62      0.62    0.45      0.45 1.6    0.110    NA  0.45
## Honesty              0.81      0.81    0.69      0.69 4.4    0.054    NA  0.69
## Keeness to join      0.78      0.78    0.65      0.65 3.6    0.062    NA  0.65
## 
##  Item statistics 
##                  n raw.r std.r r.cor r.drop mean  sd
## Likeability     48  0.92  0.91  0.86   0.78  6.1 2.8
## Honesty         48  0.81  0.82  0.67   0.60  8.0 2.5
## Keeness to join 48  0.84  0.83  0.71   0.63  5.6 2.7

Ortho Overall Score

Data$Ortho_Overall <- 
  Data$OrthoFA1 +
  Data$OrthoFA2 +
  Data$OrthoFA3 +
  Data$`Academic ability`

head(Data[order(-Data$Ortho_Overall), ], 3)
## # A tibble: 3 × 21
##     Obs Form of letter of applicatio…¹ Appearance `Academic ability` Likeability
##   <dbl>                          <dbl>      <dbl>              <dbl>       <dbl>
## 1    40                             10          6                  9          10
## 2    39                             10          6                  9          10
## 3     8                              9          9                  9           8
## # ℹ abbreviated name: ¹​`Form of letter of application`
## # ℹ 16 more variables: `Self-confidence` <dbl>, Lucidity <dbl>, Honesty <dbl>,
## #   Salesmanship <dbl>, Experience <dbl>, Drive <dbl>, Ambition <dbl>,
## #   Grasp <dbl>, Potential <dbl>, `Keeness to join` <dbl>, Suitability <dbl>,
## #   OverallRaw <dbl>, OrthoFA1 <dbl>, OrthoFA2 <dbl>, OrthoFA3 <dbl>,
## #   Ortho_Overall <dbl>

Oblique Factor Analysis

OBLIQFA <- factanal(DataFrame, factors=3, rotation="oblimin", fm="pa")
print(OBLIQFA, digits=3, cutoff=.1, sort=TRUE)
## 
## Call:
## factanal(x = DataFrame, factors = 3, rotation = "oblimin", fm = "pa")
## 
## Uniquenesses:
## Form of letter of application                    Appearance 
##                         0.536                         0.699 
##              Academic ability                   Likeability 
##                         0.944                         0.005 
##               Self-confidence                      Lucidity 
##                         0.117                         0.198 
##                       Honesty                  Salesmanship 
##                         0.442                         0.145 
##                    Experience                         Drive 
##                         0.356                         0.239 
##                      Ambition                         Grasp 
##                         0.155                         0.198 
##                     Potential               Keeness to join 
##                         0.178                         0.419 
##                   Suitability 
##                         0.191 
## 
## Loadings:
##                               Factor1 Factor2 Factor3
## Self-confidence                1.013  -0.251         
## Lucidity                       0.831           0.140 
## Salesmanship                   0.896   0.135         
## Drive                          0.746   0.265         
## Ambition                       0.932                 
## Grasp                          0.758   0.153   0.147 
## Potential                      0.639   0.232   0.279 
## Form of letter of application          0.639   0.149 
## Experience                             0.822         
## Suitability                    0.213   0.798         
## Likeability                                    1.008 
## Honesty                        0.168  -0.341   0.665 
## Keeness to join                0.303   0.120   0.528 
## Appearance                     0.393   0.102   0.189 
## Academic ability                       0.228         
## 
##             Factor1 Factor2 Factor3
## SS loadings   5.254    2.15   1.933
## 
## Factor Correlations:
##         Factor1 Factor2 Factor3
## Factor1   1.000   0.316   0.454
## Factor2   0.316   1.000   0.209
## Factor3   0.454   0.209   1.000
## 
## Test of the hypothesis that 3 factors are sufficient.
## The chi square statistic is 128.86 on 63 degrees of freedom.
## The p-value is 0.00000198

Oblique Factor Averages

Data$ObliqFA1 <- (
  Data$`Self-confidence` +
  Data$Salesmanship +
  Data$Grasp +
  Data$Drive +
  Data$Ambition +
  Data$Lucidity +
  Data$Potential
) / 7

Data$ObliqFA2 <- (
  Data$`Form of letter of application` +
  Data$Experience +
  Data$Suitability
) / 3

Data$ObliqFA3 <- (
  Data$Likeability +
  Data$Honesty +
  Data$`Keeness to join`
) / 3

Oblique Reliability

Obliq1_DataFrame <- Data[, c("Self-confidence","Salesmanship","Grasp","Drive","Ambition","Lucidity","Potential")]
Obliq2_DataFrame <- Data[, c("Form of letter of application","Experience","Suitability")]
Obliq3_DataFrame <- Data[, c("Likeability","Honesty","Keeness to join")]

alpha(Obliq1_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Obliq1_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean  sd median_r
##       0.96      0.96    0.97      0.78  25 0.0086  5.9 2.7     0.78
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.94  0.96  0.98
## Duhachek  0.94  0.96  0.98
## 
##  Reliability if an item is dropped:
##                 raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## Self-confidence      0.96      0.96    0.96      0.79  23   0.0096 0.0028  0.78
## Salesmanship         0.95      0.95    0.96      0.77  20   0.0107 0.0040  0.78
## Grasp                0.95      0.95    0.96      0.78  21   0.0104 0.0028  0.78
## Drive                0.96      0.96    0.97      0.79  23   0.0095 0.0033  0.78
## Ambition             0.95      0.95    0.96      0.77  21   0.0104 0.0040  0.78
## Lucidity             0.95      0.95    0.96      0.78  21   0.0102 0.0034  0.78
## Potential            0.95      0.96    0.96      0.78  22   0.0099 0.0032  0.78
## 
##  Item statistics 
##                  n raw.r std.r r.cor r.drop mean  sd
## Self-confidence 48  0.87  0.88  0.86   0.83  6.9 2.4
## Salesmanship    48  0.93  0.92  0.91   0.89  4.9 3.4
## Grasp           48  0.92  0.91  0.91   0.88  6.2 3.0
## Drive           48  0.87  0.87  0.84   0.83  5.3 2.9
## Ambition        48  0.92  0.92  0.91   0.88  6.0 2.9
## Lucidity        48  0.91  0.91  0.90   0.87  6.3 3.2
## Potential       48  0.90  0.89  0.88   0.86  5.7 3.2
alpha(Obliq2_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Obliq2_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.82      0.82    0.76      0.61 4.7 0.043  5.4 2.7     0.59
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.71  0.82  0.89
## Duhachek  0.74  0.82  0.91
## 
##  Reliability if an item is dropped:
##                               raw_alpha std.alpha G6(smc) average_r S/N
## Form of letter of application      0.82      0.82    0.69      0.69 4.5
## Experience                         0.73      0.74    0.59      0.59 2.8
## Suitability                        0.70      0.71    0.55      0.55 2.4
##                               alpha se var.r med.r
## Form of letter of application    0.052    NA  0.69
## Experience                       0.076    NA  0.59
## Suitability                      0.084    NA  0.55
## 
##  Item statistics 
##                                n raw.r std.r r.cor r.drop mean  sd
## Form of letter of application 48  0.80  0.83  0.67   0.62  6.0 2.7
## Experience                    48  0.88  0.87  0.78   0.70  4.2 3.3
## Suitability                   48  0.89  0.88  0.81   0.73  6.0 3.3
alpha(Obliq3_DataFrame)
## 
## Reliability analysis   
## Call: alpha(x = Obliq3_DataFrame)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.82      0.81    0.77      0.59 4.4 0.046  6.6 2.3     0.65
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.70  0.82  0.89
## Duhachek  0.72  0.82  0.91
## 
##  Reliability if an item is dropped:
##                 raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## Likeability          0.62      0.62    0.45      0.45 1.6    0.110    NA  0.45
## Honesty              0.81      0.81    0.69      0.69 4.4    0.054    NA  0.69
## Keeness to join      0.78      0.78    0.65      0.65 3.6    0.062    NA  0.65
## 
##  Item statistics 
##                  n raw.r std.r r.cor r.drop mean  sd
## Likeability     48  0.92  0.91  0.86   0.78  6.1 2.8
## Honesty         48  0.81  0.82  0.67   0.60  8.0 2.5
## Keeness to join 48  0.84  0.83  0.71   0.63  5.6 2.7

Oblique Overall Score

Data$Obliq_Overall_Score <- 
  Data$ObliqFA1 +
  Data$ObliqFA2 +
  Data$ObliqFA3 +
  Data$`Academic ability`

head(Data[order(-Data$Obliq_Overall_Score), ], 3)
## # A tibble: 3 × 25
##     Obs Form of letter of applicatio…¹ Appearance `Academic ability` Likeability
##   <dbl>                          <dbl>      <dbl>              <dbl>       <dbl>
## 1    40                             10          6                  9          10
## 2    39                             10          6                  9          10
## 3     8                              9          9                  9           8
## # ℹ abbreviated name: ¹​`Form of letter of application`
## # ℹ 20 more variables: `Self-confidence` <dbl>, Lucidity <dbl>, Honesty <dbl>,
## #   Salesmanship <dbl>, Experience <dbl>, Drive <dbl>, Ambition <dbl>,
## #   Grasp <dbl>, Potential <dbl>, `Keeness to join` <dbl>, Suitability <dbl>,
## #   OverallRaw <dbl>, OrthoFA1 <dbl>, OrthoFA2 <dbl>, OrthoFA3 <dbl>,
## #   Ortho_Overall <dbl>, ObliqFA1 <dbl>, ObliqFA2 <dbl>, ObliqFA3 <dbl>,
## #   Obliq_Overall_Score <dbl>