TPGRMD

Muhammad Nachnoer Novatron Fitra Arss

2022-11-28

Library

lapply(c("readxl","factoextra","ggcorrplot","ggplot2","hrbrthemes","profileR"),library,character.only=T)[[1]]
## Loading required package: ggplot2
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
## NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes.
##       Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and
##       if Arial Narrow is not on your system, please see https://bit.ly/arialnarrow
## Loading required package: RColorBrewer
## Loading required package: reshape
## Loading required package: lavaan
## This is lavaan 0.6-12
## lavaan is FREE software! Please report any bugs.
## [1] "readxl"    "stats"     "graphics"  "grDevices" "utils"     "datasets" 
## [7] "methods"   "base"

Dataset

data<-data.frame(read_excel("C:/Users/falco/Downloads/Agg.xlsx"))
## New names:
## • `` -> `...1`
data <- as.data.frame(data)
data <- data[,-1]
head(data)
##              Group.1      isi   proses kompetensi pendidik   sarana pengelolaan
## 1       KAB. BANDUNG 94.64894 91.85106   90.57447 76.92553 77.57447    91.60638
## 2 KAB. BANDUNG BARAT 93.02703 90.27027   89.10811 72.91892 72.43243    89.81081
## 3         KAB.BEKASI 95.45763 92.55932   92.69492 79.74576 82.93220    92.06780
## 4         KAB. BOGOR 95.93103 93.79310   93.66207 79.66207 83.77241    93.26207
## 5        KAB. CIAMIS 95.08696 92.00000   92.17391 81.30435 80.91304    92.26087
## 6       KAB. CIANJUR 92.73333 88.90000   86.03333 73.66667 74.86667    90.43333
##      biaya    nilai
## 1 94.80851 93.30851
## 2 92.91892 92.54054
## 3 93.47458 93.52542
## 4 95.18621 94.14483
## 5 93.47826 93.78261
## 6 91.40000 89.73333
str(data)
## 'data.frame':    27 obs. of  9 variables:
##  $ Group.1    : chr  "KAB. BANDUNG" "KAB. BANDUNG BARAT" "KAB.BEKASI" "KAB. BOGOR" ...
##  $ isi        : num  94.6 93 95.5 95.9 95.1 ...
##  $ proses     : num  91.9 90.3 92.6 93.8 92 ...
##  $ kompetensi : num  90.6 89.1 92.7 93.7 92.2 ...
##  $ pendidik   : num  76.9 72.9 79.7 79.7 81.3 ...
##  $ sarana     : num  77.6 72.4 82.9 83.8 80.9 ...
##  $ pengelolaan: num  91.6 89.8 92.1 93.3 92.3 ...
##  $ biaya      : num  94.8 92.9 93.5 95.2 93.5 ...
##  $ nilai      : num  93.3 92.5 93.5 94.1 93.8 ...

Data Formatting

rownames(data) <- data$Group.1
data <- data[,-1]

Analisis Data

Eksplorasi Data

cor_tpg <- cor(data)
cor_tpg
##                   isi    proses kompetensi  pendidik    sarana pengelolaan
## isi         1.0000000 0.8071484  0.6959006 0.3766905 0.5505898   0.8812228
## proses      0.8071484 1.0000000  0.7418726 0.3937596 0.5608541   0.8418333
## kompetensi  0.6959006 0.7418726  1.0000000 0.2307085 0.5449026   0.7155040
## pendidik    0.3766905 0.3937596  0.2307085 1.0000000 0.8056812   0.4362039
## sarana      0.5505898 0.5608541  0.5449026 0.8056812 1.0000000   0.6628535
## pengelolaan 0.8812228 0.8418333  0.7155040 0.4362039 0.6628535   1.0000000
## biaya       0.6836386 0.6744211  0.6566229 0.3836942 0.4990374   0.7719458
## nilai       0.8364676 0.8325131  0.6258339 0.3823415 0.4984915   0.7825059
##                 biaya     nilai
## isi         0.6836386 0.8364676
## proses      0.6744211 0.8325131
## kompetensi  0.6566229 0.6258339
## pendidik    0.3836942 0.3823415
## sarana      0.4990374 0.4984915
## pengelolaan 0.7719458 0.7825059
## biaya       1.0000000 0.5847264
## nilai       0.5847264 1.0000000
ggcorrplot(cor_tpg,type = "lower",lab=TRUE)

profil<-cbind(data,Mean=rowMeans(data))
prof<-profil[order(profil$Mean,decreasing = F),]
profileplot(head(prof[,-9]),rownames(head(prof[,-9])),standardize = F)

PCA

PCA_TPG <- prcomp(data,scale.=FALSE,center=TRUE)
summary(PCA_TPG)
## Importance of components:
##                           PC1    PC2    PC3    PC4     PC5     PC6     PC7
## Standard deviation     6.3619 3.2894 1.8479 1.5181 1.19486 0.85257 0.77100
## Proportion of Variance 0.6744 0.1803 0.0569 0.0384 0.02379 0.01211 0.00991
## Cumulative Proportion  0.6744 0.8547 0.9116 0.9500 0.97378 0.98590 0.99580
##                           PC8
## Standard deviation     0.5020
## Proportion of Variance 0.0042
## Cumulative Proportion  1.0000
fviz_screeplot(PCA_TPG,geom="line")

PCA_TPG$rotation
##                   PC1        PC2        PC3          PC4         PC5
## isi         0.2067832 -0.2334372  0.2064738 -0.109115952  0.17470553
## proses      0.2618846 -0.2962338  0.2113085 -0.182425467 -0.10128329
## kompetensi  0.3333331 -0.4596500 -0.5871044  0.006042511 -0.54140958
## pendidik    0.3550398  0.4842286  0.4324293  0.198800083 -0.59711651
## sarana      0.6785004  0.4502229 -0.3594469 -0.160072620  0.37421308
## pengelolaan 0.2452959 -0.2079651  0.1308886  0.034129919  0.36530781
## biaya       0.2523350 -0.2708452  0.1416405  0.835958026  0.18741906
## nilai       0.2593976 -0.3044500  0.4632868 -0.435479916 -0.03059536
##                     PC6         PC7        PC8
## isi         -0.33801135 -0.61608687 -0.5690987
## proses       0.83891661  0.02320560 -0.2261721
## kompetensi  -0.15268289 -0.07657507  0.1028719
## pendidik    -0.04163116 -0.20498582  0.1124825
## sarana       0.01256343  0.16985077 -0.1143185
## pengelolaan  0.08106943 -0.42940269  0.7442278
## biaya       -0.05107448  0.29543844 -0.1380712
## nilai       -0.38416577  0.52105251  0.1254212
  • PC1 buat ngeliat provinsi dengan 8 standar pendidikan tertinggi/terendah
  • PC2 buat ngeliat provinsi yang standar pendidik dan standar sarananya tinggi tapi 6 standar sisanya rendah
pcx<-fviz_pca_biplot(PCA_TPG,col.ind = "x",labelsize=3,
                     ggtheme=theme_ft_rc(axis_title_just = "center", grid=F)+
                       theme(plot.title = element_text(hjust=0.5)),
                     col.var = "coral", gradient.cols = "blue",title="PCA Biplot Base On PC1");pcx

  • Kota bandung dan depok paling tinggi 8 standar pendidikan
  • Kabupaten cianjur dan paten bandung baratpaling rendah 8 standar pendidikan
pcy<-fviz_pca_biplot(PCA_TPG,col.ind = "y",labelsize=3,
                     ggtheme=theme_ft_rc(axis_title_just = "center", grid=F)+
                       theme(plot.title = element_text(hjust=0.5)),
                     col.var = "coral", gradient.cols = "green",title="PCA Biplot Base On PC2");pcy
  • Kabupaten sumedang standar pendidik dan standar sarananya rendah tapi 6 standar sisanya tinggi
  • Kota Sukabumi standar pendidik dan standar sarananya tinggi tapi 6 standar sisanya rendah
  • Interpretasi lain:
    1. semua standar pendidikan hubungannya berbanding lurus
    2. standar sarana paling tinggi kontribusinya dibandingkan 7 standar pendidikan lainnya

profileR::profileplot()