Tujuan

Analisa ini dilakukan untuk menentukan di kluster apa seorang CPNS itu cocok berdasarkan nilai hasil assessment fitness potensi, kompetensi, Psikometri (PSI), Talent Management (TM), Neurometrik(Neu) yang kesemuanya dalam bentuk % ase fitness

Data

Data yang dipergunakan adalah yang lengkap dari 4 batch dan dihasilkan sebagai berikut

mydata<-read.csv("C:/Users/heruw/Downloads/Rekap CPNS PUPR FUNg-STRU.csv")
mydata <- na.omit(mydata) # listwise deletion of missing

adapun struktur data yang diperoleh

str(mydata)
## 'data.frame':    259 obs. of  10 variables:
##  $ No            : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ No.test       : Factor w/ 260 levels "","198308222018021001",..: 259 183 194 205 216 227 188 238 249 184 ...
##  $ Potential_tif : num  0.938 1 0.896 0.938 0.896 ...
##  $ Competency_fit: num  0.786 0.857 0.714 0.857 0.643 ...
##  $ Psi_stru      : num  0.917 1 0.861 0.944 0.889 ...
##  $ Psi_Fung      : num  1 1.056 0.944 0.972 0.972 ...
##  $ TM_stru       : num  0.52 0.49 0.46 0.42 0.597 ...
##  $ TM_fung       : num  0.643 0.527 0.473 0.507 0.68 ...
##  $ Neu_stru      : num  0.0058 0.006 0.0058 0.0045 0.006 0.006 0.0055 0.006 0.0063 0.0053 ...
##  $ Neu_fung      : num  0.0083 0.0088 0.0083 0.008 0.008 0.0088 0.0083 0.0085 0.008 0.0085 ...
##  - attr(*, "na.action")=Class 'omit'  Named int 260
##   .. ..- attr(*, "names")= chr "260"

subset data yang digunakan

mydata<-mydata[,3:10]

Standarisasi ke distribusi normal

mydata <- scale(mydata) # standardize variables

Urutan lima data pertama setelah konversi ke distribusi normal

head(mydata)
##   Potential_tif Competency_fit   Psi_stru   Psi_Fung     TM_stru
## 1    -0.1851572     -0.4948037 -0.5801155  0.3106537  0.29220096
## 2     0.8573585      0.1491870  0.7188752  1.1852115 -0.05477838
## 3    -0.8801677     -1.1387944 -1.4461094 -0.5639041 -0.40175771
## 4    -0.1851572      0.1491870 -0.1471186 -0.1266252 -0.86439683
## 5    -0.8801677     -1.7827852 -1.0131125 -0.1266252  1.17892593
## 6    -1.2276729     -1.7827852 -1.0131125 -1.4384618 -0.78729031
##       TM_fung  Neu_stru  Neu_fung
## 1  1.05510027 -1.465083 -1.491875
## 2 -0.08760988 -1.464369 -1.490550
## 3 -0.60999167 -1.465083 -1.491875
## 4 -0.28350304 -1.469729 -1.492670
## 5  1.41423775 -1.464369 -1.492670
## 6 -0.57734280 -1.464369 -1.490550

Analisa Kluster

K-Means Cluster Analysis

fit <- kmeans(mydata, 2) # 2 cluster solution
# get cluster means 
aggregate(mydata,by=list(fit$cluster),FUN=mean)
##   Group.1 Potential_tif Competency_fit   Psi_stru   Psi_Fung    TM_stru
## 1       1     0.7846248      0.6583890  0.7692237  0.7309838  0.2168876
## 2       2    -0.7785892     -0.6533245 -0.7633065 -0.7253609 -0.2152192
##      TM_fung    Neu_stru    Neu_fung
## 1  0.1601671 -0.04785428 -0.06368570
## 2 -0.1589351  0.04748617  0.06319581
# append cluster assignment
mydata <- data.frame(mydata, fit$cluster)

Plot Kluster

# Ward Hierarchical Clustering
d <- dist(mydata, method = "euclidean") # distance matrix
fit <- hclust(d, method="ward") 
## The "ward" method has been renamed to "ward.D"; note new "ward.D2"
plot(fit) # display dendogram
groups <- cutree(fit, k=2) # cut tree into 2 clusters
# draw dendogram with red borders around the 5 clusters 
rect.hclust(fit, k=2, border="red")

Plot Kluster 2

# K-Means Clustering with 2 clusters
fit <- kmeans(mydata, 2)

# Cluster Plot against 1st 2 principal components

# vary parameters for most readable graph
library(cluster) 
clusplot(mydata, fit$cluster, color=TRUE, shade=TRUE, 
         labels=2, lines=0)

# Centroid Plot against 1st 2 discriminant functions
library(fpc)
## Warning: package 'fpc' was built under R version 3.4.4

plotcluster(mydata, fit$cluster)

Keterangan Cluster 1 : Struktural dan Cluster 2 = Fungsional